| ; Test: SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.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" |
| OpMemberName %_struct_3 1 "age" |
| OpDecorate %myvar DescriptorSet 0 |
| OpDecorate %myvar Binding 0 |
| OpDecorate %_struct_3 BufferBlock |
| OpMemberDecorate %_struct_3 0 Offset 0 |
| OpMemberDecorate %_struct_3 1 Offset 4 |
| OpDecorate %_runtimearr_float ArrayStride 4 |
| %void = OpTypeVoid |
| %6 = OpTypeFunction %void |
| %float = OpTypeFloat 32 |
| %float_42 = OpConstant %float 42 |
| %_runtimearr_float = OpTypeRuntimeArray %float |
| %_struct_3 = OpTypeStruct %float %_runtimearr_float |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %_ptr_Uniform__struct_3 = OpTypePointer Uniform %_struct_3 |
| %uint = OpTypeInt 32 0 |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %myvar = OpVariable %_ptr_Uniform__struct_3 Uniform |
| %100 = OpFunction %void None %6 |
| %14 = OpLabel |
| %2 = OpAccessChain %_ptr_Uniform_float %myvar %uint_1 %uint_2 |
| OpStore %2 %float_42 |
| OpReturn |
| OpFunctionEnd |
| |