From f4fb4d1027ec6e7d9d3a410e5dde177b8f27a57e Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sat, 9 Jun 2012 15:32:02 +0200 Subject: [PATCH] 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; } -- 1.7.3.4