radv: enable VK_KHR_shader_maximal_reconvergence

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27277>
This commit is contained in:
Daniel Schürmann 2023-11-23 11:35:13 +01:00 committed by Marge Bot
parent 2649717a36
commit e546f2a55d
4 changed files with 13 additions and 0 deletions

View File

@ -537,6 +537,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_ray_tracing_position_fetch DONE (anv, radv/gfx10.3+)
VK_KHR_shader_clock DONE (anv, hasvk, lvp, nvk, radv, vn)
VK_KHR_shader_expect_assume DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_shader_maximal_reconvergence DONE (radv)
VK_KHR_shader_subgroup_rotate DONE (anv, radv)
VK_KHR_shader_subgroup_uniform_control_flow DONE (anv, hasvk, radv)
VK_KHR_shared_presentable_image not started

View File

@ -3,3 +3,4 @@ VK_KHR_load_store_op_none on RADV
VK_KHR_line_rasterization on RADV
VK_KHR_index_type_uint8 on RADV
VK_KHR_shader_expect_assume on all Vulkan drivers
VK_KHR_shader_maximal_reconvergence on RADV

View File

@ -505,6 +505,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
.KHR_shader_float16_int8 = true,
.KHR_shader_float_controls = true,
.KHR_shader_integer_dot_product = true,
.KHR_shader_maximal_reconvergence = true,
.KHR_shader_non_semantic_info = true,
.KHR_shader_subgroup_extended_types = true,
.KHR_shader_subgroup_rotate = true,
@ -1135,6 +1136,9 @@ radv_physical_device_get_features(const struct radv_physical_device *pdevice, st
/* VK_KHR_shader_expect_assume */
.shaderExpectAssume = true,
/* VK_KHR_shader_maximal_reconvergence */
.shaderMaximalReconvergence = true,
};
}

View File

@ -759,6 +759,13 @@ radv_consider_culling(const struct radv_physical_device *pdevice, struct nir_sha
if (BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_SUBGROUP_INVOCATION))
return false;
/* When re-using values that depend on subgroup operations, we'd break convergence guarantees.
* Since we only re-use uniform values, the only subgroup operations we really care about are
* ballot, reductions and vote intrinsics.
*/
if (nir->info.maximally_reconverges && nir->info.uses_wide_subgroup_intrinsics)
return false;
return true;
}