blob: ce7f83a28a8c9c1b8d95664d37c7e1292b3b88c2 [file] [log] [blame]
David Netod1a026e2021-07-30 16:03:06 +00001; 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
7OpCapability Shader
8OpMemoryModel Logical Simple
9OpEntryPoint Fragment %100 "main"
10OpExecutionMode %100 OriginUpperLeft
11OpName %myvar "myvar"
12OpMemberName %_struct_4 0 "first"
13OpMemberName %_struct_4 1 "rtarr"
14OpDecorate %_struct_4 Block
15OpMemberDecorate %_struct_4 0 Offset 0
16OpMemberDecorate %_struct_4 1 Offset 4
17OpDecorate %_runtimearr_uint ArrayStride 4
18OpDecorate %myvar DescriptorSet 0
19OpDecorate %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
34OpReturn
35OpFunctionEnd
36