1d_image: basic: compute: texel_view_compatible: set size.y to 1
authorYahan Zhou <yahan@google.com>
Wed, 7 Aug 2019 19:44:50 +0000 (12:44 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 22 Aug 2019 11:30:24 +0000 (07:30 -0400)
1d images need to have size.y=1. Otherwise Vulkan validation layer will
complain.

Affects:
dEQP-VK.image.texel_view_compatible.compute.basic.1d_image*

Components: Vulkan

VK-GL-CTS issue: 1920

Change-Id: I0dd24d612aafb416a74b5eb6f16bb55c76175a0f
(cherry picked from commit fe76a662df108542ff27e1c4f5a83077b54444c4)

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

index 36be1a7..1504e9a 100644 (file)
@@ -970,6 +970,9 @@ void BasicComputeTestInstance::createImageInfos (ImageData& imageData, const vec
        else
        {
                UVec3 size = m_parameters.size;
+               if (m_parameters.imageType == IMAGE_TYPE_1D) {
+                       size.y() = 1;
+               }
                size.z() = 1;
                const VkExtent3D originalResolutionInBlocks = makeExtent3D(getCompressedImageResolutionInBlocks(m_parameters.formatCompressed, size));