aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-17 08:07:33 +0200
committermarha <marha@users.sourceforge.net>2012-10-17 08:07:33 +0200
commit856fbbaf1e53303d8307bfae1761f1ba96871f1e (patch)
treee029665439ddbccfb253271a5f5290d72c2b2168 /mesalib/src/mesa/vbo
parentf15a40afaf6d1b3a4841d25631f947da1b289f89 (diff)
parentded57b5a4131a213d57f5a20d50b819b7a8924df (diff)
downloadvcxsrv-856fbbaf1e53303d8307bfae1761f1ba96871f1e.tar.gz
vcxsrv-856fbbaf1e53303d8307bfae1761f1ba96871f1e.tar.bz2
vcxsrv-856fbbaf1e53303d8307bfae1761f1ba96871f1e.zip
Merge remote-tracking branch 'origin/released'
* origin/released: pixman mesa git update 17 oct 2012
Diffstat (limited to 'mesalib/src/mesa/vbo')
-rw-r--r--mesalib/src/mesa/vbo/vbo_context.h2
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec.c2
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec.h1
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_api.c10
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_array.c26
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_draw.c5
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_eval.c17
-rw-r--r--mesalib/src/mesa/vbo/vbo_save_draw.c5
8 files changed, 7 insertions, 61 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_context.h b/mesalib/src/mesa/vbo/vbo_context.h
index e3e37e7f2..c896f1196 100644
--- a/mesalib/src/mesa/vbo/vbo_context.h
+++ b/mesalib/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/mesalib/src/mesa/vbo/vbo_exec.c b/mesalib/src/mesa/vbo/vbo_exec.c
index 0763f0d4d..81a4d25ff 100644
--- a/mesalib/src/mesa/vbo/vbo_exec.c
+++ b/mesalib/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/mesalib/src/mesa/vbo/vbo_exec.h b/mesalib/src/mesa/vbo/vbo_exec.h
index 635e743ae..ef57a8199 100644
--- a/mesalib/src/mesa/vbo/vbo_exec.h
+++ b/mesalib/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/mesalib/src/mesa/vbo/vbo_exec_api.c b/mesalib/src/mesa/vbo/vbo_exec_api.c
index 6bcb61cc8..2ddb71588 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_api.c
+++ b/mesalib/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;
@@ -960,6 +958,10 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
vfmt->VertexAttrib4fvARB = vbo_VertexAttrib4fvARB;
}
+ /* Note that VertexAttrib4fNV is used from dlist.c and api_arrayelt.c so
+ * they can have a single entrypoint for updating any of the legacy
+ * attribs.
+ */
vfmt->VertexAttrib1fNV = vbo_VertexAttrib1fNV;
vfmt->VertexAttrib1fvNV = vbo_VertexAttrib1fvNV;
vfmt->VertexAttrib2fNV = vbo_VertexAttrib2fNV;
diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c
index f0ef2058e..d857ac3e5 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_array.c
+++ b/mesalib/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/mesalib/src/mesa/vbo/vbo_exec_draw.c b/mesalib/src/mesa/vbo/vbo_exec_draw.c
index 15ecfc031..817af4dd5 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_draw.c
+++ b/mesalib/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/mesalib/src/mesa/vbo/vbo_exec_eval.c b/mesalib/src/mesa/vbo/vbo_exec_eval.c
index 1e8c3c45b..e6c728476 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_eval.c
+++ b/mesalib/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;
}
diff --git a/mesalib/src/mesa/vbo/vbo_save_draw.c b/mesalib/src/mesa/vbo/vbo_save_draw.c
index 8ffc96aec..09b8b8ab2 100644
--- a/mesalib/src/mesa/vbo/vbo_save_draw.c
+++ b/mesalib/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];
}