diff options
author | Eric Anholt <eric@anholt.net> | 2009-03-23 16:29:31 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-03-23 22:52:51 -0700 |
commit | 699db6d842c52d0b3b98b320f8ef1104a65fa783 (patch) | |
tree | 90b80117968b4cb7ec3fe186e7a24b28339774c0 /src/mesa/drivers/dri/i965/brw_wm_fp.c | |
parent | 411d913ccea362dbd75411266d7abb685214ee93 (diff) |
i965: Fix glFrontFacing in twoside GLSL demo.
This also cuts instructions by just using the existing bit in the payload
rather than computing it from the determinant in the SF unit and passing it
as a varying down to the WM. Something still goes wrong with getting the
backface color right, but a simpler shader appears to get the right result.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_fp.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_fp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index 63a7593449..a7f5f1b9a2 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -58,7 +58,8 @@ static const char *wm_opcode_strings[] = { "PINTERP", "CINTERP", "WPOSXY", - "FB_WRITE" + "FB_WRITE", + "FRONTFACING", }; #if 0 @@ -384,12 +385,12 @@ static void emit_interp( struct brw_wm_compile *c, /* Move the front facing value into FOGC.y if it's needed. */ if (c->fp->program.UsesFrontFacing) { emit_op(c, - WM_PINTERP, + WM_FRONTFACING, dst_mask(dst, WRITEMASK_Y), 0, - interp, - deltas, - get_pixel_w(c)); + src_undef(), + src_undef(), + src_undef()); } else { emit_op(c, OPCODE_MOV, |