Add tests for packed vertex formats
authorToni Merilehti <toni.merilehti@siru.fi>
Wed, 27 Jun 2018 11:30:14 +0000 (14:30 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 12 Jul 2018 13:43:03 +0000 (09:43 -0400)
Added tests for selected packed vertex formats to verify that vertex
attribute values are handled correctly in vertex shader.

New tests:

dEQP-VK.pipeline.vertex_input.single_attribute.*

Components: Vulkan

VK-GL-CTS issue: 1162

Change-Id: Ib20142c33d385e2c95dce1b3c6f547588cf59b2f

android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexInputTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexUtil.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexUtil.hpp
external/vulkancts/mustpass/1.1.2/vk-default-no-waivers.txt
external/vulkancts/mustpass/1.1.2/vk-default.txt

index 7b9d2b0..8389eec 100755 (executable)
@@ -162675,6 +162675,8 @@ dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r16g16b16a16_sint_rate_v
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r16g16b16a16_sint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r32g32b32a32_sint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r32g32b32a32_sint_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_a2r10g10b10_sint_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_a2r10g10b10_sint_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r8_uint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r8_uint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r16_uint_rate_vertex
@@ -162695,6 +162697,8 @@ dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r16g16b16a16_uint_rate_v
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r16g16b16a16_uint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r32g32b32a32_uint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r32g32b32a32_uint_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_unorm_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_unorm_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_snorm_rate_vertex
@@ -162783,6 +162787,22 @@ dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_r8g8b8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_r8g8b8a8_srgb_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_b8g8r8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_b8g8r8a8_srgb_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_uscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_uscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_sscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_sscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_snorm_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_unorm_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_unorm_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_snorm_rate_vertex
@@ -162853,6 +162873,22 @@ dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_r8g8b8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_r8g8b8a8_srgb_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_b8g8r8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_b8g8r8a8_srgb_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_uscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_uscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_sscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_sscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_snorm_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.double.as_r64_sfloat_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.double.as_r64_sfloat_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.dvec2.as_r64g64_sfloat_rate_vertex
index 6457b07..e4ac295 100644 (file)
@@ -79,6 +79,13 @@ float getRepresentableDifferenceUnorm (VkFormat format)
        return 1.0f / float((1 << (getVertexFormatComponentSize(format) * 8)) - 1);
 }
 
+float getRepresentableDifferenceUnormPacked(VkFormat format, deUint32 componentNdx)
+{
+       DE_ASSERT((isVertexFormatUnorm(format) || isVertexFormatSRGB(format)) && isVertexFormatPacked(format));
+
+       return 1.0f / float((1 << (getPackedVertexFormatComponentWidth(format, componentNdx))) - 1);
+}
+
 float getRepresentableDifferenceSnorm (VkFormat format)
 {
        DE_ASSERT(isVertexFormatSnorm(format));
@@ -86,6 +93,13 @@ float getRepresentableDifferenceSnorm (VkFormat format)
        return 1.0f / float((1 << (getVertexFormatComponentSize(format) * 8 - 1)) - 1);
 }
 
