diff options
author | Mathias Fröhlich <[email protected]> | 2018-01-27 16:07:22 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-01 22:39:07 +0100 |
commit | 3d4fb879ddbce1c5da7199ae74bc2e7ae98d1b70 (patch) | |
tree | 886e65a3a68bfd422e067e92caff2b4351d20134 /src/mesa/vbo/vbo_exec_array.c | |
parent | b4fd63015ac7fd73e0147ff078caec47be729e87 (diff) |
vbo: Use static const VERT_ATTRIB->VBO_ATTRIB maps.
Instead of each context having its own map instance for
this purpose, use a global static const map.
v2: s,unsigned char,GLubyte,g
s,_VP_MODE_MAX,VP_MODE_MAX,g
Change comment style.
Signed-off-by: Mathias Fröhlich <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 98eb6466ba3..ee4b7b56b6d 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -319,7 +319,8 @@ recalculate_input_bindings(struct gl_context *ctx) GLbitfield const_inputs = 0x0; GLuint i; - switch (get_vp_mode(ctx)) { + const enum vp_mode program_mode = get_vp_mode(ctx); + switch (program_mode) { case VP_FF: /* When no vertex program is active (or the vertex program is generated * from fixed-function state). We put the material values into the @@ -424,6 +425,8 @@ recalculate_input_bindings(struct gl_context *ctx) } break; + default: + assert(0); } _mesa_set_varying_vp_inputs(ctx, VERT_BIT_ALL & (~const_inputs)); |