From: Nanley Chery Date: Tue, 19 Apr 2016 19:13:58 +0000 (-0700) Subject: CP: Fix required sample count tests X-Git-Tag: upstream/0.1.0~710^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6a815214a0cc70edcd508a5c910d4ac8aa4b140;p=platform%2Fupstream%2FVK-GL-CTS.git CP: Fix required sample count tests According to, Table 11.1. Image and image view parameter compatibility requirements Only non-cube images with type VK_IMAGE_TYPE_2D can have sample counts greater than one. In addition, the following properties should hold for multisampled images: the formats must support being used in a color or depth/stencil attachment, or in a storage image when shaderStorageImageMultisample is supported. Images not fitting the above descriptions may have a sample count of one or zero (in error conditions). Align tests for sample counts to this behavior. Bug: 30739954 (cherry picked from commit dc4227d5ec87080f5dad810b5e33ae3b3fa014a4) Change-Id: I476b6586c351bddfb9f0b92cd7ec45fb9cc297c8 --- diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp index 399b894..e155d53 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp @@ -1840,7 +1840,9 @@ tcu::TestStatus imageFormatProperties (Context& context, ImageFormatPropertyCase results.check(imageType != VK_IMAGE_TYPE_3D || (properties.maxExtent.width >= 1 && properties.maxExtent.height >= 1 && properties.maxExtent.depth >= 1), "Invalid dimensions for 3D image"); results.check(imageType != VK_IMAGE_TYPE_3D || properties.maxArrayLayers == 1, "Invalid maxArrayLayers for 3D image"); - if (tiling == VK_IMAGE_TILING_OPTIMAL) + if (tiling == VK_IMAGE_TILING_OPTIMAL && imageType == VK_IMAGE_TYPE_2D && !(curCreateFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) && + ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) || + ((supportedFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && deviceFeatures.shaderStorageImageMultisample))) { const VkSampleCountFlags requiredSampleCounts = getRequiredOptimalTilingSampleCounts(deviceLimits, format, curUsageFlags); results.check((properties.sampleCounts & requiredSampleCounts) == requiredSampleCounts, "Required sample counts not supported");