diff options
author | Brian Paul <[email protected]> | 2018-01-15 14:37:04 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-17 11:17:56 -0700 |
commit | 95dec9097fb0a5cf5438f04511a52724ea545302 (patch) | |
tree | 1081b7fd567e8aa8ea9916ed7d6518096d547fbd /src/mesa/vbo/vbo_context.c | |
parent | 5d78440d5830e5f38ac4b3094aadcd436db18365 (diff) |
vbo: change vbo_context attribute map arrays to GLubyte
The values will never be larger than VBO_ATTRIB_MAX (currently 44).
v2: add STATIC_ASSERT to be sure VBO_ATTRIB_MAX can fit in ubyte,
per Emil.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_context.c')
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index a5f915d9bdb..2d4a973ebd6 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -200,6 +200,9 @@ GLboolean _vbo_CreateContext( struct gl_context *ctx ) { GLuint i; + /* make sure all VBO_ATTRIB_ values can fit in an unsigned byte */ + STATIC_ASSERT(VBO_ATTRIB_MAX <= 255); + /* identity mapping */ for (i = 0; i < ARRAY_SIZE(vbo->map_vp_none); i++) vbo->map_vp_none[i] = i; |