r600/sfn: count LDS queue pop reads separately in assembler
Otherwise the check whether the fetches and reads are balanced could fail. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
This commit is contained in:
parent
233f246bdf
commit
8db31e0fe6
|
@ -309,7 +309,7 @@ void AssamblerVisitor::emit_alu_op(const AluInstr& ai)
|
|||
alu.src[i].kc_rel = 1;
|
||||
}
|
||||
|
||||
if (ai.has_lds_access()) {
|
||||
if (ai.has_lds_queue_read()) {
|
||||
assert(m_bc->cf_last->nlds_read > 0);
|
||||
m_bc->cf_last->nlds_read--;
|
||||
}
|
||||
|
|
|
@ -788,14 +788,20 @@ bool AluInstr::propagate_death()
|
|||
|
||||
bool AluInstr::has_lds_access() const
|
||||
{
|
||||
if (has_alu_flag(alu_is_lds))
|
||||
return true;
|
||||
return has_alu_flag(alu_is_lds) || has_lds_queue_read();
|
||||
}
|
||||
|
||||
for (auto& s : m_src)
|
||||
if (s->as_inline_const() &&
|
||||
(s->as_inline_const()->sel() == ALU_SRC_LDS_OQ_A_POP))
|
||||
bool AluInstr::has_lds_queue_read() const
|
||||
{
|
||||
for (auto& s : m_src) {
|
||||
auto ic = s->as_inline_const();
|
||||
if (!ic)
|
||||
continue;
|
||||
|
||||
if (ic->sel() == ALU_SRC_LDS_OQ_A_POP ||
|
||||
ic->sel() == ALU_SRC_LDS_OQ_B_POP)
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ public:
|
|||
bool is_equal_to(const AluInstr& lhs) const;
|
||||
|
||||
bool has_lds_access() const;
|
||||
bool has_lds_queue_read() const;
|
||||
|
||||
static const std::map<ECFAluOpCode, std::string> cf_map;
|
||||
static const std::map<AluBankSwizzle, std::string> bank_swizzle_map;
|
||||
|
|
Loading…
Reference in New Issue