From: Eric Anholt Date: Tue, 9 Oct 2012 22:49:55 +0000 (-0700) Subject: mesa: Remove support for NV_vertex_program's attribute evaluation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0120c250945dd4cc56685ab92e053fb60b661e9;p=mesa.git mesa: Remove support for NV_vertex_program's attribute evaluation. Note that the MAP2 getters were missing from the implementation. Neat. v2: Rebase on top of get.c changes. Reviewed-by: Brian Paul (v1) --- diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index b92c4652eac..b8f01728275 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -94,7 +94,6 @@ struct gl_enable_attrib GLboolean Map1TextureCoord4; GLboolean Map1Vertex3; GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ GLboolean Map2Color4; GLboolean Map2Index; GLboolean Map2Normal; @@ -104,7 +103,6 @@ struct gl_enable_attrib GLboolean Map2TextureCoord4; GLboolean Map2Vertex3; GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ GLboolean Normalize; GLboolean PixelTexture; @@ -285,7 +283,6 @@ _mesa_PushAttrib(GLbitfield mask) attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4; attr->Map1Vertex3 = ctx->Eval.Map1Vertex3; attr->Map1Vertex4 = ctx->Eval.Map1Vertex4; - memcpy(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib)); attr->Map2Color4 = ctx->Eval.Map2Color4; attr->Map2Index = ctx->Eval.Map2Index; attr->Map2Normal = ctx->Eval.Map2Normal; @@ -295,7 +292,6 @@ _mesa_PushAttrib(GLbitfield mask) attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4; attr->Map2Vertex3 = ctx->Eval.Map2Vertex3; attr->Map2Vertex4 = ctx->Eval.Map2Vertex4; - memcpy(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); attr->Normalize = ctx->Transform.Normalize; attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped; attr->PointSmooth = ctx->Point.SmoothFlag; @@ -545,10 +541,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) GL_MAP1_VERTEX_3); TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4, GL_MAP1_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map1Attrib[i], enable->Map1Attrib[i], - GL_MAP1_VERTEX_ATTRIB0_4_NV + i); - } TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4); TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX); @@ -565,10 +557,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) GL_MAP2_VERTEX_3); TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4, GL_MAP2_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map2Attrib[i], enable->Map2Attrib[i], - GL_MAP2_VERTEX_ATTRIB0_4_NV + i); - } TEST_AND_UPDATE(ctx->Eval.AutoNormal, enable->AutoNormal, GL_AUTO_NORMAL); TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE); diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index a607bdc10c4..5f200bf6863 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -879,57 +879,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->VertexProgram.TwoSideEnabled = state; break; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - if (ctx->API != API_OPENGL) - goto invalid_enum_error; - CHECK_EXTENSION(NV_vertex_program, cap); - { - const GLuint map = (GLuint) (cap - GL_MAP1_VERTEX_ATTRIB0_4_NV); - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Attrib[map] = state; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - if (ctx->API != API_OPENGL) - goto invalid_enum_error; - CHECK_EXTENSION(NV_vertex_program, cap); - { - const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Attrib[map] = state; - } - break; - case GL_FRAGMENT_PROGRAM_NV: if (ctx->API != API_OPENGL) goto invalid_enum_error; @@ -1595,52 +1544,6 @@ _mesa_IsEnabled( GLenum cap ) ASSERT(VERT_ATTRIB_GENERIC(n) < Elements(ctx->Array.ArrayObj->VertexAttrib)); return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(n)].Enabled != 0); } - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - if (ctx->API != API_OPENGL) - goto invalid_enum_error; - CHECK_EXTENSION(NV_vertex_program); - { - const GLuint map = (GLuint) (cap - GL_MAP1_VERTEX_ATTRIB0_4_NV); - return ctx->Eval.Map1Attrib[map]; - } - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - if (ctx->API != API_OPENGL) - goto invalid_enum_error; - CHECK_EXTENSION(NV_vertex_program); - { - const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); - return ctx->Eval.Map2Attrib[map]; - } case GL_FRAGMENT_PROGRAM_NV: if (ctx->API != API_OPENGL) diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index b0458a1e822..d6e45d6e887 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -77,19 +77,6 @@ GLuint _mesa_evaluator_components( GLenum target ) default: break; } - /* XXX need to check for the vertex program extension - if (!ctx->Extensions.NV_vertex_program) - return 0; - */ - - if (target >= GL_MAP1_VERTEX_ATTRIB0_4_NV && - target <= GL_MAP1_VERTEX_ATTRIB15_4_NV) - return 4; - - if (target >= GL_MAP2_VERTEX_ATTRIB0_4_NV && - target <= GL_MAP2_VERTEX_ATTRIB15_4_NV) - return 4; - return 0; } @@ -119,25 +106,6 @@ get_1d_map( struct gl_context *ctx, GLenum target ) return &ctx->EvalMap.Map1Texture3; case GL_MAP1_TEXTURE_COORD_4: return &ctx->EvalMap.Map1Texture4; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - if (!ctx->Extensions.NV_vertex_program) - return NULL; - return &ctx->EvalMap.Map1Attrib[target - GL_MAP1_VERTEX_ATTRIB0_4_NV]; default: return NULL; } @@ -169,25 +137,6 @@ get_2d_map( struct gl_context *ctx, GLenum target ) return &ctx->EvalMap.Map2Texture3; case GL_MAP2_TEXTURE_COORD_4: return &ctx->EvalMap.Map2Texture4; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - if (!ctx->Extensions.NV_vertex_program) - return NULL; - return &ctx->EvalMap.Map2Attrib[target - GL_MAP2_VERTEX_ATTRIB0_4_NV]; default: return NULL; } @@ -966,8 +915,6 @@ init_2d_map( struct gl_2d_map *map, int n, const float *initial ) void _mesa_init_eval( struct gl_context *ctx ) { - int i; - /* Evaluators group */ ctx->Eval.Map1Color4 = GL_FALSE; ctx->Eval.Map1Index = GL_FALSE; @@ -978,7 +925,6 @@ void _mesa_init_eval( struct gl_context *ctx ) ctx->Eval.Map1TextureCoord4 = GL_FALSE; ctx->Eval.Map1Vertex3 = GL_FALSE; ctx->Eval.Map1Vertex4 = GL_FALSE; - memset(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib)); ctx->Eval.Map2Color4 = GL_FALSE; ctx->Eval.Map2Index = GL_FALSE; ctx->Eval.Map2Normal = GL_FALSE; @@ -988,7 +934,6 @@ void _mesa_init_eval( struct gl_context *ctx ) ctx->Eval.Map2TextureCoord4 = GL_FALSE; ctx->Eval.Map2Vertex3 = GL_FALSE; ctx->Eval.Map2Vertex4 = GL_FALSE; - memset(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib)); ctx->Eval.AutoNormal = GL_FALSE; ctx->Eval.MapGrid1un = 1; ctx->Eval.MapGrid1u1 = 0.0; @@ -1007,7 +952,6 @@ void _mesa_init_eval( struct gl_context *ctx ) static GLfloat index[1] = { 1.0 }; static GLfloat color[4] = { 1.0, 1.0, 1.0, 1.0 }; static GLfloat texcoord[4] = { 0.0, 0.0, 0.0, 1.0 }; - static GLfloat attrib[4] = { 0.0, 0.0, 0.0, 1.0 }; init_1d_map( &ctx->EvalMap.Map1Vertex3, 3, vertex ); init_1d_map( &ctx->EvalMap.Map1Vertex4, 4, vertex ); @@ -1018,8 +962,6 @@ void _mesa_init_eval( struct gl_context *ctx ) init_1d_map( &ctx->EvalMap.Map1Texture2, 2, texcoord ); init_1d_map( &ctx->EvalMap.Map1Texture3, 3, texcoord ); init_1d_map( &ctx->EvalMap.Map1Texture4, 4, texcoord ); - for (i = 0; i < 16; i++) - init_1d_map( ctx->EvalMap.Map1Attrib + i, 4, attrib ); init_2d_map( &ctx->EvalMap.Map2Vertex3, 3, vertex ); init_2d_map( &ctx->EvalMap.Map2Vertex4, 4, vertex ); @@ -1030,16 +972,12 @@ void _mesa_init_eval( struct gl_context *ctx ) init_2d_map( &ctx->EvalMap.Map2Texture2, 2, texcoord ); init_2d_map( &ctx->EvalMap.Map2Texture3, 3, texcoord ); init_2d_map( &ctx->EvalMap.Map2Texture4, 4, texcoord ); - for (i = 0; i < 16; i++) - init_2d_map( ctx->EvalMap.Map2Attrib + i, 4, attrib ); } } void _mesa_free_eval_data( struct gl_context *ctx ) { - int i; - /* Free evaluator data */ free(ctx->EvalMap.Map1Vertex3.Points); free(ctx->EvalMap.Map1Vertex4.Points); @@ -1050,8 +988,6 @@ void _mesa_free_eval_data( struct gl_context *ctx ) free(ctx->EvalMap.Map1Texture2.Points); free(ctx->EvalMap.Map1Texture3.Points); free(ctx->EvalMap.Map1Texture4.Points); - for (i = 0; i < Elements(ctx->EvalMap.Map1Attrib); i++) - free(ctx->EvalMap.Map1Attrib[i].Points); free(ctx->EvalMap.Map2Vertex3.Points); free(ctx->EvalMap.Map2Vertex4.Points); @@ -1062,6 +998,4 @@ void _mesa_free_eval_data( struct gl_context *ctx ) free(ctx->EvalMap.Map2Texture2.Points); free(ctx->EvalMap.Map2Texture3.Points); free(ctx->EvalMap.Map2Texture4.Points); - for (i = 0; i < Elements(ctx->EvalMap.Map2Attrib); i++) - free((ctx->EvalMap.Map2Attrib[i].Points)); } diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 7dde0f9e88d..5fdaa77b5a6 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -531,22 +531,6 @@ descriptor=[ [ "VERTEX_ATTRIB_ARRAY13_NV", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(13)].Enabled), extra_NV_vertex_program" ], [ "VERTEX_ATTRIB_ARRAY14_NV", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(14)].Enabled), extra_NV_vertex_program" ], [ "VERTEX_ATTRIB_ARRAY15_NV", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(15)].Enabled), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB0_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[0]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB1_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[1]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB2_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[2]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB3_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[3]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB4_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[4]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB5_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[5]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB6_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[6]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB7_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[7]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB8_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[8]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB9_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[9]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB10_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[10]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB11_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[11]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB12_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[12]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB13_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[13]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB14_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[14]), extra_NV_vertex_program" ], - [ "MAP1_VERTEX_ATTRIB15_4_NV", "CONTEXT_BOOL(Eval.Map1Attrib[15]), extra_NV_vertex_program" ], # GL_NV_fragment_program [ "FRAGMENT_PROGRAM_NV", "CONTEXT_BOOL(FragmentProgram.Enabled), extra_NV_fragment_program" ], diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1b2cfca81ff..681c0f95bf0 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -856,7 +856,6 @@ struct gl_eval_attrib GLboolean Map1TextureCoord4; GLboolean Map1Vertex3; GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ GLboolean Map2Color4; GLboolean Map2Index; GLboolean Map2Normal; @@ -866,7 +865,6 @@ struct gl_eval_attrib GLboolean Map2TextureCoord4; GLboolean Map2Vertex3; GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ GLboolean AutoNormal; /*@}*/ @@ -1717,7 +1715,6 @@ struct gl_evaluators struct gl_1d_map Map1Texture2; struct gl_1d_map Map1Texture3; struct gl_1d_map Map1Texture4; - struct gl_1d_map Map1Attrib[16]; /**< GL_NV_vertex_program */ /*@}*/ /** @@ -1733,7 +1730,6 @@ struct gl_evaluators struct gl_2d_map Map2Texture2; struct gl_2d_map Map2Texture3; struct gl_2d_map Map2Texture4; - struct gl_2d_map Map2Attrib[16]; /**< GL_NV_vertex_program */ /*@}*/ }; diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c index 0763f0d4d58..81a4d25ff03 100644 --- a/src/mesa/vbo/vbo_exec.c +++ b/src/mesa/vbo/vbo_exec.c @@ -89,7 +89,7 @@ void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state ) exec->array.recalculate_inputs = GL_TRUE; } - if (new_state & (_NEW_PROGRAM|_NEW_EVAL)) + if (new_state & _NEW_EVAL) exec->eval.recalculate_maps = 1; _ae_invalidate_state(ctx, new_state); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 6bcb61cc83d..52b363da3e9 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -667,8 +667,7 @@ vbo_exec_EvalMesh1(GLenum mode, GLint i1, GLint i2) /* No effect if vertex maps disabled. */ if (!ctx->Eval.Map1Vertex4 && - !ctx->Eval.Map1Vertex3 && - !(ctx->VertexProgram._Enabled && ctx->Eval.Map1Attrib[VERT_ATTRIB_POS])) + !ctx->Eval.Map1Vertex3) return; du = ctx->Eval.MapGrid1du; @@ -704,8 +703,7 @@ vbo_exec_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) /* No effect if vertex maps disabled. */ if (!ctx->Eval.Map2Vertex4 && - !ctx->Eval.Map2Vertex3 && - !(ctx->VertexProgram._Enabled && ctx->Eval.Map2Attrib[VERT_ATTRIB_POS])) + !ctx->Eval.Map2Vertex3) return; du = ctx->Eval.MapGrid2du; diff --git a/src/mesa/vbo/vbo_exec_eval.c b/src/mesa/vbo/vbo_exec_eval.c index 1e8c3c45bb5..e6c728476af 100644 --- a/src/mesa/vbo/vbo_exec_eval.c +++ b/src/mesa/vbo/vbo_exec_eval.c @@ -117,23 +117,6 @@ void vbo_exec_eval_update( struct vbo_exec_context *exec ) else if (ctx->Eval.Map2Vertex3) set_active_eval2( exec, VBO_ATTRIB_POS, 3, &ctx->EvalMap.Map2Vertex3 ); - /* _NEW_PROGRAM */ - if (ctx->VertexProgram._Enabled) { - /* These are the 16 evaluators which GL_NV_vertex_program defines. - * They alias and override the conventional vertex attributs. - */ - for (attr = 0; attr < 16; attr++) { - /* _NEW_EVAL */ - assert(attr < Elements(ctx->Eval.Map1Attrib)); - if (ctx->Eval.Map1Attrib[attr]) - set_active_eval1( exec, attr, 4, &ctx->EvalMap.Map1Attrib[attr] ); - - assert(attr < Elements(ctx->Eval.Map2Attrib)); - if (ctx->Eval.Map2Attrib[attr]) - set_active_eval2( exec, attr, 4, &ctx->EvalMap.Map2Attrib[attr] ); - } - } - exec->eval.recalculate_maps = 0; }