Mesa (master): i965: Make the cube mapping RCP use a writemask.

Eric Anholt anholt at kemper.freedesktop.org
Wed Aug 12 21:11:01 UTC 2009


Module: Mesa
Branch: master
Commit: d64649a316858a390bafe2aa619be3cf2c98ffde
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d64649a316858a390bafe2aa619be3cf2c98ffde

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Aug 12 13:49:06 2009 -0700

i965: Make the cube mapping RCP use a writemask.

Fixes cube mapping since the scalar changes.

---

 src/mesa/drivers/dri/i965/brw_wm_fp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 8e37a01..0eac1bf 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -716,7 +716,7 @@ static void precalc_tex( struct brw_wm_compile *c,
 
        /* tmp0 = 1 / tmp1 */
        emit_op(c, OPCODE_RCP,
-               tmp0,
+               dst_mask(tmp0, WRITEMASK_X),
                0,
                tmp1src,
                src_undef(),
@@ -727,7 +727,7 @@ static void precalc_tex( struct brw_wm_compile *c,
                tmpcoord,
                0,
                src0,
-               tmp0src,
+               src_swizzle1(tmp0src, SWIZZLE_X),
                src_undef());
 
        release_temp(c, tmp0);




More information about the mesa-commit mailing list