i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 20 Feb 2011 00:48:24 +0000 (16:48 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 22 Feb 2011 18:52:44 +0000 (10:52 -0800)
pixel_w is the final result; wpos_w is used on gen4 to compute it.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs.cpp

index c6c64972cd3cb281f451a37e05af6629567114f9..30e3bd544693490fea9cfdcd6f39a2b2999ab71e 100644 (file)
@@ -494,7 +494,7 @@ fs_visitor::emit_fragcoord_interpolation(ir_variable *ir)
    wpos.reg_offset++;
 
    /* gl_FragCoord.w: Already set up in emit_interpolation */
-   emit(fs_inst(BRW_OPCODE_MOV, wpos, this->wpos_w));
+   emit(fs_inst(BRW_OPCODE_MOV, wpos, this->pixel_w));
 
    return reg;
 }