src/third_party/angle/src/libANGLE/renderer/d3d/VertexDataManager.cpp
// Warning: ensure the binding matches attrib.bindingIndex before using these functions.
ensure the binding matches attrib.bindingIndex before using these functions.
ensure the binding matches attrib . bindingIndex before using these functions .
int64_t GetMaxAttributeByteOffsetForDraw(const gl::VertexAttribute &attrib,
                                         const gl::VertexBinding &binding,
                                         int64_t elementCount)
{
    CheckedNumeric<int64_t> stride = ComputeVertexAttributeStride(attrib, binding);
    CheckedNumeric<int64_t> offset = ComputeVertexAttributeOffset(attrib, binding);
    CheckedNumeric<int64_t> size   = ComputeVertexAttributeTypeSize(attrib);
    ASSERT(elementCount > 0);
    CheckedNumeric<int64_t> result =
        stride * (CheckedNumeric<int64_t>(elementCount) - 1) + size + offset;
    return result.ValueOrDefault(std::numeric_limits<int64_t>::max());
}
int64_t GetMaxAttributeByteOffsetForDraw ( const gl :: VertexAttribute & attrib , const gl :: VertexBinding & binding , int64_t elementCount ) { CheckedNumeric < int64_t > stride = ComputeVertexAttributeStride ( attrib , binding ) ; CheckedNumeric < int64_t > offset = ComputeVertexAttributeOffset ( attrib , binding ) ; CheckedNumeric < int64_t > size = ComputeVertexAttributeTypeSize ( attrib ) ; ASSERT ( elementCount > 0 ) ; CheckedNumeric < int64_t > result = stride * ( CheckedNumeric < int64_t > ( elementCount ) - 1 ) + size + offset ; return result . ValueOrDefault ( std :: numeric_limits < int64_t > :: max ( ) ) ; }
Warning: ensure the binding matches attrib.bindingIndex before using these functions.
Warning : ensure the binding matches attrib . bindingIndex before using these functions .