summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-01-07 14:13:43 -0600
committerMarge Bot <[email protected]>2020-01-13 17:23:46 +0000
commit3498ab98f5ae9332d0ea8f312ecbc411ff1843c8 (patch)
tree6dd9c5f60946712c8ed31f5dc8ef2a046ff8d773 /src/compiler
parentf09db0bed5fa0227e10c8e911a118803f23a8fac (diff)
nir: Handle barriers with more granularity in combine_stores
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
Diffstat (limited to 'src/compiler')
-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,