From 75b1b4c50f38d33dd1ca9e3ff6aec4a6e05ba722 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 4 Jun 2019 18:33:42 -0700 Subject: [PATCH] Check consistency of GetPhysicalDeviceSparseImageFormatProperties This function should not advertise any support if the device does not support the sparseBinding feature at all. Components: Vulkan Affects: dEQP-VK.api.info.sparse_image_format_properties2.* VK-GL-CTS Issue: 1816 Change-Id: I2037ac1a0096def401820670d510a6807d7bdf58 --- external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp index a3a9923..eaa930c 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp @@ -3370,6 +3370,17 @@ tcu::TestStatus sparseImageFormatProperties2 (Context& context, const VkFormat f TCU_FAIL("Mismatch in reported property count"); } + if (!context.getDeviceFeatures().sparseBinding) + { + // There is no support for sparse binding, getPhysicalDeviceSparseImageFormatProperties* MUST report no properties + // Only have to check one of the entrypoints as a mismatch in count is already caught. + if (numCoreProperties > 0) + { + log << TestLog::Message << "ERROR: device does not support sparse binding but claims support for " << numCoreProperties << " properties in vkGetPhysicalDeviceSparseImageFormatProperties with parameters " << imageFormatInfo << TestLog::EndMessage; + TCU_FAIL("Claimed format properties inconsistent with overall sparseBinding feature"); + } + } + if (numCoreProperties > 0) { std::vector coreProperties (numCoreProperties); -- 2.7.4