From 066fd70639a1681bfde0a8e1fb7fdca7897158e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 22 Feb 2010 18:57:09 +0000 Subject: [PATCH] svga: Emit a scalar rcp in shadow maps. Small improvement in Lightsmark 2008. --- src/gallium/drivers/svga/svga_tgsi_insn.c | 8 ++++---- 1 file 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; } -- 2.30.2