Mesa (master): r600/sfn: Correctly update the number of literals when forcing a new
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 26 06:30:48 UTC 2020
Module: Mesa
Branch: master
Commit: cead23cb8ac3fbfdcbc69df024d7ef0c4d9cd1b9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cead23cb8ac3fbfdcbc69df024d7ef0c4d9cd1b9
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Sat May 23 18:28:05 2020 +0200
r600/sfn: Correctly update the number of literals when forcing a new
group
When forcing a new instruction group by adding a ALU_OP_NOP, the
literals for the instruction that triggered this must be taken into
account for the next group, so update the number of literals
accordingly.
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
---
src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
index dd6e9f63c07..415e17a903a 100644
--- a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
@@ -247,6 +247,7 @@ bool AssemblyFromShaderLegacyImpl::emit_alu(const AluInstruction& ai, ECFAluOpCo
return false;
}
+ unsigned old_nliterals_in_group = m_nliterals_in_group;
for (unsigned i = 0; i < ai.n_sources(); ++i) {
auto& s = ai.src(i);
if (s.type() == Value::literal)
@@ -266,7 +267,7 @@ bool AssemblyFromShaderLegacyImpl::emit_alu(const AluInstruction& ai, ECFAluOpCo
if (retval)
return false;
memset(&alu, 0, sizeof(alu));
- m_nliterals_in_group = 0;
+ m_nliterals_in_group -= old_nliterals_in_group;
}
alu.op = opcode_map.at(ai.opcode());
More information about the mesa-commit
mailing list