From a46aa3dc2e4c5462630d40e152904b7d163c9233 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 4 May 2020 18:54:11 +0100 Subject: [PATCH] nir: add missing group_memory_barrier handling Totals from 2 (0.00% of 127638) affected shaders: VGPRs: 164 -> 168 (+2.44%) CodeSize: 18420 -> 18756 (+1.82%) Instrs: 3658 -> 3700 (+1.15%) Cycles: 82912 -> 83080 (+0.20%) VMEM: 70 -> 69 (-1.43%) PreVGPRs: 155 -> 168 (+8.39%) Signed-off-by: Rhys Perry Reviewed-by: Caio Marcelo de Oliveira Filho CC: Part-of: --- src/compiler/nir/nir_opt_copy_prop_vars.c | 1 + src/compiler/nir/nir_opt_dead_write_vars.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c index bfbbb4cd55e..77bf2c94dde 100644 --- a/src/compiler/nir/nir_opt_copy_prop_vars.c +++ b/src/compiler/nir/nir_opt_copy_prop_vars.c @@ -166,6 +166,7 @@ gather_vars_written(struct copy_prop_var_state *state, nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); switch (intrin->intrinsic) { case nir_intrinsic_control_barrier: + case nir_intrinsic_group_memory_barrier: case nir_intrinsic_memory_barrier: written->modes |= nir_var_shader_out | nir_var_mem_ssbo | diff --git a/src/compiler/nir/nir_opt_dead_write_vars.c b/src/compiler/nir/nir_opt_dead_write_vars.c index 5a8e2ffaaa0..c77b56a476c 100644 --- a/src/compiler/nir/nir_opt_dead_write_vars.c +++ b/src/compiler/nir/nir_opt_dead_write_vars.c @@ -133,6 +133,7 @@ remove_dead_write_vars_local(void *mem_ctx, nir_block *block) nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); switch (intrin->intrinsic) { case nir_intrinsic_control_barrier: + case nir_intrinsic_group_memory_barrier: case nir_intrinsic_memory_barrier: { clear_unused_for_modes(&unused_writes, nir_var_shader_out | nir_var_mem_ssbo | -- 2.30.2