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