From 58b9e11084707f78c43d139a3289d39dabf15c56 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 22 May 2015 16:40:08 -0400 Subject: nvc0/ir: set ftz when sources are floats, not just destinations In the case of a compare, the destination might be a predicate, but we still want to flush denorms. Signed-off-by: Ilia Mirkin Cc: "10.5 10.6" (cherry picked from commit d1eea18a595a468dbc2267a8d14197a3b1a5a4b6) --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 4000812f8b1..b758c1cb3ba 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -77,8 +77,7 @@ void NVC0LegalizeSSA::handleFTZ(Instruction *i) { // Only want to flush float inputs - if (i->sType != TYPE_F32) - return; + assert(i->sType == TYPE_F32); // If we're already flushing denorms (and NaN's) to zero, no need for this. if (i->dnz) @@ -106,7 +105,7 @@ NVC0LegalizeSSA::visit(BasicBlock *bb) Instruction *next; for (Instruction *i = bb->getEntry(); i; i = next) { next = i->next; - if (i->dType == TYPE_F32) { + if (i->sType == TYPE_F32) { if (prog->getType() != Program::TYPE_COMPUTE) handleFTZ(i); continue; -- cgit v1.2.3