Remove invalid SPIR-V decorations
authorIlkka Saarelainen <ilkka.saarelainen@siru.fi>
Tue, 7 Sep 2021 13:03:46 +0000 (16:03 +0300)
committerIlkka Saarelainen <ilkka.saarelainen@siru.fi>
Wed, 8 Sep 2021 03:57:26 +0000 (06:57 +0300)
Some SPIR-V asm tests used invalid Binding and DescriptorSet decorations.
This CL removes those decorations.

Affects:

dEQP-VK.spirv_assembly.instruction.compute.physical_pointers.complex_types_compute.*
dEQP-VK.spirv_assembly.instruction.compute.pointer_parameter.buffer_memory
dEQP-VK.spirv_assembly.instruction.graphics.pointer_parameter.buffer_memory*
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_16x2.scalar
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_16x2.vec2
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_int_16_to_16x2.scalar_int
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_int_16_to_16x2.scalar_uint
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_int_16_to_16x2.ivec2
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_int_16_to_16x2.uvec2

Components: Vulkan

VK-GL-CTS issue: 3063

Change-Id: Icfee33f9ce041bf60a19fba55aef9fdab0747148

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm16bitStorageTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmPointerParameterTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp

index 4dad8c7..61b0d90 100644 (file)
@@ -4054,7 +4054,6 @@ void addShaderCode16BitStorageInputOutput16To16x2 (vk::SourceCollections& dst, T
                "                             OpDecorate %gl_PerVertex Block\n"
                "                             OpDecorate %position Location 0\n"
                "                             OpDecorate %vtxColor Location 1\n"
-               "                             OpDecorate %dataIn Binding 1\n"
                "                             OpDecorate %dataIn Location 2\n"
                "                             OpDecorate %color Location 1\n"
                "                             OpDecorate %dataOut0 Location 2\n"
index 82a58c4..3f091c9 100644 (file)
@@ -305,10 +305,6 @@ void addComputePointerBufferMemoryTest (tcu::TestCaseGroup* group)
                        "                          OpDecorate %Output Block\n"
                        "                          OpDecorate %dataOutput DescriptorSet 0\n"
                        "                          OpDecorate %dataOutput Binding 0\n"
-                       "                          OpDecorate %f0 DescriptorSet 0\n"
-                       "                          OpDecorate %f0 Binding 0\n"
-                       "                          OpDecorate %f1 DescriptorSet 0\n"
-                       "                          OpDecorate %f1 Binding 0\n"
                        "                          OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId\n"
                        "                  %void = OpTypeVoid\n"
                        "             %void_func = OpTypeFunction %void\n"
@@ -936,10 +932,6 @@ void addGraphicsPointerBufferMemoryTest (tcu::TestCaseGroup* group)
                "                          OpDecorate %Output Block\n"
                "                          OpDecorate %dataOutput DescriptorSet 0\n"
                "                          OpDecorate %dataOutput Binding 0\n"
-               "                          OpDecorate %f0 DescriptorSet 0\n"
-               "                          OpDecorate %f0 Binding 0\n"
-               "                          OpDecorate %f1 DescriptorSet 0\n"
-               "                          OpDecorate %f1 Binding 0\n"
                "                          OpDecorate %arr_v4f32_2 ArrayStride 16\n"
                "                          OpDecorate %arr_v4f32_rt ArrayStride 16\n";
 
index e20712b..05b324c 100644 (file)
@@ -748,23 +748,23 @@ void addComplexTypesPhysicalOrVariablePointersComputeGroup (tcu::TestCaseGroup*
                "OpDecorate %outer_struct_ptr    ArrayStride 256        \n"
                "OpDecorate %v4f32_ptr           ArrayStride 16         \n";
 
-       const string inputABDecorations (
+       string inputABDecorations = physPtrs ? "" :
                "OpDecorate %inputA DescriptorSet 0                             \n"
                "OpDecorate %inputB DescriptorSet 0                             \n"
                "OpDecorate %inputA Binding 0                                   \n"
-               "OpDecorate %inputB Binding 1                                   \n"
+               "OpDecorate %inputB Binding 1                                   \n";
 
                // inputA and inputB have type outer_struct so it needs Block
-               "OpDecorate %outer_struct       Block                           \n"
-       );
+       inputABDecorations +=
+               "OpDecorate %outer_struct       Block                           \n";
 
-       const string inputCDecorations (
+       string inputCDecorations = physPtrs ? "" :
                "OpDecorate %inputC DescriptorSet 0                             \n"
-               "OpDecorate %inputC Binding 2                                   \n"
+               "OpDecorate %inputC Binding 2                                   \n";
 
+       inputCDecorations += physPtrs ? "" :
                // inputC has type input_buffer so it needs Block
-               "OpDecorate %input_buffer       Block                           \n"
-       );
+               "OpDecorate %input_buffer       Block                           \n";
 
        string types =
                ///////////////