mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
pan/compiler: Fix handling of nir_intrinsic_scoped_barrier
Only emit anything if this is a control barrier, i.e. contains an execution scope. Also change the assertion to look at that scope instead of the memory scope. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339>
This commit is contained in:
parent
c80268a20d
commit
64a0266260
1 changed files with 9 additions and 5 deletions
|
|
@ -1655,11 +1655,15 @@ bi_emit_intrinsic(bi_builder *b, nir_intrinsic_instr *instr)
|
|||
break;
|
||||
|
||||
case nir_intrinsic_scoped_barrier:
|
||||
assert(b->shader->stage != MESA_SHADER_FRAGMENT);
|
||||
assert(nir_intrinsic_memory_scope(instr) > NIR_SCOPE_SUBGROUP &&
|
||||
"todo: subgroup barriers (different divergence rules)");
|
||||
|
||||
bi_barrier(b);
|
||||
if (nir_intrinsic_execution_scope(instr) != NIR_SCOPE_NONE) {
|
||||
assert(b->shader->stage != MESA_SHADER_FRAGMENT);
|
||||
assert(nir_intrinsic_execution_scope(instr) > NIR_SCOPE_SUBGROUP &&
|
||||
"todo: subgroup barriers (different divergence rules)");
|
||||
bi_barrier(b);
|
||||
}
|
||||
/* Blob doesn't seem to do anything for memory barriers, so no need to
|
||||
* check nir_intrinsic_memory_scope().
|
||||
*/
|
||||
break;
|
||||
|
||||
case nir_intrinsic_shared_atomic_add:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue