TCU_THROW(NotSupportedError, "Vulkan 1.1 not supported");
if ((m_data.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER || m_data.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) &&
- !m_data.formatQualifier &&
- (!features2.features.shaderStorageImageReadWithoutFormat || !features2.features.shaderStorageImageWriteWithoutFormat))
- TCU_THROW(NotSupportedError, "shaderStorageImageReadWithoutFormat or shaderStorageImageWriteWithoutFormat not supported");
+ !m_data.formatQualifier)
+ {
+ const VkFormatPropertiesExtendedKHR formatProperties = context.getFormatProperties(m_data.format);
+ if (!(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR))
+ TCU_THROW(NotSupportedError, "Format does not support reading without format");
+ if (!(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR))
+ TCU_THROW(NotSupportedError, "Format does not support writing without format");
+ }
if (m_data.pushDescriptor)
context.requireDeviceFunctionality("VK_KHR_push_descriptor");