nir/lower_shader_calls: vectorize stack access for all shaders
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 26 Jul 2023 15:09:51 +0000 (16:09 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Jul 2023 12:38:01 +0000 (12:38 +0000)
fossil-db (gfx1100):
Totals from 9 (0.01% of 133461) affected shaders:
MaxWaves: 156 -> 158 (+1.28%)
Instrs: 37193 -> 37324 (+0.35%)
CodeSize: 191008 -> 191968 (+0.50%)
VGPRs: 816 -> 804 (-1.47%)
Latency: 75789 -> 75641 (-0.20%); split: -0.35%, +0.15%
InvThroughput: 10475 -> 10441 (-0.32%); split: -0.40%, +0.08%
VClause: 666 -> 663 (-0.45%); split: -0.75%, +0.30%
SClause: 1077 -> 1076 (-0.09%)
Copies: 3425 -> 3407 (-0.53%); split: -0.73%, +0.20%
PreVGPRs: 770 -> 745 (-3.25%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24334>

src/compiler/nir/nir_lower_shader_calls.c

index b3c2bf5..12fdd7a 100644 (file)
@@ -2077,8 +2077,8 @@ nir_lower_shader_calls(nir_shader *shader,
    nir_opt_cse(shader);
    for (unsigned i = 0; i < num_calls; i++) {
       if (options->vectorizer_callback != NULL) {
-         NIR_PASS_V(shader, nir_split_stack_components);
-         NIR_PASS_V(shader, nir_opt_load_store_vectorize, &vect_opts);
+         NIR_PASS_V(resume_shaders[i], nir_split_stack_components);
+         NIR_PASS_V(resume_shaders[i], nir_opt_load_store_vectorize, &vect_opts);
       }
       NIR_PASS_V(resume_shaders[i], nir_lower_stack_to_scratch,
                  options->address_format);