radv: use lower_shuffle_to_swizzle_amd
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 23 Jun 2020 16:38:37 +0000 (17:38 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 13 Jul 2020 14:11:50 +0000 (14:11 +0000)
Affects a few shaders in Detroit: Become Human and Doom Eternal.

fossil-db (Navi):
Totals from 9 (0.01% of 135946) affected shaders:
CodeSize: 31188 -> 25096 (-19.53%)
Instrs: 6136 -> 4999 (-18.53%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5695>

src/amd/vulkan/radv_shader.c

index ac6c751928e00efb3a3303f021fe984fa529bbdc..072201fe66b4ce5531b59fe68f1a89ec59fb101b 100644 (file)
@@ -531,6 +531,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                        .lower_vote_eq_to_ballot = 1,
                        .lower_quad_broadcast_dynamic = 1,
                        .lower_quad_broadcast_dynamic_to_const = gfx7minus,
+                       .lower_shuffle_to_swizzle_amd = 1,
                });
 
        nir_lower_load_const_to_scalar(nir);