From: Kenneth Graunke Date: Sun, 20 Feb 2011 00:48:24 +0000 (-0800) Subject: i965/fs: Correctly set up gl_FragCoord.w on Sandybridge. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a3b28113c3d23ba21bb8b8f5ebab7c567083a6d;p=mesa.git 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 --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index c6c64972cd3..30e3bd54469 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -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; }