From c93f2cefd544fa3b0c747cee5c5800cafdd5a4cb Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 8 Nov 2019 12:45:03 +0100 Subject: [PATCH] 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 --- src/amd/vulkan/radv_device.c | 6 ++++++ src/amd/vulkan/radv_extensions.py | 1 + 2 files changed, 7 insertions(+) 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'), -- 2.30.2