turnip: Fill out VkPhysicalDeviceSubgroupProperties
authorBrian Ho <brian@brkho.com>
Fri, 19 Jun 2020 16:47:08 +0000 (12:47 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 19 Jun 2020 17:49:09 +0000 (17:49 +0000)
This commit fills out VkPhysicalDeviceSubgroupProperties if present
in a VkPhysicalDeviceProperties2. The values here are simply pulled
from the blob.

Fixes some flakes in dEQP-VK.subgroups.* since dEQP was reading
uninitialized values of VkPhysicalDeviceSubgroupProperties.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5564>

src/freedreno/vulkan/tu_device.c

index 27bfb464a4ae4ea4a6d6647472f68dfc35f6c8fc..d7e3363a44f28546c28431f7923b351a1ae25b5c 100644 (file)
@@ -948,6 +948,16 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
          properties->filterMinmaxSingleComponentFormats = true;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: {
+         VkPhysicalDeviceSubgroupProperties *properties =
+            (VkPhysicalDeviceSubgroupProperties *)ext;
+         properties->subgroupSize = 64;
+         properties->supportedStages = VK_SHADER_STAGE_COMPUTE_BIT;
+         properties->supportedOperations = VK_SUBGROUP_FEATURE_BASIC_BIT |
+                                           VK_SUBGROUP_FEATURE_VOTE_BIT;
+         properties->quadOperationsInAllStages = false;
+         break;
+      }
 
       default:
          break;