Fix OpVariable position in OpInBoundsAccessChain tests.
authorGabor Abraham <gabraham.u-szeged@partner.samsung.com>
Thu, 8 Sep 2016 15:15:35 +0000 (17:15 +0200)
committerPyry Haulos <phaulos@google.com>
Fri, 9 Sep 2016 20:28:09 +0000 (16:28 -0400)
Fixes #489

Change-Id: I4ee027fd82f5a5f5d54dd3abd4d9b50250eb3e31

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

index f186e4f..dd92371 100644 (file)
@@ -8654,6 +8654,7 @@ const string specializeInBoundsShaderTemplate (const NumberType type, const Asse
                "%zero      = OpConstant %u32 0\n"
                "%main      = OpFunction %void None %voidf\n"
                "%label     = OpLabel\n"
+               "%struct_v  = OpVariable %struct_p Function\n"
                "%idval     = OpLoad %uvec3 %id\n"
                "%x         = OpCompositeExtract %u32 %idval 0\n"
                // Create the input/output type
@@ -8668,7 +8669,6 @@ const string specializeInBoundsShaderTemplate (const NumberType type, const Asse
                // Insert the value
                "%comp_obj  = OpCompositeInsert %struct_t %inval %struct ${insertIndexes}\n"
                // Store the object
-               "%struct_v  = OpVariable %struct_p Function\n"
                "             OpStore %struct_v %comp_obj\n"
                // Get deepest possible composite pointer
                "%inner_ptr = OpInBoundsAccessChain %composite_p %struct_v${accessChainIndexes}\n"