From 93e1beed2b50132509029e06202ec2fd6b2e3fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Fri, 30 Aug 2024 11:14:45 -0700 Subject: [PATCH] QueryPoolComputeStatsTest: Check if query is supported in compute queue Some drivers may not support queries in compute queue. This should turn some failures in dEQP-VK.query_pool.statistics_query.reset_after_copy.compute_shader_invocations.* to not supported. --- .../query_pool/vktQueryPoolStatisticsTests.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp b/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp index 5237aaa25d..7f6553d421 100644 --- a/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp +++ b/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp @@ -163,11 +163,6 @@ uint32_t findNonGraphicsQueueFamilyIndex(const InstanceInterface &vki, const VkP return qfIndex; } -void checkSupportForNonGraphicsQueueFamily(const InstanceInterface &vki, const VkPhysicalDevice physicalDevice) -{ - findNonGraphicsQueueFamilyIndex(vki, physicalDevice); -} - // Device helper: this is needed in some tests when we create custom devices. class DeviceHelper { @@ -3853,8 +3848,13 @@ class QueryPoolComputeStatsTest : public TestCase { const auto &vki = context.getInstanceInterface(); const auto physicalDevice = context.getPhysicalDevice(); - - checkSupportForNonGraphicsQueueFamily(vki, physicalDevice); + uint32_t computeQueueFamilyIdx = findNonGraphicsQueueFamilyIndex(vki, physicalDevice); + uint32_t counterCount; + VkResult result; + + result = vki.enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(physicalDevice, computeQueueFamilyIdx, &counterCount, NULL, NULL); + if (result != VK_SUCCESS || counterCount == 0) + TCU_THROW(NotSupportedError, "Query not supported in compute queue"); } }