We have one slot for the predicate (todo fix this value)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24297>
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
{
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;