diff options
author | marha <marha@users.sourceforge.net> | 2011-11-29 12:25:28 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-29 12:25:28 +0100 |
commit | 2cfebffb491807a465a8e5f7daca582d8aefb829 (patch) | |
tree | 1e17cf480a441bc4b941008005fcd0cc6c3d09a6 /mesalib/src/mesa/vbo/vbo_save_draw.c | |
parent | 7417e9a171736b5279881cd4381fb58c617a23d9 (diff) | |
download | vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.tar.gz vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.tar.bz2 vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.zip |
mesa git update 29 nov 2011
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_save_draw.c')
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_save_draw.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_save_draw.c b/mesalib/src/mesa/vbo/vbo_save_draw.c index 6cda831aa..0773786b3 100644 --- a/mesalib/src/mesa/vbo/vbo_save_draw.c +++ b/mesalib/src/mesa/vbo/vbo_save_draw.c @@ -137,7 +137,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, const GLuint *map; GLuint attr; GLubyte node_attrsz[VBO_ATTRIB_MAX]; /* copy of node->attrsz[] */ - GLbitfield varying_inputs = 0x0; + GLbitfield64 varying_inputs = 0x0; memcpy(node_attrsz, node->attrsz, sizeof(node->attrsz)); @@ -146,11 +146,11 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, */ switch (get_program_mode(ctx)) { case VP_NONE: - for (attr = 0; attr < 16; attr++) { + for (attr = 0; attr < VERT_ATTRIB_FF_MAX; attr++) { save->inputs[attr] = &vbo->legacy_currval[attr]; } for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) { - save->inputs[attr + 16] = &vbo->mat_currval[attr]; + save->inputs[VERT_ATTRIB_GENERIC(attr)] = &vbo->mat_currval[attr]; } map = vbo->map_vp_none; break; @@ -160,9 +160,11 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, * occurred. NV vertex programs cannot access material values, * nor attributes greater than VERT_ATTRIB_TEX7. */ - for (attr = 0; attr < 16; attr++) { + for (attr = 0; attr < VERT_ATTRIB_FF_MAX; attr++) { save->inputs[attr] = &vbo->legacy_currval[attr]; - save->inputs[attr + 16] = &vbo->generic_currval[attr]; + } + for (attr = 0; attr < VERT_ATTRIB_GENERIC_MAX; attr++) { + save->inputs[VERT_ATTRIB_GENERIC(attr)] = &vbo->generic_currval[attr]; } map = vbo->map_vp_arb; @@ -172,8 +174,8 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, */ if ((ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_POS) == 0 && (ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) { - save->inputs[16] = save->inputs[0]; - node_attrsz[16] = node_attrsz[0]; + save->inputs[VERT_ATTRIB_GENERIC0] = save->inputs[0]; + node_attrsz[VERT_ATTRIB_GENERIC0] = node_attrsz[0]; node_attrsz[0] = 0; } break; @@ -204,7 +206,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, assert(arrays[attr].BufferObj->Name); buffer_offset += node->attrsz[src] * sizeof(GLfloat); - varying_inputs |= 1<<attr; + varying_inputs |= VERT_BIT(attr); ctx->NewState |= _NEW_ARRAY; } } |