mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
r600/sfn: Add source mod propagation also to fp64 ops
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23754>
This commit is contained in:
parent
255eee10ac
commit
e853332805
2 changed files with 9 additions and 5 deletions
|
|
@ -1960,8 +1960,6 @@ emit_alu_neg(const nir_alu_instr& alu, Shader& shader)
|
|||
{
|
||||
auto& value_factory = shader.value_factory();
|
||||
|
||||
auto group = new AluGroup();
|
||||
|
||||
AluInstr *ir = nullptr;
|
||||
|
||||
for (unsigned i = 0; i < nir_dest_num_components(alu.dest.dest); ++i) {
|
||||
|
|
@ -1970,13 +1968,13 @@ emit_alu_neg(const nir_alu_instr& alu, Shader& shader)
|
|||
value_factory.dest(alu.dest, 2 * i + c, pin_chan),
|
||||
value_factory.src64(alu.src[0], i, c),
|
||||
{alu_write});
|
||||
group->add_instruction(ir);
|
||||
shader.emit_instruction(ir);
|
||||
}
|
||||
ir->set_source_mod(0, AluInstr::mod_neg);
|
||||
}
|
||||
if (ir)
|
||||
ir->set_alu_flag(alu_last_instr);
|
||||
shader.emit_instruction(group);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "sfn_peephole.h"
|
||||
#include "sfn_instr_alugroup.h"
|
||||
|
||||
namespace r600 {
|
||||
|
||||
|
|
@ -122,7 +123,7 @@ PeepholeVisitor::visit(AluInstr *instr)
|
|||
}
|
||||
|
||||
auto opinfo = alu_ops.at(instr->opcode());
|
||||
if (opinfo.can_srcmod && !opinfo.is_fp64)
|
||||
if (opinfo.can_srcmod)
|
||||
apply_source_mods(instr);
|
||||
}
|
||||
|
||||
|
|
@ -138,6 +139,11 @@ PeepholeVisitor::convert_to_mov(AluInstr *alu, int src_idx)
|
|||
void
|
||||
PeepholeVisitor::visit(UNUSED AluGroup *instr)
|
||||
{
|
||||
for (auto alu : *instr) {
|
||||
if (!alu)
|
||||
continue;
|
||||
visit(alu);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue