int m_loop_nesting;
int m_nliterals_in_group;
std::set<int> vtx_fetch_results;
+ bool m_last_op_was_barrier;
};
if (i->type() != Instruction::vtx)
vtx_fetch_results.clear();
+ m_last_op_was_barrier &= i->type() == Instruction::alu;
+
sfn_log << SfnLog::assembly << "Emit from '" << *i << "\n";
switch (i->type()) {
case Instruction::alu:
has_pos_output(false),
has_param_output(false),
m_loop_nesting(0),
- m_nliterals_in_group(0)
+ m_nliterals_in_group(0),
+ m_last_op_was_barrier(false)
{
m_max_color_exports = MAX2(m_key->ps.nr_cbufs, 1);
}
return false;
}
+ if (m_last_op_was_barrier && ai.opcode() == op0_group_barrier)
+ return true;
+
+ m_last_op_was_barrier = ai.opcode() == op0_group_barrier;
+
unsigned old_nliterals_in_group = m_nliterals_in_group;
for (unsigned i = 0; i < ai.n_sources(); ++i) {
auto& s = ai.src(i);