summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nv10_swtcl.c
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2007-07-04 10:52:35 +0800
committerZou Nan hai <nanhai.zou@intel.com>2007-07-04 10:52:35 +0800
commitfb9ee9b323bff93973a39560b2bc007aace4bddd (patch)
tree05e1e72e8f4d321cde2c48b8518e6d9736c680dd /src/mesa/drivers/dri/nouveau/nv10_swtcl.c
parent285b326c606e9b2f90e4fe177b15b3fa23239b86 (diff)
parent7ff4359a3be1278b26950f96ab23014a667af838 (diff)
Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa into 965-glsl
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv10_swtcl.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_swtcl.c45
1 files changed, 14 insertions, 31 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c
index 3bc84d862d..4576c1ede4 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c
@@ -392,15 +392,6 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa)
int i;
int slots=0;
int total_size=0;
- /* t_vertex_generic dereferences a NULL pointer if we
- * pass NULL as the vp transform...
- */
- const GLfloat ident_vp[16] = {
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0
- };
nmesa->vertex_attr_count = 0;
RENDERINPUTS_COPY(index, nmesa->render_inputs_bitset);
@@ -431,28 +422,20 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa)
if (RENDERINPUTS_TEST(index, i))
{
slots=i+1;
- if (i==_TNL_ATTRIB_POS)
- {
- /* special-case POS */
- EMIT_ATTR(_TNL_ATTRIB_POS,EMIT_3F_VIEWPORT);
- }
- else
+ switch(attr_size[i])
{
- switch(attr_size[i])
- {
- case 1:
- EMIT_ATTR(i,EMIT_1F);
- break;
- case 2:
- EMIT_ATTR(i,EMIT_2F);
- break;
- case 3:
- EMIT_ATTR(i,EMIT_3F);
- break;
- case 4:
- EMIT_ATTR(i,EMIT_4F);
- break;
- }
+ case 1:
+ EMIT_ATTR(i,EMIT_1F);
+ break;
+ case 2:
+ EMIT_ATTR(i,EMIT_2F);
+ break;
+ case 3:
+ EMIT_ATTR(i,EMIT_3F);
+ break;
+ case 4:
+ EMIT_ATTR(i,EMIT_4F);
+ break;
}
if (i==_TNL_ATTRIB_COLOR0)
nmesa->color_offset=total_size;
@@ -465,7 +448,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa)
nmesa->vertex_size=_tnl_install_attrs( ctx,
nmesa->vertex_attrs,
nmesa->vertex_attr_count,
- ident_vp, 0 );
+ NULL, 0 );
assert(nmesa->vertex_size==total_size*4);
/*