summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_setup.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-03-20 20:25:34 -0600
committerBrian Paul <brianp@vmware.com>2009-03-20 20:29:07 -0600
commit401cbd0d2365e5b2d371a2a01edf1cecca4a99dd (patch)
tree1db298c9d76bd4bad0831cdabf12b635e2941903 /src/gallium/drivers/softpipe/sp_setup.c
parent1f45ae0813f72fa92f52e0ebc440922362dc7cce (diff)
gallium: remove use of origin_lower_left
This was used to indicate OpenGL's lower-left origin for fragment window coordinates for polygon stipple and gl_FragCoord. Now: - fragment coordinate origin is always upper-left corner - GL polygon stipple is inverted and shifted before given to gallium - GL fragment programs that use INPUT[WPOS] are modified to use an inverted window coord which is placed in a temp register. Note: the origin_lower_left field still exists in pipe_rasterizer_state. Remove it when all the drivers, etc. no longer reference it.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_setup.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 0925653b5d..96cb09b905 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -732,18 +732,9 @@ setup_fragcoord_coeff(struct setup_context *setup, uint slot)
setup->coef[slot].dadx[0] = 1.0;
setup->coef[slot].dady[0] = 0.0;
/*Y*/
- if (setup->softpipe->rasterizer->origin_lower_left) {
- /* y=0=bottom */
- const int winHeight = setup->softpipe->framebuffer.height;
- setup->coef[slot].a0[1] = (float) (winHeight - 1);
- setup->coef[slot].dady[1] = -1.0;
- }
- else {
- /* y=0=top */
- setup->coef[slot].a0[1] = 0.0;
- setup->coef[slot].dady[1] = 1.0;
- }
+ setup->coef[slot].a0[1] = 0.0;
setup->coef[slot].dadx[1] = 0.0;
+ setup->coef[slot].dady[1] = 1.0;
/*Z*/
setup->coef[slot].a0[2] = setup->posCoef.a0[2];
setup->coef[slot].dadx[2] = setup->posCoef.dadx[2];