summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/nir/nir_opt_combine_stores.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/compiler/nir/nir_opt_combine_stores.c b/src/compiler/nir/nir_opt_combine_stores.c
index c59f3ed9936..6bd2c534971 100644
--- a/src/compiler/nir/nir_opt_combine_stores.c
+++ b/src/compiler/nir/nir_opt_combine_stores.c
@@ -306,16 +306,20 @@ combine_stores_block(struct combine_stores_state *state, nir_block *block)
case nir_intrinsic_barrier:
case nir_intrinsic_group_memory_barrier:
case nir_intrinsic_memory_barrier:
- case nir_intrinsic_memory_barrier_atomic_counter:
- case nir_intrinsic_memory_barrier_buffer:
- case nir_intrinsic_memory_barrier_image:
- case nir_intrinsic_memory_barrier_shared:
- /* TODO: Be more granular depending on the barrier. */
combine_stores_with_modes(state, nir_var_shader_out |
nir_var_mem_ssbo |
nir_var_mem_shared);
break;
+ case nir_intrinsic_memory_barrier_atomic_counter:
+ case nir_intrinsic_memory_barrier_buffer:
+ combine_stores_with_modes(state, nir_var_mem_ssbo);
+ break;
+
+ case nir_intrinsic_memory_barrier_shared:
+ combine_stores_with_modes(state, nir_var_mem_shared);
+ break;
+
case nir_intrinsic_scoped_memory_barrier:
if (nir_intrinsic_memory_semantics(intrin) & NIR_MEMORY_RELEASE) {
combine_stores_with_modes(state,