From 5dc35cf1d174b21a1364be86b403ad26c6be550c Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 5 Dec 2022 16:29:27 +0100 Subject: [PATCH] r600/sfn: Allow copy prop into GDS sources values Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_instr_mem.h | 3 ++- src/gallium/drivers/r600/sfn/sfn_optimizer.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_mem.h b/src/gallium/drivers/r600/sfn/sfn_instr_mem.h index 69d59cc..4e9b0c1 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instr_mem.h +++ b/src/gallium/drivers/r600/sfn/sfn_instr_mem.h @@ -47,7 +47,8 @@ public: bool do_ready() const override; auto opcode() const { return m_op; } - auto src() const { return m_src; } + auto& src() { return m_src; } + auto& src() const { return m_src; } const auto& dest() const { return m_dest; } auto& dest() { return m_dest; } diff --git a/src/gallium/drivers/r600/sfn/sfn_optimizer.cpp b/src/gallium/drivers/r600/sfn/sfn_optimizer.cpp index 0b4ae5d..1f89649 100644 --- a/src/gallium/drivers/r600/sfn/sfn_optimizer.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_optimizer.cpp @@ -32,6 +32,7 @@ #include "sfn_instr_export.h" #include "sfn_instr_fetch.h" #include "sfn_instr_lds.h" +#include "sfn_instr_mem.h" #include "sfn_instr_tex.h" #include "sfn_peephole.h" #include "sfn_valuefactory.h" @@ -251,7 +252,7 @@ public: void visit(StreamOutInstr *instr) override { (void)instr; } void visit(MemRingOutInstr *instr) override { (void)instr; } void visit(EmitVertexInstr *instr) override { (void)instr; } - void visit(GDSInstr *instr) override { (void)instr; }; + void visit(GDSInstr *instr) override; void visit(WriteTFInstr *instr) override { (void)instr; }; void visit(RatInstr *instr) override { (void)instr; }; @@ -412,6 +413,11 @@ CopyPropFwdVisitor::visit(TexInstr *instr) propagate_to(instr->src(), instr); } +void CopyPropFwdVisitor::visit(GDSInstr *instr) +{ + propagate_to(instr->src(), instr); +} + void CopyPropFwdVisitor::visit(ExportInstr *instr) { -- 2.7.4