radv: implement VK_AMD_shader_core_properties2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 21 Aug 2019 07:04:46 +0000 (09:04 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 21 Aug 2019 13:14:29 +0000 (15:14 +0200)
Trivial extension that matches PAL.

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 7101567b66a2120d5002cf0a750309776f18a064..7f89c27ad3d490dc93dc4aa39e0d28663d7f6d33 100644 (file)
@@ -1310,6 +1310,15 @@ void radv_GetPhysicalDeviceProperties2(
                        properties->vgprAllocationGranularity = 4;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD: {
+                       VkPhysicalDeviceShaderCoreProperties2AMD *properties =
+                               (VkPhysicalDeviceShaderCoreProperties2AMD *)ext;
+
+                       properties->shaderCoreFeatures = 0;
+                       properties->activeComputeUnitCount =
+                               pdevice->rad_info.num_good_compute_units;
+                       break;
+               }
                case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
                        VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *properties =
                                (VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)ext;
index 3624970dd3779b60bf8440ce343b5e2454e9c668..b28d74f5746be0732a58785d612804341e8f56c9 100644 (file)
@@ -143,6 +143,7 @@ EXTENSIONS = [
     Extension('VK_AMD_rasterization_order',               1, 'device->has_out_of_order_rast'),
     Extension('VK_AMD_shader_ballot',                     1, 'device->use_shader_ballot'),
     Extension('VK_AMD_shader_core_properties',            1, True),
+    Extension('VK_AMD_shader_core_properties2',           1, True),
     Extension('VK_AMD_shader_info',                       1, True),
     Extension('VK_AMD_shader_trinary_minmax',             1, True),
     Extension('VK_GOOGLE_decorate_string',                1, True),