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

Author: Christoph Bumiller <e0425...@student.tuwien.ac.at>
Date:   Sat Jun  9 15:32:02 2012 +0200

nv50: handle NEG,ABS modifiers for short RCP encoding

---

 src/gallium/drivers/nv50/nv50_pc_emit.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c 
b/src/gallium/drivers/nv50/nv50_pc_emit.c
index 2b177c6..30079ba 100644
--- a/src/gallium/drivers/nv50/nv50_pc_emit.c
+++ b/src/gallium/drivers/nv50/nv50_pc_emit.c
@@ -865,8 +865,10 @@ emit_flop(struct nv_pc *pc, struct nv_instruction *i)
    assert(SFILE(i, 0) == NV_FILE_GPR);
 
    if (!i->is_long) {
+      assert(i->opcode == NV_OP_RCP);
       emit_form_MUL(pc, i);
-      assert(i->opcode == NV_OP_RCP && !src0->mod);
+      if (src0->mod & NV_MOD_NEG) pc->emit[0] |= 0x00400000;
+      if (src0->mod & NV_MOD_ABS) pc->emit[0] |= 0x00008000;
       return;
    }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to