diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2015-05-22 16:40:08 -0400 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-05-27 11:41:37 +0100 |
commit | 45986bd391e6ebc1bdb72c0a81a10ec363369ad0 (patch) | |
tree | 1d5740d9eea129af50d6f184ff3e1048be5ea10c | |
parent | 90644f9217b66539b52635475eb8c1367f551c05 (diff) | |
download | mesa-45986bd391e6ebc1bdb72c0a81a10ec363369ad0.tar.gz |
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 <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d1eea18a595a468dbc2267a8d14197a3b1a5a4b6)
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 5 |
1 files 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 b61f3c49bb9..6d45e22121e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -100,8 +100,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) @@ -129,7 +128,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; |