aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-02-22 18:57:09 +0000
committerJosé Fonseca <[email protected]>2010-02-22 21:47:18 +0000
commit066fd70639a1681bfde0a8e1fb7fdca7897158e5 (patch)
tree18b14f122a49c13732900c6edafa42eee206854d
parent7384cdf651dc69098f4d988dd3b217879ec63336 (diff)
svga: Emit a scalar rcp in shadow maps.
Small improvement in Lightsmark 2008.
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_insn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index 9b1b5507cb8..3d4f56a67bd 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -1417,21 +1417,21 @@ static boolean emit_tex(struct svga_shader_emitter *emit,
/* Divide texcoord R by Q */
if (!submit_op1( emit, inst_token( SVGA3DOP_RCP ),
- src0_zdivw,
+ writemask(src0_zdivw, TGSI_WRITEMASK_X),
scalar(src0, TGSI_SWIZZLE_W) ))
return FALSE;
if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ),
- src0_zdivw,
+ writemask(src0_zdivw, TGSI_WRITEMASK_X),
scalar(src0, TGSI_SWIZZLE_Z),
- src(src0_zdivw) ))
+ scalar(src(src0_zdivw), TGSI_SWIZZLE_X) ))
return FALSE;
if (!emit_select(
emit,
emit->key.fkey.tex[src1.base.num].compare_func,
writemask( dst, TGSI_WRITEMASK_XYZ ),
- src(src0_zdivw),
+ scalar(src(src0_zdivw), TGSI_SWIZZLE_X),
tex_src_x))
return FALSE;
}