Fix - depth/stencil images mandatory only for VK_IMAGE_TYPE_2D
authorMarcin Kańtoch <marcin.kantoch@amd.com>
Tue, 28 Mar 2017 13:06:59 +0000 (15:06 +0200)
committerPyry Haulos <phaulos@google.com>
Fri, 31 Mar 2017 16:34:13 +0000 (12:34 -0400)
Vulkan spec change https://gitlab.khronos.org/vulkan/vulkan/issues/719
made it mandatory to support depth/stencil formats only for
image type VK_IMAGE_TYPE_2D. For VK_IMAGE_TYPE_1D and VK_IMAGE_TYPE_3D
this support is optional.

Made changes to isRequiredImageParameterCombination()

Tests affected: dEQP-VK.api.info.image_format_properties.*

Change-Id: I9df990ced2e0a735078897324211c6b2a3923f2e

external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp

index 06b0e24..8734c91 100644 (file)
@@ -1768,6 +1768,10 @@ bool isRequiredImageParameterCombination (const VkPhysicalDeviceFeatures&        device
        if (isCompressedFormat(format) && (imageType == VK_IMAGE_TYPE_1D || imageType == VK_IMAGE_TYPE_3D))
                return false;
 
+       // Support for 1D and 3D depth/stencil textures is optional
+       if (isDepthStencilFormat(format) && (imageType == VK_IMAGE_TYPE_1D || imageType == VK_IMAGE_TYPE_3D))
+               return false;
+
        DE_ASSERT(deviceFeatures.sparseBinding || (createFlags & (VK_IMAGE_CREATE_SPARSE_BINDING_BIT|VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT)) == 0);
        DE_ASSERT(deviceFeatures.sparseResidencyAliased || (createFlags & VK_IMAGE_CREATE_SPARSE_ALIASED_BIT) == 0);