From 3f7af8440568d083dd9bb1370b785b60f5a141f0 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 17 Feb 2010 21:38:17 -0800 Subject: svga: Silence uninitialized variable warnings. --- src/gallium/drivers/svga/svga_tgsi_insn.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 6debd98b7a..87aed39f78 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -1811,6 +1811,8 @@ static boolean emit_exp(struct svga_shader_emitter *emit, fraction = dst; else if (dst.mask & TGSI_WRITEMASK_X) fraction = get_temp( emit ); + else + fraction.value = 0; /* If y is being written, fill it with src0 - floor(src0). */ @@ -2005,10 +2007,14 @@ static boolean emit_log(struct svga_shader_emitter *emit, struct src_register abs_src0; SVGA3dShaderDestToken log2_abs; + abs_tmp.value = 0; + if (dst.mask & TGSI_WRITEMASK_Z) log2_abs = dst; else if (dst.mask & TGSI_WRITEMASK_XY) log2_abs = get_temp( emit ); + else + log2_abs.value = 0; /* If z is being written, fill it with log2( abs( src0 ) ). */ -- cgit v1.2.3