Mesa (glsl2): ir_to_mesa: Actually initialize the undef register for scalar_op1.

Eric Anholt anholt at kemper.freedesktop.org
Mon Jun 28 15:07:36 PDT 2010


Module: Mesa
Branch: glsl2
Commit: 59a23d7fb93603b2449db4c5d786934a07aebfcb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=59a23d7fb93603b2449db4c5d786934a07aebfcb

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jun 28 15:02:51 2010 -0700

ir_to_mesa: Actually initialize the undef register for scalar_op1.

Fixes glsl-sin, glsl-cos on 965, where we rely on unused src arguments
in the VS having a file of PROGRAM_UNDEFINED.

---

 src/mesa/shader/ir_to_mesa.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 0f035b9..24b03e1 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -366,7 +366,7 @@ ir_to_mesa_visitor::ir_to_mesa_emit_scalar_op1(ir_instruction *ir,
 					       ir_to_mesa_dst_reg dst,
 					       ir_to_mesa_src_reg src0)
 {
-   ir_to_mesa_src_reg undef;
+   ir_to_mesa_src_reg undef = ir_to_mesa_undef;
 
    undef.swizzle = SWIZZLE_XXXX;
 



More information about the mesa-commit mailing list