SPIR-V requires that all OpVariable instructions in a function
must be in the first block in the function.
VK-GL-CTS issue: 1382
Components: Vulkan
Affects:
dEQP-VK.spirv_assembly.instruction.graphics.opspecconstantop.*
dEQP-VK.spirv_assembly.instruction.graphics.variable_init.*
Change-Id: I797e0235c4eaab4f86754bade948dc062d17ca2b
"%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
"%param = OpFunctionParameter %v4f32\n"
"%label = OpLabel\n"
- "${TYPE_CONVERT:opt}"
"%result = OpVariable %fp_v4f32 Function\n"
+ "${TYPE_CONVERT:opt}"
" OpStore %result %param\n"
"%gen = ${GEN_RESULT}\n"
"%index = OpIAdd %i32 %gen %c_i32_1\n"
" %test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
" %param = OpFunctionParameter %v4f32\n"
" %entry = OpLabel\n"
- " %outputData = OpLoad %${type} %f1\n"
" %i = OpVariable %fp_i32 Function\n"
+ " %outputData = OpLoad %${type} %f1\n"
" OpStore %i %c_i32_0\n"
" OpBranch %loop\n"
" %loop = OpLabel\n"