diff options
author | Samuel Pitoiset <[email protected]> | 2020-03-16 17:29:33 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-17 12:45:01 +0000 |
commit | 672d10619980687acec329742f055f7f3796c1b8 (patch) | |
tree | 8fb95245281ad891950da233e1a11e0e3d04d73b /src/amd/vulkan/radv_shader.c | |
parent | 46e8ba1344e840f9406537ae73c841a357278924 (diff) |
radv/gfx10: fix required subgroup size with VK_EXT_subgroup_size_control
If compute shaders require a specific subgroup size (ie. Wave32),
we have to return the correct one.
Fixes dEQP-VK.subgroups.size_control.compute.required_subgroup_size_*.
Fixes: fb07fd4e6cb ("radv: implement VK_EXT_subgroup_size_control")
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4215>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 30e46340520..4132dce1aee 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -292,7 +292,8 @@ radv_shader_compile_to_nir(struct radv_device *device, gl_shader_stage stage, const VkSpecializationInfo *spec_info, const VkPipelineCreateFlags flags, - const struct radv_pipeline_layout *layout) + const struct radv_pipeline_layout *layout, + unsigned subgroup_size) { nir_shader *nir; const nir_shader_compiler_options *nir_options = @@ -481,7 +482,7 @@ radv_shader_compile_to_nir(struct radv_device *device, 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, + .subgroup_size = subgroup_size, .ballot_bit_size = 64, .lower_to_scalar = 1, .lower_subgroup_masks = 1, |