| Index: gpu/command_buffer/service/vertex_attrib_manager.h
|
| diff --git a/gpu/command_buffer/service/vertex_attrib_manager.h b/gpu/command_buffer/service/vertex_attrib_manager.h
|
| index f3fae6d2d8f2e98ab144da10dad5f1ba210cfe1a..42ede30ebcf9a5b52bda4e0f8538d3d39272549d 100644
|
| --- a/gpu/command_buffer/service/vertex_attrib_manager.h
|
| +++ b/gpu/command_buffer/service/vertex_attrib_manager.h
|
| @@ -200,6 +200,22 @@ class GPU_EXPORT VertexAttribManager :
|
| return NULL;
|
| }
|
|
|
| + void UpdateAttribBaseTypeAndMask(GLuint loc, GLenum base_type) {
|
| + DCHECK(loc >=0 && loc < 16);
|
| + int shift_bits = loc * 2;
|
| + attrib_written_mask_ |= 0x3 << shift_bits;
|
| + attrib_base_type_mask_ &= ~(0x3 << shift_bits);
|
| + attrib_base_type_mask_ |= base_type << shift_bits;
|
| + }
|
| +
|
| + uint32_t attrib_base_type_mask() const {
|
| + return attrib_base_type_mask_;
|
| + }
|
| +
|
| + uint32_t attrib_written_mask() const {
|
| + return attrib_written_mask_;
|
| + }
|
| +
|
| void SetAttribInfo(
|
| GLuint index,
|
| Buffer* buffer,
|
| @@ -284,6 +300,14 @@ class GPU_EXPORT VertexAttribManager :
|
| // if it is safe to draw.
|
| std::vector<VertexAttrib> vertex_attribs_;
|
|
|
| + // Vertex attrib base types: FLOAT, INT, or UINT.
|
| + // We have up to 16 attribs, each is encoded into 2 bits, total 32 bits:
|
| + // the lowest 2 bits for location 0, the highest 2 bits for location 15.
|
| + uint32_t attrib_base_type_mask_;
|
| + // Same layout as above, 2 bits per location, 0x03 if a location is set
|
| + // by vertexAttrib API, 0x00 if not.
|
| + uint32_t attrib_written_mask_;
|
| +
|
| // The currently bound element array buffer. If this is 0 it is illegal
|
| // to call glDrawElements.
|
| scoped_refptr<Buffer> element_array_buffer_;
|
|
|