blob: ce7f83a28a8c9c1b8d95664d37c7e1292b3b88c2 [file] [log] [blame] [edit]
; Test: SpvParserMemoryTest_ArrayLength_FromAccessChain.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_4 0 "first"
OpMemberName %_struct_4 1 "rtarr"
OpDecorate %_struct_4 Block
OpMemberDecorate %_struct_4 0 Offset 0
OpMemberDecorate %_struct_4 1 Offset 4
OpDecorate %_runtimearr_uint ArrayStride 4
OpDecorate %myvar DescriptorSet 0
OpDecorate %myvar Binding 0
%void = OpTypeVoid
%7 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_runtimearr_uint = OpTypeRuntimeArray %uint
%_struct_4 = OpTypeStruct %uint %_runtimearr_uint
%_ptr_StorageBuffer__struct_4 = OpTypePointer StorageBuffer %_struct_4
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%myvar = OpVariable %_ptr_StorageBuffer__struct_4 StorageBuffer
%100 = OpFunction %void None %7
%13 = OpLabel
%2 = OpAccessChain %_ptr_StorageBuffer__struct_4 %myvar
%1 = OpArrayLength %uint %2 1
OpReturn
OpFunctionEnd