Mesa (master): nv50/ir/gk110: fix set with f32 dest

Ilia Mirkin imirkin at kemper.freedesktop.org
Thu May 8 00:44:24 UTC 2014


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

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue May  6 19:54:59 2014 -0400

nv50/ir/gk110: fix set with f32 dest

Should fix comparison opcodes like SGE/SLT/etc which expected a float to
be returned. These were previously getting integer 0/-1 values.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Ben Skeggs <bskeggs at redhat.com>
Cc: 10.2 <mesa-stable at lists.freedesktop.org>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
index 5992c54..b8d0d3e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -915,6 +915,9 @@ CodeEmitterGK110::emitSET(const CmpInstruction *i)
          modNegAbsF32_3b(i, 1);
       }
       FTZ_(3a);
+
+      if (i->dType == TYPE_F32)
+         code[1] |= 1 << 23;
    }
    if (i->sType == TYPE_S32)
       code[1] |= 1 << 19;




More information about the mesa-commit mailing list