summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-06-05 11:50:00 -0700
committerEric Anholt <[email protected]>2011-06-09 08:41:51 -0700
commitf304bb8a5d040d99db47a65813d216d11c66fb47 (patch)
tree8afb46c45075c52ecf6d74cd97c5e498e1ea3f36 /src/mesa
parente7280b16d634e1f434bebbce83996b3d30d0419c (diff)
i965/gen6: Fix point sprite texture coordinate overrides.
We were assuming that the input attribute n to the FS was FRAG_ATTRIB_TEXn, which happened to be true often enough for our testcases. Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 45bd269914a..75a8509c87a 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -231,13 +231,6 @@ upload_sf_state(struct brw_context *brw)
(1 << GEN6_SF_TRIFAN_PROVOKE_SHIFT);
}
- if (ctx->Point.PointSprite) {
- for (i = 0; i < 8; i++) {
- if (ctx->Point.CoordReplace[i])
- dw16 |= (1 << i);
- }
- }
-
/* flat shading */
if (ctx->Light.ShadeModel == GL_FLAT) {
dw17 |= ((brw->fragment_program->Base.InputsRead & (FRAG_BIT_COL0 | FRAG_BIT_COL1)) >>
@@ -251,6 +244,13 @@ upload_sf_state(struct brw_context *brw)
if (!(brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)))
continue;
+ /* _NEW_POINT */
+ if (ctx->Point.PointSprite &&
+ (attr >= FRAG_ATTRIB_TEX0 && attr <= FRAG_ATTRIB_TEX7) &&
+ ctx->Point.CoordReplace[attr - FRAG_ATTRIB_TEX0]) {
+ dw16 |= (1 << input_index);
+ }
+
/* The hardware can only do the overrides on 16 overrides at a
* time, and the other up to 16 have to be lined up so that the
* input index = the output index. We'll need to do some