From: Ben Widawsky Date: Sun, 24 Jan 2016 22:59:48 +0000 (-0800) Subject: Blend Test: Do not swizzle the ImageView X-Git-Tag: upstream/0.1.0~812^2~85^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24155ad7565df3ee98589e5db8eeb143b414a3ce;p=platform%2Fupstream%2FVK-GL-CTS.git Blend Test: Do not swizzle the ImageView Some formats are weird. The A2R10G10B10_UNORM_PACK32 format, for example, is stored out of order with respect to the name. From 29.3.1 Format definitions of the spec: A four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. The existing code will use this fact to determine that the underlying organization for the format is BGRA, and as such will introduce swizzles in the view. However, this swizzling is not the desired effect used by the reference renderer, and this resulted in a miscompare (reverse RED AND BLUE channels) for potentially any format who underlying storage order is reverse of its logical order, AND, whose underlying storage order is not in RGBA (swizzle free) order. If you switch the format to A2G10B10R10, the underlying organization is RGBA and the resulting swizzle is the identity swizzle, it still works. Also, if you add B8G8R8A8_UNORM to the list of formats, the newly added tests all fail. --- diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendTests.cpp index 96a34de..80e0152 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendTests.cpp @@ -360,7 +360,7 @@ BlendTestInstance::BlendTestInstance (Context& context, *m_colorImage, // VkImage image; VK_IMAGE_VIEW_TYPE_2D, // VkImageViewType viewType; m_colorFormat, // VkFormat format; - getFormatComponentMapping(m_colorFormat), // VkComponentMapping components; + {VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY}, { VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u } // VkImageSubresourceRange subresourceRange; };