David Neto | d1a026e | 2021-07-30 16:03:06 +0000 | [diff] [blame] | 1 | ; Test: SpvParserMemoryTest_ArrayLength_FromAccessChain.spvasm |
| 2 | ; SPIR-V |
| 3 | ; Version: 1.0 |
| 4 | ; Generator: Khronos SPIR-V Tools Assembler; 0 |
| 5 | ; Bound: 101 |
| 6 | ; Schema: 0 |
| 7 | OpCapability Shader |
| 8 | OpMemoryModel Logical Simple |
| 9 | OpEntryPoint Fragment %100 "main" |
| 10 | OpExecutionMode %100 OriginUpperLeft |
| 11 | OpName %myvar "myvar" |
| 12 | OpMemberName %_struct_4 0 "first" |
| 13 | OpMemberName %_struct_4 1 "rtarr" |
| 14 | OpDecorate %_struct_4 Block |
| 15 | OpMemberDecorate %_struct_4 0 Offset 0 |
| 16 | OpMemberDecorate %_struct_4 1 Offset 4 |
| 17 | OpDecorate %_runtimearr_uint ArrayStride 4 |
| 18 | OpDecorate %myvar DescriptorSet 0 |
| 19 | OpDecorate %myvar Binding 0 |
| 20 | %void = OpTypeVoid |
| 21 | %7 = OpTypeFunction %void |
| 22 | %uint = OpTypeInt 32 0 |
| 23 | %uint_0 = OpConstant %uint 0 |
| 24 | %uint_1 = OpConstant %uint 1 |
| 25 | %_runtimearr_uint = OpTypeRuntimeArray %uint |
| 26 | %_struct_4 = OpTypeStruct %uint %_runtimearr_uint |
| 27 | %_ptr_StorageBuffer__struct_4 = OpTypePointer StorageBuffer %_struct_4 |
| 28 | %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| 29 | %myvar = OpVariable %_ptr_StorageBuffer__struct_4 StorageBuffer |
| 30 | %100 = OpFunction %void None %7 |
| 31 | %13 = OpLabel |
| 32 | %2 = OpAccessChain %_ptr_StorageBuffer__struct_4 %myvar |
| 33 | %1 = OpArrayLength %uint %2 1 |
| 34 | OpReturn |
| 35 | OpFunctionEnd |
| 36 | |