aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-05-20 04:00:16 -0400
committerEmil Velikov <[email protected]>2015-05-27 11:41:17 +0100
commit61c6819d1aeb24589ffdf671ace1547388c09394 (patch)
tree68703c4f3255b7680d5d6c7b84e725cb497e5c7e /src/gallium
parentbf33fc653dca329ba6bc72ce6d76c6bc554e1837 (diff)
freedreno/a3xx: set .zw of sprite coords to .01
Fixes non-determinism in bin/point-sprite rendering, and the stars on the intro screen to neverball. Cc: "10.6" <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> (cherry picked from commit 6cdb29d52fc51e3d904b50bb7003c9fa38bb7896)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_program.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
index a6824ef92e7..57fcaa9020e 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
@@ -413,12 +413,15 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
}
}
- /* TODO: Figure out if there's a way to make it spit out 0's and
- * 1's for the .z and .w components.
+ /* Replace the .xy coordinates with S/T from the point sprite. Set
+ * interpolation bits for .zw such that they become .01
*/
- if (emit->sprite_coord_enable & (1 << sem2idx(fp->inputs[j].semantic)))
+ if (emit->sprite_coord_enable & (1 << sem2idx(fp->inputs[j].semantic))) {
vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
<< ((inloc % 16) * 2);
+ vinterp[(inloc + 2) / 16] |= 2 << (((inloc + 2) % 16) * 2);
+ vinterp[(inloc + 3) / 16] |= 3 << (((inloc + 3) % 16) * 2);
+ }
}
OUT_PKT0(ring, REG_A3XX_VPC_ATTR, 2);