Fix multiple ArrayStride decorations in float_controls
authorPiotr Byszewski <piotr.byszewski@mobica.com>
Tue, 18 Dec 2018 11:00:56 +0000 (12:00 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 18 Dec 2018 14:24:57 +0000 (09:24 -0500)
Most of float_controls tests that were executed on fragment stage
had an extra ArrayStride decorations for the same arrays. This change
corrects SPIR-V generation so that second set of ArrayStride
decorations is added only when tested operation input type is
different from operation result type.

Components: Vulkan

VK-GL-CTS issue: 1522

Affects:
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.*_frag

Change-Id: I3e72414e00bd82ff7a9975ff9148e9889bb32246

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp

index 1fb012d..4f8c0d6 100644 (file)
@@ -3013,12 +3013,11 @@ InstanceContext GraphicsTestGroupBuilder::createInstanceContext(const TestCaseIn
        }
        else // perform test in fragment stage - vertex stage is empty
        {
-               fragAnnotations = inTypeSnippets->inputAnnotationsSnippet + inTypeSnippets->typeAnnotationsSnippet +
-                                                 outTypeSnippets->outputAnnotationsSnippet + outTypeSnippets->typeAnnotationsSnippet;
-
                // check if input type is different from tested type
                if (testOperation.isInputTypeRestricted)
                {
+                       fragAnnotations         = inTypeSnippets->inputAnnotationsSnippet + inTypeSnippets->typeAnnotationsSnippet +
+                                                                 outTypeSnippets->outputAnnotationsSnippet + outTypeSnippets->typeAnnotationsSnippet;
                        fragCapabilities        = behaviorCapability + inTypeSnippets->capabilities + outTypeSnippets->capabilities;
                        fragExtensions          = inTypeSnippets->extensions + outTypeSnippets->extensions;
                        fragTypes                       = inTypeSnippets->typeDefinitionsSnippet + outTypeSnippets->typeDefinitionsSnippet;
@@ -3028,6 +3027,8 @@ InstanceContext GraphicsTestGroupBuilder::createInstanceContext(const TestCaseIn
                {
                        // input and output types are the same
 
+                       fragAnnotations         = inTypeSnippets->inputAnnotationsSnippet + inTypeSnippets->typeAnnotationsSnippet +
+                                                                 outTypeSnippets->outputAnnotationsSnippet;
                        fragCapabilities        = behaviorCapability + outTypeSnippets->capabilities;
                        fragExtensions          = outTypeSnippets->extensions;
                        fragTypes                       = outTypeSnippets->typeDefinitionsSnippet;