Tess shaders also use these barriers.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
return emit_load_local_shared(instr);
case nir_intrinsic_store_local_shared_r600:
return emit_store_local_shared(instr);
+ case nir_intrinsic_control_barrier:
+ case nir_intrinsic_memory_barrier_tcs_patch:
+ return emit_barrier(instr);
+
default:
fprintf(stderr, "r600-nir: Unsupported intrinsic %d\n", instr->intrinsic);
return false;
return false;
}
+bool ShaderFromNirProcessor::emit_barrier(UNUSED nir_intrinsic_instr* instr)
+{
+ AluInstruction *ir = new AluInstruction(op0_group_barrier);
+ ir->set_flag(alu_last_instr);
+ emit_instruction(ir);
+ return true;
+}
+
+
bool ShaderFromNirProcessor::load_preloaded_value(const nir_dest& dest, int chan, PValue value, bool as_last)
{
if (!dest.is_ssa) {
bool emit_load_local_shared(nir_intrinsic_instr* instr);
bool emit_store_local_shared(nir_intrinsic_instr* instr);
+ bool emit_barrier(nir_intrinsic_instr* instr);
const GPRVector *output_register(unsigned location) const;
bool load_preloaded_value(const nir_dest& dest, int chan, PValue value,
return emit_load_3vec(instr, m_workgroup_id);
case nir_intrinsic_load_num_work_groups:
return emit_load_num_work_groups(instr);
- case nir_intrinsic_control_barrier:
- return emit_barrier(instr);
default:
return false;
}
return true;
}
-bool ComputeShaderFromNir::emit_barrier(UNUSED nir_intrinsic_instr* instr)
-{
- AluInstruction *ir = new AluInstruction(op0_group_barrier);
- ir->set_flag(alu_last_instr);
- emit_instruction(ir);
- return true;
-}
-
bool ComputeShaderFromNir::emit_load_num_work_groups(nir_intrinsic_instr* instr)
{
int temp = allocate_temp_register();
bool emit_load_3vec(nir_intrinsic_instr* instr, const std::array<PValue,3>& src);
bool emit_load_num_work_groups(nir_intrinsic_instr* instr);
- bool emit_barrier(nir_intrinsic_instr* instr);
int m_reserved_registers;
std::array<PValue,3> m_workgroup_id;