From ca57cb050d381c15189acb8fb4b9f650e5624016 Mon Sep 17 00:00:00 2001 From: Dae Kim Date: Thu, 7 Jan 2016 16:28:48 +0000 Subject: [PATCH] Check support for timestamp queries. --- .../modules/vulkan/pipeline/vktPipelineTimestampTests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp index d03d83c..d2474d5 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp @@ -698,6 +698,16 @@ TimestampTestInstance::TimestampTestInstance(Context& context, const VkDevice vkDevice = context.getDevice(); const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); + // Check support for timestamp queries + { + const std::vector queueProperties = vk::getPhysicalDeviceQueueFamilyProperties(m_context.getInstanceInterface(), m_context.getPhysicalDevice()); + + DE_ASSERT(queueFamilyIndex < (deUint32)queueProperties.size()); + + if (!queueProperties[queueFamilyIndex].timestampValidBits) + throw tcu::NotSupportedError("Universal queue does not support timestamps"); + } + // Create Query Pool { const VkQueryPoolCreateInfo queryPoolParams = -- 2.7.4