aco: use nir_opt_uniform_atomics
Significantly improves performance of a Control compute shader. Also seems to increase FPS at the very start of the game by ~9% (RX 580, 1080p, medium settings, no MSAA). fossil-db (Navi): Totals from 315 (0.23% of 135946) affected shaders: SGPRs: 18296 -> 18336 (+0.22%); split: -0.26%, +0.48% VGPRs: 11856 -> 11844 (-0.10%); split: -0.81%, +0.71% CodeSize: 2233800 -> 2457508 (+10.01%) MaxWaves: 4506 -> 4497 (-0.20%); split: +0.04%, -0.24% Instrs: 438766 -> 486215 (+10.81%); split: -0.00%, +10.81% Cycles: 7880180 -> 8963340 (+13.75%); split: -0.00%, +13.75% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6558>
This commit is contained in:
parent
f83bc5beb8
commit
bcf7a70008
|
@ -336,6 +336,8 @@ void apply_nuw_to_offsets(isel_context *ctx, nir_function_impl *impl)
|
|||
|
||||
struct hash_table *range_ht = _mesa_pointer_hash_table_create(NULL);
|
||||
|
||||
nir_metadata_require(impl, nir_metadata_dominance);
|
||||
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
if (instr->type != nir_instr_type_intrinsic)
|
||||
|
@ -767,6 +769,7 @@ void init_context(isel_context *ctx, nir_shader *shader)
|
|||
|
||||
ctx->shader = shader;
|
||||
nir_divergence_analysis(shader);
|
||||
nir_opt_uniform_atomics(shader);
|
||||
|
||||
fill_desc_set_info(ctx, impl);
|
||||
|
||||
|
|
Loading…
Reference in New Issue