summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-06-29 15:11:22 -0700
committerKenneth Graunke <[email protected]>2011-07-11 10:46:35 -0700
commit147d0102952b7c0b16906c08da2ae447ec68185a (patch)
tree7f8af07e6c429b605d222eac858a7fc078c14361 /src/mesa/drivers
parent5edb3ddf4191b31b4a4e43a85fe1bfbd62a8cb17 (diff)
i965/gen7: Fix point sprite texture coordinate overrides.
This is exactly analogous to Eric's Gen6 change in commit f304bb8a5d040d99db47a65813d216d11c66fb47. His explanation: "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." Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for the 7.11 branch.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sf_state.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c
index aeeb4f26555..e36c44aa3fd 100644
--- a/src/mesa/drivers/dri/i965/gen7_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c
@@ -58,12 +58,6 @@ upload_sbe_state(struct brw_context *brw)
dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT;
dw10 = 0;
- if (ctx->Point.PointSprite) {
- for (i = 0; i < 8; i++) {
- if (ctx->Point.CoordReplace[i])
- dw10 |= (1 << i);
- }
- }
/* _NEW_LIGHT (flat shading) */
dw11 = 0;
@@ -79,6 +73,12 @@ upload_sbe_state(struct brw_context *brw)
if (!(brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)))
continue;
+ if (ctx->Point.PointSprite &&
+ attr >= FRAG_ATTRIB_TEX0 && attr <= FRAG_ATTRIB_TEX7 &&
+ ctx->Point.CoordReplace[attr - FRAG_ATTRIB_TEX0]) {
+ dw10 |= (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