From: Samuel Pitoiset Date: Fri, 8 Nov 2019 11:45:03 +0000 (+0100) Subject: radv: advertise VK_KHR_shader_subgroup_extended_types on GFX8-GFX9 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c93f2cefd544fa3b0c747cee5c5800cafdd5a4cb;p=mesa.git radv: advertise VK_KHR_shader_subgroup_extended_types on GFX8-GFX9 This extension allows to use subgroup operations with 8 and 16-bits Untested on GFX6-GFX7, and most of subgroup operations are broken on GFX10, so don't enable it for now. Not enabled on ACO because it's still doesn't support 8-bits/16-bits. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index d368fb765f7..226eee0246a 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1177,6 +1177,12 @@ void radv_GetPhysicalDeviceFeatures2( features->deviceCoherentMemory = pdevice->rad_info.has_l2_uncached; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR: { + VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR *features = + (VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR *)ext; + features->shaderSubgroupExtendedTypes = true; + break; + } default: break; } diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index fab36bf53d7..7d0e977ef04 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -91,6 +91,7 @@ EXTENSIONS = [ Extension('VK_KHR_shader_draw_parameters', 1, True), Extension('VK_KHR_shader_float_controls', 1, True), Extension('VK_KHR_shader_float16_int8', 1, '!device->use_aco'), + Extension('VK_KHR_shader_subgroup_extended_types', 1, 'device->rad_info.chip_class >= GFX8 && device->rad_info.chip_class <= GFX9 && !device->use_aco'), Extension('VK_KHR_spirv_1_4', 1, True), Extension('VK_KHR_storage_buffer_storage_class', 1, True), Extension('VK_KHR_surface', 25, 'RADV_HAS_SURFACE'),