From: Piers Daniell Date: Thu, 28 Oct 2021 16:46:40 +0000 (-0600) Subject: Skip negative vkCreateBuffer(size_max_uint64) test for maint4 X-Git-Tag: upstream/1.3.5~428^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f23655a3a471b97549a8901464572063f1584413;p=platform%2Fupstream%2FVK-GL-CTS.git Skip negative vkCreateBuffer(size_max_uint64) test for maint4 With VK_KHR_maintenance4 it become invalid usage to call vkCreateBuffer with a size larger than VkPhysicalDeviceMaintenance4Properties.maxBufferSize. The dEQP-VK.api.buffer.basic.size_max_uint64 did just this even on maint4 implementation, which is invalid usage. This CL marks this test as unsupported for implementations that support VK_KHR_maintenance4. Affects: dEQP-VK.api.buffer.basic.* Components: Vulkan VK-GL-CTS issue: 3238 Change-Id: I4754c3af4ef253e50226a31a466bfe5772e65652 (cherry picked from commit f92d3e5a35afcf9c2f9226b81d5be54d10944819) --- diff --git a/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp index a806c63..2a8ef62 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp @@ -713,7 +713,11 @@ tcu::TestStatus testLargeBuffer(Context& context, LargeBufferParameters params) void checkMaintenance4Support(Context& context, LargeBufferParameters params) { - context.requireDeviceFunctionality("VK_KHR_maintenance4"); + if (params.useMaxBufferSize) + context.requireDeviceFunctionality("VK_KHR_maintenance4"); + else if (context.isDeviceFunctionalitySupported("VK_KHR_maintenance4") && + params.bufferSize > context.getMaintenance4Properties().maxBufferSize) + TCU_THROW(NotSupportedError, "vkCreateBuffer with a size larger than maxBufferSize is not valid usage"); const VkPhysicalDeviceFeatures& physicalDeviceFeatures = getPhysicalDeviceFeatures(context.getInstanceInterface(), context.getPhysicalDevice()); if ((params.flags & VK_BUFFER_CREATE_SPARSE_BINDING_BIT) && !physicalDeviceFeatures.sparseBinding) @@ -755,7 +759,7 @@ void checkMaintenance4Support(Context& context, LargeBufferParameters params) VK_BUFFER_CREATE_SPARSE_BINDING_BIT }); addFunctionCase(basicTests.get(), "size_max_uint64", "Creating a ULLONG_MAX buffer and verify that it either succeeds or returns one of the allowed errors.", - testLargeBuffer, LargeBufferParameters + checkMaintenance4Support, testLargeBuffer, LargeBufferParameters { std::numeric_limits::max(), false,