i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.

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>
This commit is contained in:
Kenneth Graunke 2011-02-19 16:48:24 -08:00
parent df2aef0e19
commit 4a3b28113c
1 changed files with 1 additions and 1 deletions

View 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;
}