mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
This commit is contained in:
parent
12381a0410
commit
cead23cb8a
1 changed files with 2 additions and 1 deletions
|
|
@ -247,6 +247,7 @@ bool AssemblyFromShaderLegacyImpl::emit_alu(const AluInstruction& ai, ECFAluOpCo
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned old_nliterals_in_group = m_nliterals_in_group;
|
||||||
for (unsigned i = 0; i < ai.n_sources(); ++i) {
|
for (unsigned i = 0; i < ai.n_sources(); ++i) {
|
||||||
auto& s = ai.src(i);
|
auto& s = ai.src(i);
|
||||||
if (s.type() == Value::literal)
|
if (s.type() == Value::literal)
|
||||||
|
|
@ -266,7 +267,7 @@ bool AssemblyFromShaderLegacyImpl::emit_alu(const AluInstruction& ai, ECFAluOpCo
|
||||||
if (retval)
|
if (retval)
|
||||||
return false;
|
return false;
|
||||||
memset(&alu, 0, sizeof(alu));
|
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());
|
alu.op = opcode_map.at(ai.opcode());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue