summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-23 15:20:31 +0200
committerLuca Barbieri <[email protected]>2010-08-23 15:20:31 +0200
commit2e215bc28f71d6b556ba65e6c4e26654782e1844 (patch)
tree249f9905ef37807f85c66388436a00ce7401b154 /src/gallium/drivers
parentbfaa2577c6474222c79341c0d90685ed579f3414 (diff)
nvfx: match Gallium's gl_PointCoord brokenness
Gallium always puts gl_PointCoord in GENERIC[0] if point_quad_rasterization is enabled. This is silly, but for now it makes mesa-demos/glsl/pointcoord work.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index 23a85c9342e..049b814d49f 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -1181,8 +1181,11 @@ nvfx_fragprog_validate(struct nvfx_context *nvfx)
struct nouveau_channel* chan = nvfx->screen->base.channel;
struct nvfx_pipe_fragment_program *pfp = nvfx->fragprog;
struct nvfx_vertex_program* vp;
- unsigned sprite_coord_enable = nvfx->rasterizer->pipe.point_quad_rasterization * nvfx->rasterizer->pipe.sprite_coord_enable;
- // TODO: correct or flipped?
+ /* Gallium always puts the point coord in GENERIC[0]
+ * TODO: this is wrong, Gallium needs to be fixed
+ */
+ unsigned sprite_coord_enable = nvfx->rasterizer->pipe.point_quad_rasterization * (nvfx->rasterizer->pipe.sprite_coord_enable | 1);
+
boolean emulate_sprite_flipping = sprite_coord_enable && nvfx->rasterizer->pipe.sprite_coord_mode;
unsigned key = emulate_sprite_flipping;
struct nvfx_fragment_program* fp;