From: Ilia Mirkin Date: Sun, 28 Sep 2014 16:07:03 +0000 (-0400) Subject: gk110/ir: add dnz flag emission for fmul/fmad X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c74be01e80fcdd7feabc0f27df4aebe66abb626e;p=mesa.git gk110/ir: add dnz flag emission for fmul/fmad Signed-off-by: Ilia Mirkin Cc: "10.2 10.3" --- 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 23a6ac7528d..d8adc93eb5c 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -140,6 +140,7 @@ private: code[(0x##b) / 32] |= 1 << ((0x##b) % 32) #define FTZ_(b) if (i->ftz) code[(0x##b) / 32] |= 1 << ((0x##b) % 32) +#define DNZ_(b) if (i->dnz) code[(0x##b) / 32] |= 1 << ((0x##b) % 32) #define SAT_(b) if (i->saturate) code[(0x##b) / 32] |= 1 << ((0x##b) % 32) @@ -464,6 +465,7 @@ CodeEmitterGK110::emitFMAD(const Instruction *i) SAT_(35); RND_(36, F); FTZ_(38); + DNZ_(39); bool neg1 = (i->src(0).mod ^ i->src(1).mod).neg(); @@ -487,6 +489,7 @@ CodeEmitterGK110::emitFMUL(const Instruction *i) emitForm_L(i, 0x200, 0x2, Modifier(0)); FTZ_(38); + DNZ_(39); SAT_(3a); if (neg) code[1] ^= 1 << 22; @@ -499,6 +502,7 @@ CodeEmitterGK110::emitFMUL(const Instruction *i) RND_(2a, F); FTZ_(2f); + DNZ_(30); SAT_(35); if (code[0] & 0x1) {