Add missing buffer features check in image store tests
authorziga-lunarg <ziga@lunarg.com>
Mon, 29 Aug 2022 00:16:31 +0000 (02:16 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 6 Oct 2022 21:07:30 +0000 (21:07 +0000)
Check if format supports storage write for VkBufferView where
OpTypeImage is Unknown

Components: Vulkan

VK-GL-CTS issue: 3765

Affected tests:
dEQP-VK.image.store.without_format.*

Change-Id: I74365f2f753fb61397d83403098a288cdcf53953

external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp

index f6f844d19657818c002a353ea136f9e4c540f3a7..af0661cf5b8fe18f374af4c3fb91d3cbd4f60120 100644 (file)
@@ -486,6 +486,9 @@ void StoreTest::checkSupport (Context& context) const
 {
        const VkFormatProperties3KHR formatProperties (context.getFormatProperties(m_format));
 
+       if (!m_declareImageFormatInShader && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR))
+               TCU_THROW(NotSupportedError, "Format not supported for unformatted stores via storage buffer");
+
        if (!m_declareImageFormatInShader && !(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR))
                TCU_THROW(NotSupportedError, "Format not supported for unformatted stores via storage images");