summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_shader_state.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-08-17 13:07:12 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-08-17 13:08:59 +0200
commitcb75082768d516d684a69588266b92b06e19b7bd (patch)
treeb7bd45d95985bd053daf462aad30e4ade71d92e3 /src/gallium/drivers/nv50/nv50_shader_state.c
parentce1629564d1cce80b2762d266640e3181a68e848 (diff)
nv50: fix PSIZ and PRIMID mapping
Initializing map to 0x40 (0x80) instead of 0 now, so need to clear it first.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_shader_state.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_shader_state.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
index 3d5df596ef..5f70df3662 100644
--- a/src/gallium/drivers/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nv50/nv50_shader_state.c
@@ -496,16 +496,19 @@ nv50_fp_linkage_validate(struct nv50_context *nv50)
m = nv50_vec4_map(map, m, lin,
&fp->in[i], (n < vp->out_nr) ? &vp->out[n] : &dummy);
}
+
/* PrimitiveID either is replaced by the system value, or
* written by the geometry shader into an output register
*/
if (fp->gp.primid < 0x40) {
- map[m / 4] |= vp->gp.primid << ((m % 4) * 8);
+ i = (m % 4) * 8;
+ map[m / 4] = (map[m / 4] & ~(0xff << i)) | (vp->gp.primid << i);
primid = m++;
}
if (nv50->rasterizer->pipe.point_size_per_vertex) {
- map[m / 4] |= vp->vp.psiz << ((m % 4) * 8);
+ i = (m % 4) * 8;
+ map[m / 4] = (map[m / 4] & ~(0xff << i)) | (vp->vp.psiz << i);
psiz = (m++ << 4) | 1;
}
@@ -532,7 +535,6 @@ nv50_fp_linkage_validate(struct nv50_context *nv50)
so_datap (so, map, n);
}
- //colors = 0x01000404;
so_method(so, tesla, NV50TCL_MAP_SEMANTIC_0, 4);
so_data (so, colors);
so_data (so, clip);