+float getRepresentableDifferenceSnormPacked(VkFormat format, deUint32 componentNdx)
+{
+       DE_ASSERT(isVertexFormatSnorm(format) && isVertexFormatPacked(format));
+
+       return 1.0f / float((1 << (getPackedVertexFormatComponentWidth(format, componentNdx) - 1)) - 1);
+}
+
 deUint32 getNextMultipleOffset (deUint32 divisor, deUint32 value)
 {
        if (value % divisor == 0)
@@ -450,8 +464,9 @@ TestInstance* VertexInputTest::createInstance (Context& context) const
 
                        if (m_attributeLayout == ATTRIBUTE_LAYOUT_INTERLEAVED)
                        {
-                               const deUint32  offsetToComponentAlignment               = getNextMultipleOffset(getVertexFormatComponentSize(attributeInfo.vkType),
+                               const deUint32  offsetToComponentAlignment               = getNextMultipleOffset(getVertexFormatSize(attributeInfo.vkType),
                                                                                                                                                                                 (deUint32)bindingOffsets[attributeBinding] + attributeOffsets[attributeBinding]);
+
                                attributeOffsets[attributeBinding]                              += offsetToComponentAlignment;
 
                                attributeDescription.vkDescription.offset                = attributeOffsets[attributeBinding];
@@ -459,7 +474,7 @@ TestInstance* VertexInputTest::createInstance (Context& context) const
 
                                bindingDescriptions[attributeBinding].stride    += offsetToComponentAlignment + inputSize;
                                attributeOffsets[attributeBinding]                              += inputSize;
-                               attributeMaxSizes[attributeBinding]                              = de::max(attributeMaxSizes[attributeBinding], getVertexFormatComponentSize(attributeInfo.vkType));
+                               attributeMaxSizes[attributeBinding]                              = de::max(attributeMaxSizes[attributeBinding], getVertexFormatSize(attributeInfo.vkType));
                        }
                        else // m_attributeLayout == ATTRIBUTE_LAYOUT_SEQUENTIAL
                        {
@@ -658,11 +673,16 @@ std::string VertexInputTest::getGlslAttributeConditions (const AttributeInfo& at
        const int                       vertexInputCount        = VertexInputTest::s_glslTypeDescriptions[attributeInfo.glslType].vertexInputCount;
        const deUint32          totalComponentCount     = componentCount * vertexInputCount;
        const tcu::Vec4         threshold                       = getFormatThreshold(attributeInfo.vkType);
-       deUint32                        componentIndex          = 0;
        const std::string       indexStr                        = m_queryMaxAttributes ? "[" + attributeIndex + "]" : attributeIndex;
        const std::string       indentStr                       = m_queryMaxAttributes ? "\t\t" : "\t";
+       deUint32                        componentIndex          = 0;
+       deUint32                        orderNdx;
        std::string                     indexId;
 
+       const deUint32          BGROrder[]                      = { 2, 1, 0, 3 };
+       const deUint32          ABGROrder[]                     = { 3, 2, 1, 0 };
+       const deUint32          ARGBOrder[]                     = { 1, 2, 3, 0 };
+
        if (m_queryMaxAttributes)
                indexId = "index";
        else
@@ -676,6 +696,13 @@ std::string VertexInputTest::getGlslAttributeConditions (const AttributeInfo& at
        {
                for (int rowNdx = 0; rowNdx < componentCount; rowNdx++)
                {
+                       if (isVertexFormatComponentOrderABGR(attributeInfo.vkType))
+                               orderNdx = ABGROrder[rowNdx];
+                       else if (isVertexFormatComponentOrderARGB(attributeInfo.vkType))
+                               orderNdx = ARGBOrder[rowNdx];
+                       else
+                               orderNdx = BGROrder[rowNdx];
+
                        std::string accessStr;
                        {
                                // Build string representing the access to the attribute component
@@ -697,11 +724,26 @@ std::string VertexInputTest::getGlslAttributeConditions (const AttributeInfo& at
 
                        if (isVertexFormatSint(attributeInfo.vkType))
                        {
-                               glslCode << indentStr <<  "if (" << accessStr << " == -(" << totalComponentCount << " * " << indexId << " + " << componentIndex << "))\n";
+                               if (isVertexFormatPacked(attributeInfo.vkType))
+                               {
+                                       const deInt32 maxIntValue = (1 << (getPackedVertexFormatComponentWidth(attributeInfo.vkType, orderNdx) - 1)) - 1;
+                                       const deInt32 minIntValue = -maxIntValue;
+
+                                       glslCode << indentStr << "if (" << accessStr << " == clamp(-(" << totalComponentCount << " * " << indexId << " + " << componentIndex << "), " << minIntValue << ", " << maxIntValue << "))\n";
+                               }
+                               else
+                                       glslCode << indentStr << "if (" << accessStr << " == -(" << totalComponentCount << " * " << indexId << " + " << componentIndex << "))\n";
                        }
                        else if (isVertexFormatUint(attributeInfo.vkType))
                        {
-                               glslCode << indentStr << "if (" << accessStr << " == uint(" << totalComponentCount << " * " << indexId << " + " << componentIndex << "))\n";
+                               if (isVertexFormatPacked(attributeInfo.vkType))
+                               {
+                                       const deUint32 maxUintValue = (1 << getPackedVertexFormatComponentWidth(attributeInfo.vkType, orderNdx)) - 1;
+
+                                       glslCode << indentStr << "if (" << accessStr << " == clamp(uint(" << totalComponentCount << " * " << indexId << " + " << componentIndex << "), 0, " << maxUintValue << "))\n";
+                               }
+                               else
+                                       glslCode << indentStr << "if (" << accessStr << " == uint(" << totalComponentCount << " * " << indexId << " + " << componentIndex << "))\n";
                        }
                        else if (isVertexFormatSfloat(attributeInfo.vkType))
                        {
@@ -716,23 +758,44 @@ std::string VertexInputTest::getGlslAttributeConditions (const AttributeInfo& at
                        }
                        else if (isVertexFormatSscaled(attributeInfo.vkType))
                        {
-                               glslCode << indentStr << "if (abs(" << accessStr << " + (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0)) < " << threshold[rowNdx] << ")\n";
+                               if (isVertexFormatPacked(attributeInfo.vkType))
+                               {
+                                       const float maxScaledValue = float((1 << (getPackedVertexFormatComponentWidth(attributeInfo.vkType, orderNdx) - 1)) - 1);
+                                       const float minScaledValue = -maxScaledValue - 1.0f;
+
+                                       glslCode << indentStr << "if (abs(" << accessStr << " + clamp(" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0, " << minScaledValue << ", " << maxScaledValue << ")) < " << threshold[orderNdx] << ")\n";
+                               }
+                               else
+                                       glslCode << indentStr << "if (abs(" << accessStr << " + (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0)) < " << threshold[rowNdx] << ")\n";
                        }
                        else if (isVertexFormatUscaled(attributeInfo.vkType))
                        {
-                               glslCode << indentStr << "if (abs(" << accessStr << " - (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0)) < " << threshold[rowNdx] << ")\n";
+                               if (isVertexFormatPacked(attributeInfo.vkType))
+                               {
+                                       const float maxScaledValue = float((1 << getPackedVertexFormatComponentWidth(attributeInfo.vkType, orderNdx)) - 1);
+
+                                       glslCode << indentStr << "if (abs(" << accessStr << " - clamp(" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0, 0, " << maxScaledValue << ")) < " << threshold[orderNdx] << ")\n";
+                               }
+                               else
+                                       glslCode << indentStr << "if (abs(" << accessStr << " - (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0)) < " << threshold[rowNdx] << ")\n";
                        }
                        else if (isVertexFormatSnorm(attributeInfo.vkType))
                        {
-                               const float representableDiff = getRepresentableDifferenceSnorm(attributeInfo.vkType);
+                               const float representableDiff = isVertexFormatPacked(attributeInfo.vkType) ? getRepresentableDifferenceSnormPacked(attributeInfo.vkType, orderNdx) : getRepresentableDifferenceSnorm(attributeInfo.vkType);
 
-                               glslCode << indentStr << "if (abs(" << accessStr << " - (-1.0 + " << representableDiff << " * (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0))) < " << threshold[rowNdx] << ")\n";
+                               if(isVertexFormatPacked(attributeInfo.vkType))
+                                       glslCode << indentStr << "if (abs(" << accessStr << " - clamp((-1.0 + " << representableDiff << " * (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0)), -1.0, 1.0)) < " << threshold[orderNdx] << ")\n";
+                               else
+                                       glslCode << indentStr << "if (abs(" << accessStr << " - (-1.0 + " << representableDiff << " * (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0))) < " << threshold[rowNdx] << ")\n";
                        }
                        else if (isVertexFormatUnorm(attributeInfo.vkType) || isVertexFormatSRGB(attributeInfo.vkType))
                        {
-                               const float representableDiff = getRepresentableDifferenceUnorm(attributeInfo.vkType);
+                               const float representableDiff = isVertexFormatPacked(attributeInfo.vkType) ? getRepresentableDifferenceUnormPacked(attributeInfo.vkType, orderNdx) : getRepresentableDifferenceUnorm(attributeInfo.vkType);
 
-                               glslCode << indentStr << "if (abs(" << accessStr << " - " << "(" << representableDiff << " * (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0))) < " << threshold[rowNdx] << ")\n";
+                               if (isVertexFormatPacked(attributeInfo.vkType))
+                                       glslCode << indentStr << "if (abs(" << accessStr << " - " << "clamp((" << representableDiff << " * (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0)), 0.0, 1.0)) < " << threshold[orderNdx] << ")\n";
+                               else
+                                       glslCode << indentStr << "if (abs(" << accessStr << " - " << "(" << representableDiff << " * (" << totalComponentCount << ".0 * float(" << indexId << ") + " << componentIndex << ".0))) < " << threshold[rowNdx] << ")\n";
                        }
                        else
                        {
@@ -769,11 +832,19 @@ tcu::Vec4 VertexInputTest::getFormatThreshold (VkFormat format)
 
        if (isVertexFormatSnorm(format))
        {
-               return Vec4(1.5f * getRepresentableDifferenceSnorm(format));
+               return (isVertexFormatPacked(format) ? Vec4(1.5f * getRepresentableDifferenceSnormPacked(format, 0),
+                                                                                                       1.5f * getRepresentableDifferenceSnormPacked(format, 1),
+                                                                                                       1.5f * getRepresentableDifferenceSnormPacked(format, 2),
+                                                                                                       1.5f * getRepresentableDifferenceSnormPacked(format, 3))
+                                                                                                       : Vec4(1.5f * getRepresentableDifferenceSnorm(format)));
        }
        else if (isVertexFormatUnorm(format))
        {
-               return Vec4(1.5f * getRepresentableDifferenceUnorm(format));
+               return (isVertexFormatPacked(format) ? Vec4(1.5f * getRepresentableDifferenceUnormPacked(format, 0),
+                                                                                                       1.5f * getRepresentableDifferenceUnormPacked(format, 1),
+                                                                                                       1.5f * getRepresentableDifferenceUnormPacked(format, 2),
+                                                                                                       1.5f * getRepresentableDifferenceUnormPacked(format, 3))
+                                                                                                       : Vec4(1.5f * getRepresentableDifferenceUnorm(format)));
        }
 
        return Vec4(0.001f);
@@ -1240,6 +1311,19 @@ void writeVertexInputValueSint (deUint8* destPtr, VkFormat format, int component
        }
 }
 
+void writeVertexInputValueIntPacked(deUint8* destPtr, deUint32& packedFormat, deUint32& componentOffset, VkFormat format, deUint32 componentNdx, deUint32 value)
+{
+       const deUint32  componentWidth  = getPackedVertexFormatComponentWidth(format, componentNdx);
+       const deUint32  componentCount  = getVertexFormatComponentCount(format);
+       const deUint32  usedBits                = ~(deUint32)0 >> ((getVertexFormatSize(format) * 8) - componentWidth);
+
+       componentOffset -= componentWidth;
+       packedFormat |= (((deUint32)value & usedBits) << componentOffset);
+
+       if (componentNdx == componentCount - 1)
+               *((deUint32*)destPtr) = (deUint32)packedFormat;
+}
+
 void writeVertexInputValueUint (deUint8* destPtr, VkFormat format, int componentNdx, deUint32 value)
 {
        const deUint32  componentSize   = getVertexFormatComponentSize(format);
@@ -1294,38 +1378,58 @@ void VertexInputInstance::writeVertexInputValue (deUint8* destPtr, const VertexI
        const deUint32  totalComponentCount     = componentCount * vertexInputCount;
        const deUint32  vertexInputIndex        = indexId * totalComponentCount + attribute.vertexInputIndex * componentCount;
        const bool              hasBGROrder                     = isVertexFormatComponentOrderBGR(attribute.vkDescription.format);
-       int                             swizzledNdx;
+       const bool              hasABGROrder            = isVertexFormatComponentOrderABGR(attribute.vkDescription.format);
+       const bool              hasARGBOrder            = isVertexFormatComponentOrderARGB(attribute.vkDescription.format);
+       deUint32                componentOffset         = getVertexFormatSize(attribute.vkDescription.format) * 8;
+       deUint32                packedFormat32          = 0;
+       deUint32                swizzledNdx;
+
+       const deUint32  BGRSwizzle[]            = { 2, 1, 0, 3 };
+       const deUint32  ABGRSwizzle[]           = { 3, 2, 1, 0 };
+       const deUint32  ARGBSwizzle[]           = { 3, 0, 1, 2 };
 
        for (int componentNdx = 0; componentNdx < componentCount; componentNdx++)
        {
-               if (hasBGROrder)
-               {
-                       if (componentNdx == 0)
-                               swizzledNdx = 2;
-                       else if (componentNdx == 2)
-                               swizzledNdx = 0;
-                       else
-                               swizzledNdx = componentNdx;
-               }
+               if (hasABGROrder)
+                       swizzledNdx = ABGRSwizzle[componentNdx];
+               else if (hasARGBOrder)
+                       swizzledNdx = ARGBSwizzle[componentNdx];
+               else if (hasBGROrder)
+                       swizzledNdx = BGRSwizzle[componentNdx];
                else
                        swizzledNdx = componentNdx;
 
+               const deInt32   maxIntValue             = isVertexFormatPacked(attribute.vkDescription.format) ? (1 << (getPackedVertexFormatComponentWidth(attribute.vkDescription.format, componentNdx) - 1)) - 1 : (1 << (getVertexFormatComponentSize(attribute.vkDescription.format) * 8 - 1)) - 1;
+               const deUint32  maxUintValue    = isVertexFormatPacked(attribute.vkDescription.format) ? ((1 << getPackedVertexFormatComponentWidth(attribute.vkDescription.format, componentNdx)) - 1) : (1 << (getVertexFormatComponentSize(attribute.vkDescription.format) * 8 )) - 1;
+               const deInt32   minIntValue             = -maxIntValue;
+               const deUint32  minUintValue    = 0;
+
                switch (attribute.glslType)
                {
                        case VertexInputTest::GLSL_TYPE_INT:
                        case VertexInputTest::GLSL_TYPE_IVEC2:
                        case VertexInputTest::GLSL_TYPE_IVEC3:
                        case VertexInputTest::GLSL_TYPE_IVEC4:
-                               writeVertexInputValueSint(destPtr, attribute.vkDescription.format, componentNdx, -(deInt32)(vertexInputIndex + swizzledNdx));
-                               break;
+                       {
+                               if (isVertexFormatPacked(attribute.vkDescription.format))
+                                       writeVertexInputValueIntPacked(destPtr, packedFormat32, componentOffset, attribute.vkDescription.format, componentNdx, deClamp32(-(deInt32)(vertexInputIndex + swizzledNdx), minIntValue, maxIntValue));
+                               else
+                                       writeVertexInputValueSint(destPtr, attribute.vkDescription.format, componentNdx, -(deInt32)(vertexInputIndex + swizzledNdx));
 
+                               break;
+                       }
                        case VertexInputTest::GLSL_TYPE_UINT:
                        case VertexInputTest::GLSL_TYPE_UVEC2:
                        case VertexInputTest::GLSL_TYPE_UVEC3:
                        case VertexInputTest::GLSL_TYPE_UVEC4:
-                               writeVertexInputValueUint(destPtr, attribute.vkDescription.format, componentNdx, vertexInputIndex + swizzledNdx);
-                               break;
+                       {
+                               if (isVertexFormatPacked(attribute.vkDescription.format))
+                                       writeVertexInputValueIntPacked(destPtr, packedFormat32, componentOffset, attribute.vkDescription.format, componentNdx, deClamp32(vertexInputIndex + swizzledNdx, minUintValue, maxUintValue));
+                               else
+                                       writeVertexInputValueUint(destPtr, attribute.vkDescription.format, componentNdx, vertexInputIndex + swizzledNdx);
 
+                               break;
+                       }
                        case VertexInputTest::GLSL_TYPE_FLOAT:
                        case VertexInputTest::GLSL_TYPE_VEC2:
                        case VertexInputTest::GLSL_TYPE_VEC3:
@@ -1333,27 +1437,36 @@ void VertexInputInstance::writeVertexInputValue (deUint8* destPtr, const VertexI
                        case VertexInputTest::GLSL_TYPE_MAT2:
                        case VertexInputTest::GLSL_TYPE_MAT3:
                        case VertexInputTest::GLSL_TYPE_MAT4:
+                       {
                                if (isVertexFormatSfloat(attribute.vkDescription.format))
                                {
                                        writeVertexInputValueSfloat(destPtr, attribute.vkDescription.format, componentNdx, -(0.01f * (float)(vertexInputIndex + swizzledNdx)));
                                }
                                else if (isVertexFormatSscaled(attribute.vkDescription.format))
                                {
-                                       writeVertexInputValueSint(destPtr, attribute.vkDescription.format, componentNdx, -(deInt32)(vertexInputIndex + swizzledNdx));
+                                       if (isVertexFormatPacked(attribute.vkDescription.format))
+                                               writeVertexInputValueIntPacked(destPtr, packedFormat32, componentOffset, attribute.vkDescription.format, componentNdx, deClamp32(-(deInt32)(vertexInputIndex + swizzledNdx), minIntValue, maxIntValue));
+                                       else
+                                               writeVertexInputValueSint(destPtr, attribute.vkDescription.format, componentNdx, -(deInt32)(vertexInputIndex + swizzledNdx));
                                }
                                else if (isVertexFormatUscaled(attribute.vkDescription.format) || isVertexFormatUnorm(attribute.vkDescription.format) || isVertexFormatSRGB(attribute.vkDescription.format))
                                {
-                                       writeVertexInputValueUint(destPtr, attribute.vkDescription.format, componentNdx, vertexInputIndex + swizzledNdx);
+                                       if (isVertexFormatPacked(attribute.vkDescription.format))
+                                               writeVertexInputValueIntPacked(destPtr, packedFormat32, componentOffset, attribute.vkDescription.format, componentNdx, deClamp32(vertexInputIndex + swizzledNdx, minUintValue, maxUintValue));
+                                       else
+                                               writeVertexInputValueUint(destPtr, attribute.vkDescription.format, componentNdx, vertexInputIndex + swizzledNdx);
                                }
                                else if (isVertexFormatSnorm(attribute.vkDescription.format))
                                {
-                                       const deInt32 minIntValue = -((1 << (getVertexFormatComponentSize(attribute.vkDescription.format) * 8 - 1))) + 1;
-                                       writeVertexInputValueSint(destPtr, attribute.vkDescription.format, componentNdx, minIntValue + (vertexInputIndex + swizzledNdx));
+                                       if (isVertexFormatPacked(attribute.vkDescription.format))
+                                               writeVertexInputValueIntPacked(destPtr, packedFormat32, componentOffset, attribute.vkDescription.format, componentNdx, deClamp32(minIntValue + (vertexInputIndex + swizzledNdx), minIntValue, maxIntValue));
+                                       else
+                                               writeVertexInputValueSint(destPtr, attribute.vkDescription.format, componentNdx, minIntValue + (vertexInputIndex + swizzledNdx));
                                }
                                else
                                        DE_ASSERT(false);
                                break;
-
+                       }
                        case VertexInputTest::GLSL_TYPE_DOUBLE:
                        case VertexInputTest::GLSL_TYPE_DVEC2:
                        case VertexInputTest::GLSL_TYPE_DVEC3:
@@ -1397,7 +1510,8 @@ bool VertexInputTest::isCompatibleType (VkFormat format, GlslType glslType)
                                return isVertexFormatUint(format);
 
                        case GLSL_BASIC_TYPE_FLOAT:
-                               return getVertexFormatComponentSize(format) <= 4 && (isVertexFormatSfloat(format) || isVertexFormatSnorm(format) || isVertexFormatUnorm(format) || isVertexFormatSscaled(format) || isVertexFormatUscaled(format) || isVertexFormatSRGB(format));
+                               return (isVertexFormatPacked(format) ? (getVertexFormatSize(format) <= 4) : getVertexFormatComponentSize(format) <= 4) && (isVertexFormatSfloat(format) ||
+                                       isVertexFormatSnorm(format) || isVertexFormatUnorm(format) || isVertexFormatSscaled(format) || isVertexFormatUscaled(format) || isVertexFormatSRGB(format));
 
                        case GLSL_BASIC_TYPE_DOUBLE:
                                return isVertexFormatSfloat(format) && getVertexFormatComponentSize(format) == 8;
@@ -1584,6 +1698,18 @@ void createSingleAttributeCases (tcu::TestCaseGroup* singleAttributeTests, Verte
                VK_FORMAT_R64G64_SFLOAT,
                VK_FORMAT_R64G64B64_SFLOAT,
                VK_FORMAT_R64G64B64A64_SFLOAT,
+
+               // Packed formats
+               VK_FORMAT_A2R10G10B10_USCALED_PACK32,
+               VK_FORMAT_A2R10G10B10_SSCALED_PACK32,
+               VK_FORMAT_A2R10G10B10_UINT_PACK32,
+               VK_FORMAT_A2R10G10B10_SINT_PACK32,
+               VK_FORMAT_A8B8G8R8_UNORM_PACK32,
+               VK_FORMAT_A8B8G8R8_SNORM_PACK32,
+               VK_FORMAT_A2R10G10B10_UNORM_PACK32,
+               VK_FORMAT_A2R10G10B10_SNORM_PACK32,
+               VK_FORMAT_A2B10G10R10_UNORM_PACK32,
+               VK_FORMAT_A2B10G10R10_SNORM_PACK32
        };
 
        for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(vertexFormats); formatNdx++)
index ea9cd43..53d7624 100644 (file)
@@ -89,6 +89,8 @@ deUint32 getVertexFormatSize (VkFormat format)
                case VK_FORMAT_R8G8B8A8_UINT:
                case VK_FORMAT_R8G8B8A8_SINT:
                case VK_FORMAT_R8G8B8A8_SRGB:
+               case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
                case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
                case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
                case VK_FORMAT_A2R10G10B10_USCALED_PACK32:
@@ -258,6 +260,8 @@ deUint32 getVertexFormatComponentCount (VkFormat format)
                case VK_FORMAT_B8G8R8A8_UINT:
                case VK_FORMAT_B8G8R8A8_SINT:
                case VK_FORMAT_B8G8R8A8_SRGB:
+               case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
                case VK_FORMAT_R16G16B16A16_UNORM:
                case VK_FORMAT_R16G16B16A16_SNORM:
                case VK_FORMAT_R16G16B16A16_USCALED:
@@ -398,6 +402,101 @@ deUint32 getVertexFormatComponentSize (VkFormat format)
        return 0;
 }
 
+deUint32 getPackedVertexFormatComponentWidth(VkFormat format, deUint32 componentNdx)
+{
+       switch (format)
+       {
+               case VK_FORMAT_R4G4_UNORM_PACK8:
+               {
+                       DE_ASSERT(componentNdx < 2);
+                       return 4;
+               }
+               case VK_FORMAT_R5G6B5_UNORM_PACK16:
+               case VK_FORMAT_B5G6R5_UNORM_PACK16:
+               {
+                       deUint32 componentSizes[3] = { 5, 6, 5 };
+
+                       DE_ASSERT(componentNdx < 3);
+                       return componentSizes[componentNdx];
+               }
+               case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
+               case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
+               {
+                       DE_ASSERT(componentNdx < 4);
+                       return 4;
+               }
+               case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
+               case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
+               {
+                       deUint32 componentSizes[4] = { 5, 5, 5, 1 };
+
+                       DE_ASSERT(componentNdx < 4);
+                       return componentSizes[componentNdx];
+               }
+               case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
+               {
+                       deUint32 componentSizes[4] = { 1, 5, 5, 5 };
+
+                       DE_ASSERT(componentNdx < 4);
+                       return componentSizes[componentNdx];
+               }
+               case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_USCALED_PACK32:
+               case VK_FORMAT_A8B8G8R8_SSCALED_PACK32:
+               case VK_FORMAT_A8B8G8R8_UINT_PACK32:
+               case VK_FORMAT_A8B8G8R8_SINT_PACK32:
+               case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
+               {
+                       DE_ASSERT(componentNdx < 4);
+                       return 8;
+               }
+               case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
+               {
+                       deUint32 componentSizes[3] = { 10, 11, 11 };
+
+                       DE_ASSERT(componentNdx < 3);
+                       return componentSizes[componentNdx];
+               }
+               case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
+               case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
+               case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
+               case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
+               case VK_FORMAT_A2R10G10B10_USCALED_PACK32:
+               case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
+               case VK_FORMAT_A2R10G10B10_UINT_PACK32:
+               case VK_FORMAT_A2R10G10B10_SINT_PACK32:
+               case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
+               case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
+               case VK_FORMAT_A2B10G10R10_UINT_PACK32:
+               case VK_FORMAT_A2B10G10R10_SINT_PACK32:
+               {
+                       deUint32 componentSizes[4] = {2, 10, 10, 10};
+
+                       DE_ASSERT(componentNdx < 4);
+                       return componentSizes[componentNdx];
+               }
+               case VK_FORMAT_X8_D24_UNORM_PACK32:
+               {
+                       deUint32 componentSizes[2] = { 8, 24 };
+
+                       DE_ASSERT(componentNdx < 2);
+                       return componentSizes[componentNdx];
+               }
+               case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
+               {
+                       deUint32 componentSizes[4] = { 5, 9, 9, 9 };
+
+                       DE_ASSERT(componentNdx < 4);
+                       return componentSizes[componentNdx];
+               }
+               default:
+                       break;
+       }
+       DE_ASSERT(false);
+       return 0;
+}
+
 bool isVertexFormatComponentOrderBGR (VkFormat format)
 {
        switch (format)
@@ -430,6 +529,50 @@ bool isVertexFormatComponentOrderBGR (VkFormat format)
        return false;
 }
 
+bool isVertexFormatComponentOrderABGR(VkFormat format)
+{
+       switch (format)
+       {
+               case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_USCALED_PACK32:
+               case VK_FORMAT_A8B8G8R8_SSCALED_PACK32:
+               case VK_FORMAT_A8B8G8R8_UINT_PACK32:
+               case VK_FORMAT_A8B8G8R8_SINT_PACK32:
+               case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
+               case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
+               case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
+               case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
+               case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
+               case VK_FORMAT_A2B10G10R10_UINT_PACK32:
+               case VK_FORMAT_A2B10G10R10_SINT_PACK32:
+                       return true;
+
+               default:
+                       break;
+       }
+       return false;
+}
+
+bool isVertexFormatComponentOrderARGB(VkFormat format)
+{
+       switch (format)
+       {
+               case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
+               case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
+               case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
+               case VK_FORMAT_A2R10G10B10_USCALED_PACK32:
+               case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
+               case VK_FORMAT_A2R10G10B10_UINT_PACK32:
+               case VK_FORMAT_A2R10G10B10_SINT_PACK32:
+               return true;
+
+       default:
+               break;
+       }
+       return false;
+}
+
 bool isVertexFormatSint (VkFormat format)
 {
        switch (format)
@@ -440,10 +583,11 @@ bool isVertexFormatSint (VkFormat format)
                case VK_FORMAT_R8G8B8_SINT:
                case VK_FORMAT_B8G8R8_SINT:
                case VK_FORMAT_R8G8B8A8_SINT:
-               case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_SINT_PACK32:
                case VK_FORMAT_R16G16_SINT:
                case VK_FORMAT_R32_SINT:
                case VK_FORMAT_B8G8R8A8_SINT:
+               case VK_FORMAT_A2R10G10B10_SINT_PACK32:
                case VK_FORMAT_A2B10G10R10_SINT_PACK32:
                case VK_FORMAT_R16G16B16_SINT:
                case VK_FORMAT_R16G16B16A16_SINT:
@@ -469,11 +613,12 @@ bool isVertexFormatUint (VkFormat format)
                case VK_FORMAT_R8G8B8_UINT:
                case VK_FORMAT_B8G8R8_UINT:
                case VK_FORMAT_R8G8B8A8_UINT:
+               case VK_FORMAT_A8B8G8R8_UINT_PACK32:
                case VK_FORMAT_A2R10G10B10_UINT_PACK32:
+               case VK_FORMAT_A2B10G10R10_UINT_PACK32:
                case VK_FORMAT_R16G16_UINT:
                case VK_FORMAT_R32_UINT:
                case VK_FORMAT_B8G8R8A8_UINT:
-               case VK_FORMAT_A2B10G10R10_UINT_PACK32:
                case VK_FORMAT_R16G16B16_UINT:
                case VK_FORMAT_R16G16B16A16_UINT:
                case VK_FORMAT_R32G32_UINT:
@@ -540,14 +685,21 @@ bool isVertexFormatUnorm (VkFormat format)
                case VK_FORMAT_R8G8_UNORM:
                case VK_FORMAT_R16_UNORM:
                case VK_FORMAT_R5G6B5_UNORM_PACK16:
+               case VK_FORMAT_B5G6R5_UNORM_PACK16:
+               case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
+               case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
                case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
+               case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
+               case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
                case VK_FORMAT_R8G8B8_UNORM:
                case VK_FORMAT_B8G8R8_UNORM:
                case VK_FORMAT_R8G8B8A8_UNORM:
+               case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
                case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
                case VK_FORMAT_R16G16_UNORM:
                case VK_FORMAT_B8G8R8A8_UNORM:
                case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
+               case VK_FORMAT_X8_D24_UNORM_PACK32:
                case VK_FORMAT_R16G16B16_UNORM:
                case VK_FORMAT_R16G16B16A16_UNORM:
                        return true;
@@ -570,6 +722,7 @@ bool isVertexFormatSnorm (VkFormat format)
                case VK_FORMAT_R8G8B8_SNORM:
                case VK_FORMAT_B8G8R8_SNORM:
                case VK_FORMAT_R8G8B8A8_SNORM:
+               case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
                case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
                case VK_FORMAT_R16G16_SNORM:
                case VK_FORMAT_B8G8R8A8_SNORM:
@@ -596,6 +749,7 @@ bool isVertexFormatSRGB (VkFormat format)
                case VK_FORMAT_B8G8R8_SRGB:
                case VK_FORMAT_R8G8B8A8_SRGB:
                case VK_FORMAT_B8G8R8A8_SRGB:
+               case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
                        return true;
 
                default:
@@ -616,6 +770,7 @@ bool isVertexFormatSscaled (VkFormat format)
                case VK_FORMAT_R8G8B8_SSCALED:
                case VK_FORMAT_B8G8R8_SSCALED:
                case VK_FORMAT_R8G8B8A8_SSCALED:
+               case VK_FORMAT_A8B8G8R8_SSCALED_PACK32:
                case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
                case VK_FORMAT_R16G16_SSCALED:
                case VK_FORMAT_B8G8R8A8_SSCALED:
@@ -683,6 +838,48 @@ bool isVertexFormatDouble (VkFormat format)
        return false;
 }
 
+bool isVertexFormatPacked(VkFormat format)
+{
+       switch (format)
+       {
+               case VK_FORMAT_R4G4_UNORM_PACK8:
+               case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
+               case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
+               case VK_FORMAT_R5G6B5_UNORM_PACK16:
+               case VK_FORMAT_B5G6R5_UNORM_PACK16:
+               case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
+               case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
+               case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
+               case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
+               case VK_FORMAT_A8B8G8R8_USCALED_PACK32:
+               case VK_FORMAT_A8B8G8R8_SSCALED_PACK32:
+               case VK_FORMAT_A8B8G8R8_UINT_PACK32:
+               case VK_FORMAT_A8B8G8R8_SINT_PACK32:
+               case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
+               case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
+               case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
+               case VK_FORMAT_A2R10G10B10_USCALED_PACK32:
+               case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
+               case VK_FORMAT_A2R10G10B10_UINT_PACK32:
+               case VK_FORMAT_A2R10G10B10_SINT_PACK32:
+               case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
+               case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
+               case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
+               case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
+               case VK_FORMAT_A2B10G10R10_UINT_PACK32:
+               case VK_FORMAT_A2B10G10R10_SINT_PACK32:
+               case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
+               case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
+               case VK_FORMAT_X8_D24_UNORM_PACK32:
+                       return true;
+
+               default:
+                       break;
+       }
+       return false;
+}
+
 std::vector<Vertex4RGBA> createOverlappingQuads (void)
 {
        using tcu::Vec2;
index 96c8bd1..0da138f 100644 (file)
@@ -47,20 +47,24 @@ struct Vertex4Tex4
        tcu::Vec4 texCoord;
 };
 
-deUint32                                       getVertexFormatSize                             (vk::VkFormat format);
-deUint32                                       getVertexFormatComponentCount   (vk::VkFormat format);
-deUint32                                       getVertexFormatComponentSize    (vk::VkFormat format);
-bool                                           isVertexFormatComponentOrderBGR (vk::VkFormat format);
-bool                                           isVertexFormatSint                              (vk::VkFormat format);
-bool                                           isVertexFormatUint                              (vk::VkFormat format);
-bool                                           isVertexFormatSfloat                    (vk::VkFormat format);
-bool                                           isVertexFormatUfloat                    (vk::VkFormat format);
-bool                                           isVertexFormatUnorm                             (vk::VkFormat format);
-bool                                           isVertexFormatSnorm                             (vk::VkFormat format);
-bool                                           isVertexFormatSRGB                              (vk::VkFormat format);
-bool                                           isVertexFormatSscaled                   (vk::VkFormat format);
-bool                                           isVertexFormatUscaled                   (vk::VkFormat format);
-bool                                           isVertexFormatDouble                    (vk::VkFormat format);
+deUint32                                       getVertexFormatSize                                     (vk::VkFormat format);
+deUint32                                       getVertexFormatComponentCount           (vk::VkFormat format);
+deUint32                                       getVertexFormatComponentSize            (vk::VkFormat format);
+deUint32                                       getPackedVertexFormatComponentWidth     (vk::VkFormat format, deUint32 componentNdx);
+bool                                           isVertexFormatComponentOrderBGR         (vk::VkFormat format);
+bool                                           isVertexFormatComponentOrderABGR        (vk::VkFormat format);
+bool                                           isVertexFormatComponentOrderARGB        (vk::VkFormat format);
+bool                                           isVertexFormatSint                                      (vk::VkFormat format);
+bool                                           isVertexFormatUint                                      (vk::VkFormat format);
+bool                                           isVertexFormatSfloat                            (vk::VkFormat format);
+bool                                           isVertexFormatUfloat                            (vk::VkFormat format);
+bool                                           isVertexFormatUnorm                                     (vk::VkFormat format);
+bool                                           isVertexFormatSnorm                                     (vk::VkFormat format);
+bool                                           isVertexFormatSRGB                                      (vk::VkFormat format);
+bool                                           isVertexFormatSscaled                           (vk::VkFormat format);
+bool                                           isVertexFormatUscaled                           (vk::VkFormat format);
+bool                                           isVertexFormatDouble                            (vk::VkFormat format);
+bool                                           isVertexFormatPacked                            (vk::VkFormat format);
 
 /*! \brief Creates a pattern of 4 overlapping quads.
  *
index fd1077c..268cbb8 100644 (file)
@@ -162680,6 +162680,8 @@ dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r16g16b16a16_sint_rate_v
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r16g16b16a16_sint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r32g32b32a32_sint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r32g32b32a32_sint_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_a2r10g10b10_sint_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_a2r10g10b10_sint_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r8_uint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r8_uint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r16_uint_rate_vertex
@@ -162700,6 +162702,8 @@ dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r16g16b16a16_uint_rate_v
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r16g16b16a16_uint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r32g32b32a32_uint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r32g32b32a32_uint_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_unorm_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_unorm_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_snorm_rate_vertex
@@ -162788,6 +162792,22 @@ dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_r8g8b8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_r8g8b8a8_srgb_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_b8g8r8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_b8g8r8a8_srgb_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_uscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_uscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_sscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_sscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_snorm_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_unorm_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_unorm_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_snorm_rate_vertex
@@ -162858,6 +162878,22 @@ dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_r8g8b8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_r8g8b8a8_srgb_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_b8g8r8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_b8g8r8a8_srgb_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_uscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_uscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_sscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_sscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_snorm_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.double.as_r64_sfloat_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.double.as_r64_sfloat_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.dvec2.as_r64g64_sfloat_rate_vertex
index de66e1b..5b67cf0 100644 (file)
@@ -162680,6 +162680,8 @@ dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r16g16b16a16_sint_rate_v
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r16g16b16a16_sint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r32g32b32a32_sint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_r32g32b32a32_sint_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_a2r10g10b10_sint_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.ivec4.as_a2r10g10b10_sint_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r8_uint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r8_uint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uint.as_r16_uint_rate_vertex
@@ -162700,6 +162702,8 @@ dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r16g16b16a16_uint_rate_v
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r16g16b16a16_uint_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r32g32b32a32_uint_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_r32g32b32a32_uint_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_unorm_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_unorm_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.float.as_r8_snorm_rate_vertex
@@ -162788,6 +162792,22 @@ dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_r8g8b8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_r8g8b8a8_srgb_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_b8g8r8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_b8g8r8a8_srgb_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_uscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_uscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_sscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_sscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a8b8g8r8_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2r10g10b10_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.vec4.as_a2b10g10r10_snorm_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_unorm_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_unorm_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat2.as_r8g8_snorm_rate_vertex
@@ -162858,6 +162878,22 @@ dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_r8g8b8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_r8g8b8a8_srgb_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_b8g8r8a8_srgb_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_b8g8r8a8_srgb_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_uscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_uscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_sscaled_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_sscaled_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a8b8g8r8_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10_snorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_unorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_unorm_pack32_rate_instance
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_snorm_pack32_rate_vertex
+dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2b10g10r10_snorm_pack32_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.double.as_r64_sfloat_rate_vertex
 dEQP-VK.pipeline.vertex_input.single_attribute.double.as_r64_sfloat_rate_instance
 dEQP-VK.pipeline.vertex_input.single_attribute.dvec2.as_r64g64_sfloat_rate_vertex