radv: advertise VK_KHR_shader_subgroup_extended_types on GFX8-GFX9
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 8 Nov 2019 11:45:03 +0000 (12:45 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 Nov 2019 18:01:13 +0000 (18:01 +0000)
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 <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py

index d368fb765f7a108c7c90a0288679926e251dd6d7..226eee0246a8b4f388f44963d2ae6f5399280671 100644 (file)
@@ -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;
                }
index fab36bf53d7955e77aee58112a63d01d7b746661..7d0e977ef0426958c405e2d96669514643973a09 100644 (file)
@@ -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'),