Mesa (glsl2): ir_to_mesa: Send the negate field on to Mesa IR.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jun 30 15:51:40 PDT 2010


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 30 15:44:01 2010 -0700

ir_to_mesa: Send the negate field on to Mesa IR.

Fixes glsl-fs-neg.

---

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

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 61a1f30..8bfa468 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -473,6 +473,7 @@ ir_to_mesa_visitor::get_temp(const glsl_type *type)
       swizzle[i] = type->vector_elements - 1;
    src_reg.swizzle = MAKE_SWIZZLE4(swizzle[0], swizzle[1],
 				   swizzle[2], swizzle[3]);
+   src_reg.negate = 0;
 
    return src_reg;
 }
@@ -1399,6 +1400,7 @@ mesa_src_reg_from_ir_src_reg(ir_to_mesa_src_reg reg)
    mesa_reg.Index = reg.index;
    mesa_reg.Swizzle = reg.swizzle;
    mesa_reg.RelAddr = reg.reladdr;
+   mesa_reg.Negate = reg.negate;
 
    return mesa_reg;
 }



More information about the mesa-commit mailing list