mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
aco: skip s_barrier if TCS patches are within subgroup
fossil-db (Sienna Cichlid): Totals from 518 (0.32% of 162293) affected shaders: Instrs: 124943 -> 123908 (-0.83%) CodeSize: 708764 -> 704624 (-0.58%) Latency: 618380 -> 618279 (-0.02%) InvThroughput: 214061 -> 214051 (-0.00%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16356>
This commit is contained in:
parent
c824104ce9
commit
152092b8ea
1 changed files with 9 additions and 9 deletions
|
|
@ -11004,13 +11004,6 @@ create_fs_exports(isel_context* ctx)
|
|||
ctx->block->kind |= block_kind_export_end;
|
||||
}
|
||||
|
||||
static void
|
||||
create_workgroup_barrier(Builder& bld)
|
||||
{
|
||||
bld.barrier(aco_opcode::p_barrier,
|
||||
memory_sync_info(storage_shared, semantic_acqrel, scope_workgroup), scope_workgroup);
|
||||
}
|
||||
|
||||
static void
|
||||
emit_stream_output(isel_context* ctx, Temp const* so_buffers, Temp const* so_write_offset,
|
||||
const struct radv_stream_output* output)
|
||||
|
|
@ -11522,8 +11515,15 @@ select_program(Program* program, unsigned shader_count, struct nir_shader* const
|
|||
bool tcs_skip_barrier = ctx.stage == vertex_tess_control_hs &&
|
||||
ctx.tcs_temp_only_inputs == nir->info.inputs_read;
|
||||
|
||||
if (!ngg_gs && !tcs_skip_barrier)
|
||||
create_workgroup_barrier(bld);
|
||||
if (!ngg_gs && !tcs_skip_barrier) {
|
||||
sync_scope scope =
|
||||
ctx.stage == vertex_tess_control_hs &&
|
||||
program->wave_size % ctx.options->key.tcs.tess_input_vertices == 0
|
||||
? scope_subgroup
|
||||
: scope_workgroup;
|
||||
bld.barrier(aco_opcode::p_barrier,
|
||||
memory_sync_info(storage_shared, semantic_acqrel, scope), scope);
|
||||
}
|
||||
|
||||
if (ctx.stage == vertex_geometry_gs || ctx.stage == tess_eval_geometry_gs) {
|
||||
ctx.gs_wave_id = bld.pseudo(aco_opcode::p_extract, bld.def(s1, m0), bld.def(s1, scc),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue