freedreno/ir3: lower local_index using local_id
authorRob Clark <robdclark@chromium.org>
Mon, 20 Jul 2020 18:14:18 +0000 (11:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Aug 2020 21:00:44 +0000 (21:00 +0000)
Somehow this works ok with the full compiler stack, but not in
ir3_cmdline.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>

src/freedreno/ir3/ir3_nir.c

index dc707545bbb6a629aa25a15a4c775e7f312e1424..7b373dff2422a694b12f681bcd6ffc15172e87f4 100644 (file)
@@ -71,6 +71,7 @@ static const nir_shader_compiler_options options = {
                .lower_to_scalar = true,
                .has_imul24 = true,
                .lower_wpos_pntc = true,
+               .lower_cs_local_index_from_id = true,
 
                /* Only needed for the spirv_to_nir() pass done in ir3_cmdline.c
                 * but that should be harmless for GL since 64b is not
@@ -121,6 +122,7 @@ static const nir_shader_compiler_options options_a6xx = {
                .has_imul24 = true,
                .max_unroll_iterations = 32,
                .lower_wpos_pntc = true,
+               .lower_cs_local_index_from_id = true,
 
                /* Only needed for the spirv_to_nir() pass done in ir3_cmdline.c
                 * but that should be harmless for GL since 64b is not