mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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 d1eea18a59)
This commit is contained in:
parent
90644f9217
commit
45986bd391
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue