From 967eb2326155eaa7f2f3d3b8c459a2cb82eca1dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Wed, 11 Mar 2020 15:05:47 +0100 Subject: [PATCH] radv: Enable lowering dynamic quad broadcasts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This will lower dynamic quad broadcasts into something that both LLVM and ACO can understand. On hardware which supports shuffles, they are lowered to shuffle, on older hardware (GFX6-7) they will get lowered to constant quad broadcasts. Fixes dEQP-VK.subgroups.quad.*.subgroupquadbroadcast_nonconst_* Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Timur Kristóf Reviewed-by: Samuel Pitoiset Tested-by: Marge Bot Part-of: --- src/amd/vulkan/radv_shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 37b8ee45e34..049611371f6 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -480,6 +480,7 @@ radv_shader_compile_to_nir(struct radv_device *device, nir_lower_global_vars_to_local(nir); nir_remove_dead_variables(nir, nir_var_function_temp); + bool gfx7minus = device->physical_device->rad_info.chip_class <= GFX7; nir_lower_subgroups(nir, &(struct nir_lower_subgroups_options) { .subgroup_size = 64, .ballot_bit_size = 64, @@ -488,6 +489,8 @@ radv_shader_compile_to_nir(struct radv_device *device, .lower_shuffle = 1, .lower_shuffle_to_32bit = 1, .lower_vote_eq_to_ballot = 1, + .lower_quad_broadcast_dynamic = 1, + .lower_quad_broadcast_dynamic_to_const = gfx7minus, }); nir_lower_load_const_to_scalar(nir); -- 2.30.2