From: Vinson Lee Date: Thu, 18 Feb 2010 05:38:17 +0000 (-0800) Subject: svga: Silence uninitialized variable warnings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f7af8440568d083dd9bb1370b785b60f5a141f0;p=mesa.git svga: Silence uninitialized variable warnings. --- diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 6debd98b7a1..87aed39f78f 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 ) ). */