diff options
-rw-r--r-- | src/mesa/main/api_arrayelt.c | 31 | ||||
-rw-r--r-- | src/mesa/main/arrayobj.c | 2 | ||||
-rw-r--r-- | src/mesa/main/arrayobj.h | 12 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_context.h | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec.h | 1 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 26 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 5 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 5 |
9 files changed, 12 insertions, 74 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index d530001bc5e..20b8ff4d1c7 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1528,31 +1528,24 @@ static void _ae_update_state( struct gl_context *ctx ) for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */ struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)]; if (attribArray->Enabled) { + GLint intOrNorm; at->array = attribArray; /* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV * function pointer here (for float arrays) since the pointer may * change from one execution of _ae_ArrayElement() to * the next. Doing so caused UT to break. */ - if (ctx->VertexProgram._Enabled - && ctx->VertexProgram.Current->IsNVProgram) { - at->func = AttribFuncsNV[at->array->Normalized] - [at->array->Size-1] - [TYPE_IDX(at->array->Type)]; - } - else { - GLint intOrNorm; - if (at->array->Integer) - intOrNorm = 2; - else if (at->array->Normalized) - intOrNorm = 1; - else - intOrNorm = 0; - - at->func = AttribFuncsARB[intOrNorm] - [at->array->Size-1] - [TYPE_IDX(at->array->Type)]; - } + if (at->array->Integer) + intOrNorm = 2; + else if (at->array->Normalized) + intOrNorm = 1; + else + intOrNorm = 0; + + at->func = AttribFuncsARB[intOrNorm] + [at->array->Size-1] + [TYPE_IDX(at->array->Type)]; + at->index = i; check_vbo(actx, at->array->BufferObj); at++; diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 9255559d533..5959260c27f 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -314,8 +314,6 @@ _mesa_update_array_object_max_element(struct gl_context *ctx, if (!ctx->VertexProgram._Current || ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) { enabled = _mesa_array_object_get_enabled_ff(arrayObj); - } else if (ctx->VertexProgram._Current->IsNVProgram) { - enabled = _mesa_array_object_get_enabled_nv(arrayObj); } else { enabled = _mesa_array_object_get_enabled_arb(arrayObj); } diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h index 4f89064bb66..dfefec2a7a3 100644 --- a/src/mesa/main/arrayobj.h +++ b/src/mesa/main/arrayobj.h @@ -87,18 +87,6 @@ _mesa_array_object_get_enabled_ff(const struct gl_array_object *arrayObj) return arrayObj->_Enabled & VERT_BIT_FF_ALL; } -/** Returns the bitmask of all enabled arrays in nv shader mode. - * - * In nv shader mode, the nv generic arrays take precedence over - * the legacy arrays. - */ -static inline GLbitfield64 -_mesa_array_object_get_enabled_nv(const struct gl_array_object *arrayObj) -{ - GLbitfield64 enabled = arrayObj->_Enabled; - return enabled & ~(VERT_BIT_FF_NVALIAS & (enabled >> VERT_ATTRIB_GENERIC0)); -} - /** Returns the bitmask of all enabled arrays in arb/glsl shader mode. * * In arb/glsl shader mode all the fixed function and the arb/glsl generic diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 2b9f7f3ed28..1b2cfca81ff 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -195,8 +195,6 @@ typedef enum #define VERT_BIT_TEX(i) VERT_BIT(VERT_ATTRIB_TEX(i)) #define VERT_BIT_TEX_ALL \ BITFIELD64_RANGE(VERT_ATTRIB_TEX(0), VERT_ATTRIB_TEX_MAX) -#define VERT_BIT_FF_NVALIAS \ - BITFIELD64_RANGE(VERT_ATTRIB_POS, VERT_ATTRIB_TEX(VERT_ATTRIB_TEX_MAX)) #define VERT_BIT_GENERIC_NV(i) VERT_BIT(VERT_ATTRIB_GENERIC_NV(i)) #define VERT_BIT_GENERIC_NV_ALL \ diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h index e3e37e7f282..c896f1196f7 100644 --- a/src/mesa/vbo/vbo_context.h +++ b/src/mesa/vbo/vbo_context.h @@ -106,8 +106,6 @@ get_program_mode( struct gl_context *ctx ) return VP_NONE; else if (ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) return VP_NONE; - else if (ctx->VertexProgram._Current->IsNVProgram) - return VP_NV; else return VP_ARB; } diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h index 635e743aec7..ef57a81992f 100644 --- a/src/mesa/vbo/vbo_exec.h +++ b/src/mesa/vbo/vbo_exec.h @@ -55,7 +55,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /** Current vertex program mode */ enum vp_mode { VP_NONE, /**< fixed function */ - VP_NV, /**< NV vertex program */ VP_ARB /**< ARB vertex program or GLSL vertex shader */ }; diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index f0ef2058e94..d857ac3e52f 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -440,32 +440,6 @@ recalculate_input_bindings(struct gl_context *ctx) } break; - case VP_NV: - /* NV_vertex_program - attribute arrays alias and override - * conventional, legacy arrays. No materials, and the generic - * slots are vacant. - */ - for (i = 0; i < VERT_ATTRIB_FF_MAX; i++) { - if (i < VERT_ATTRIB_GENERIC_MAX - && vertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled) - inputs[i] = &vertexAttrib[VERT_ATTRIB_GENERIC(i)]; - else if (vertexAttrib[VERT_ATTRIB_FF(i)].Enabled) - inputs[i] = &vertexAttrib[VERT_ATTRIB_FF(i)]; - else { - inputs[i] = &vbo->currval[VBO_ATTRIB_POS+i]; - const_inputs |= VERT_BIT_FF(i); - } - } - - /* Could use just about anything, just to fill in the empty - * slots: - */ - for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) { - inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->currval[VBO_ATTRIB_GENERIC0+i]; - const_inputs |= VERT_BIT_GENERIC(i); - } - break; - case VP_ARB: /* GL_ARB_vertex_program or GLSL vertex shader - Only the generic[0] * attribute array aliases and overrides the legacy position array. diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 15ecfc03119..817af4dd52b 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -180,12 +180,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) } map = vbo->map_vp_none; break; - case VP_NV: case VP_ARB: - /* The aliasing of attributes for NV vertex programs has already - * occurred. NV vertex programs cannot access material values, - * nor attributes greater than VERT_ATTRIB_TEX7. - */ for (attr = 0; attr < VERT_ATTRIB_FF_MAX; attr++) { exec->vtx.inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr]; } diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 8ffc96aec87..09b8b8ab2b8 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -152,12 +152,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, } map = vbo->map_vp_none; break; - case VP_NV: case VP_ARB: - /* The aliasing of attributes for NV vertex programs has already - * occurred. NV vertex programs cannot access material values, - * nor attributes greater than VERT_ATTRIB_TEX7. - */ for (attr = 0; attr < VERT_ATTRIB_FF_MAX; attr++) { save->inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr]; } |