summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save_draw.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-15 14:37:04 -0700
committerBrian Paul <[email protected]>2018-01-17 11:17:56 -0700
commit95dec9097fb0a5cf5438f04511a52724ea545302 (patch)
tree1081b7fd567e8aa8ea9916ed7d6518096d547fbd /src/mesa/vbo/vbo_save_draw.c
parent5d78440d5830e5f38ac4b3094aadcd436db18365 (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_save_draw.c')
-rw-r--r--src/mesa/vbo/vbo_save_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 41010225c3c..c1298f95a0c 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -137,7 +137,7 @@ bind_vertex_list(struct gl_context *ctx,
struct vbo_save_context *save = &vbo->save;
struct gl_vertex_array *arrays = save->arrays;
GLuint buffer_offset = node->buffer_offset;
- const GLuint *map;
+ const GLubyte *map;
GLuint attr;
GLubyte node_attrsz[VBO_ATTRIB_MAX]; /* copy of node->attrsz[] */
GLenum node_attrtype[VBO_ATTRIB_MAX]; /* copy of node->attrtype[] */
@@ -160,7 +160,7 @@ bind_vertex_list(struct gl_context *ctx,
/* Install the default (ie Current) attributes first */
for (attr = 0; attr < VERT_ATTRIB_FF_MAX; attr++) {
- save->inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr];
+ save->inputs[attr] = &vbo->currval[VBO_ATTRIB_POS + attr];
}
/* Overlay other active attributes */