| ; Test: SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm |
| ; SPIR-V |
| ; Version: 1.0 |
| ; Generator: Khronos SPIR-V Tools Assembler; 0 |
| ; Bound: 101 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical Simple |
| OpEntryPoint Fragment %100 "main" |
| OpExecutionMode %100 OriginUpperLeft |
| OpName %myvar "myvar" |
| OpName %a_dynamic_index "a_dynamic_index" |
| %void = OpTypeVoid |
| %4 = OpTypeFunction %void |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_2 = OpConstant %uint 2 |
| %uint_42 = OpConstant %uint 42 |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %_ptr_Private_v4uint = OpTypePointer Private %v4uint |
| %myvar = OpVariable %_ptr_Private_v4uint Private |
| %10 = OpVariable %_ptr_Private_v4uint Private |
| %100 = OpFunction %void None %4 |
| %15 = OpLabel |
| %11 = OpLoad %v4uint %10 |
| %12 = OpCompositeExtract %uint %11 2 |
| %a_dynamic_index = OpCopyObject %uint %12 |
| %2 = OpAccessChain %_ptr_Private_uint %myvar %a_dynamic_index |
| OpStore %2 %uint_42 |
| OpReturn |
| OpFunctionEnd |
| |