mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
r600/sfn: override slot count for IfInstr
We have one slot for the predicate (todo fix this value) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24297>
This commit is contained in:
parent
c517defbdd
commit
bd7a9b7f4e
2 changed files with 12 additions and 0 deletions
|
|
@ -152,6 +152,16 @@ IfInstr::is_equal_to(const IfInstr& rhs) const
|
|||
return m_predicate->equal_to(*rhs.m_predicate);
|
||||
}
|
||||
|
||||
uint32_t IfInstr::slots() const
|
||||
{
|
||||
/* If we hava a literal value in the predicate evaluation, then
|
||||
* we need at most two alu slots, otherwise it's just one. */
|
||||
for (auto s : m_predicate->sources())
|
||||
if (s->as_literal())
|
||||
return 2;
|
||||
return 1;
|
||||
};
|
||||
|
||||
void
|
||||
IfInstr::accept(ConstInstrVisitor& visitor) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ public:
|
|||
AluInstr *predicate() const { return m_predicate; }
|
||||
AluInstr *predicate() { return m_predicate; }
|
||||
|
||||
uint32_t slots() const override;
|
||||
|
||||
void accept(ConstInstrVisitor& visitor) const override;
|
||||
void accept(InstrVisitor& visitor) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue