mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
r300: remove unused barrier code from ntr
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Filip Gawin <filip.gawin@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23437>
This commit is contained in:
parent
b5c2833258
commit
85c10bab8c
1 changed files with 0 additions and 46 deletions
|
|
@ -1630,50 +1630,6 @@ ntr_emit_load_sysval(struct ntr_compile *c, nir_intrinsic_instr *instr)
|
|||
ntr_store(c, &instr->def, sv);
|
||||
}
|
||||
|
||||
static void
|
||||
ntr_emit_barrier(struct ntr_compile *c, nir_intrinsic_instr *intr)
|
||||
{
|
||||
bool compute = gl_shader_stage_is_compute(c->s->info.stage);
|
||||
|
||||
if (nir_intrinsic_memory_scope(intr) != SCOPE_NONE) {
|
||||
nir_variable_mode modes = nir_intrinsic_memory_modes(intr);
|
||||
unsigned membar = 0;
|
||||
|
||||
if (modes & nir_var_image)
|
||||
membar |= TGSI_MEMBAR_SHADER_IMAGE;
|
||||
|
||||
if (modes & nir_var_mem_shared)
|
||||
membar |= TGSI_MEMBAR_SHARED;
|
||||
|
||||
/* Atomic counters are lowered to SSBOs, there's no NIR mode corresponding
|
||||
* exactly to atomics. Take the closest match.
|
||||
*/
|
||||
if (modes & nir_var_mem_ssbo)
|
||||
membar |= TGSI_MEMBAR_SHADER_BUFFER | TGSI_MEMBAR_ATOMIC_BUFFER;
|
||||
|
||||
if (modes & nir_var_mem_global)
|
||||
membar |= TGSI_MEMBAR_SHADER_BUFFER;
|
||||
|
||||
/* If we only need workgroup scope (not device-scope), we might be able to
|
||||
* optimize a bit.
|
||||
*/
|
||||
if (membar && compute &&
|
||||
nir_intrinsic_memory_scope(intr) == SCOPE_WORKGROUP) {
|
||||
|
||||
membar |= TGSI_MEMBAR_THREAD_GROUP;
|
||||
}
|
||||
|
||||
/* Only emit a memory barrier if there are any relevant modes */
|
||||
if (membar)
|
||||
ntr_MEMBAR(c, ureg_imm1u(c->ureg, membar));
|
||||
}
|
||||
|
||||
if (nir_intrinsic_execution_scope(intr) != SCOPE_NONE) {
|
||||
assert(compute || c->s->info.stage == MESA_SHADER_TESS_CTRL);
|
||||
ntr_BARRIER(c);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ntr_emit_intrinsic(struct ntr_compile *c, nir_intrinsic_instr *instr)
|
||||
{
|
||||
|
|
@ -2553,8 +2509,6 @@ const void *nir_to_rc_options(struct nir_shader *s,
|
|||
}
|
||||
} while (progress);
|
||||
|
||||
NIR_PASS_V(s, nir_opt_combine_barriers, NULL, NULL);
|
||||
|
||||
NIR_PASS_V(s, nir_lower_int_to_float);
|
||||
NIR_PASS_V(s, nir_lower_bool_to_float,
|
||||
!options->lower_cmp && !options->lower_fabs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue