API documentation, extension 1.1, vkGetQueryPoolResults description:
"If VK_QUERY_RESULT_64_BIT is not set and the result overflows a 32-bit
value, the value may either wrap or saturate."
Affects:
dEQP-VK.pipeline.timestamp.misc_tests.*
Components: Vulkan
VK-GL-CTS issue: 1985
Change-Id: Id229ea4c13b52bf27c00de734c437d878365fef9
(cherry picked from commit
9eeec03a6dc5f6c05dab28eb418d25c5794f8d0e)
deUint32 tsGet32Bits;
deUint64 tsGet64Bits;
+ constexpr deUint32 maxDeUint32Value = std::numeric_limits<deUint32>::max();
+
submitCommandsAndWait(vk, vkDevice, queue, m_cmdBuffer.get());
// Get results from buffers.
// Check results are consistent.
if (tsBuffer32Bits == tsGet32Bits &&
tsBuffer64Bits == tsGet64Bits &&
- (tsGet64Bits & std::numeric_limits<deUint32>::max()) == tsGet32Bits)
+ (((tsGet64Bits & maxDeUint32Value) == tsGet32Bits) ||
+ ((tsGet64Bits > maxDeUint32Value) && (maxDeUint32Value == tsGet32Bits))))
{
return tcu::TestStatus::pass("Pass");
}