blob: 98caa425433fb2cca05297edbbb82cfaf5e7d516 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 27
; Schema: 0
OpCapability Shader
OpCapability GroupNonUniform
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %subgroup_invocation_id_1 %subgroup_size_1
OpExecutionMode %main LocalSize 1 1 1
OpName %subgroup_invocation_id_1 "subgroup_invocation_id_1"
OpName %subgroup_size_1 "subgroup_size_1"
OpName %output_block "output_block"
OpMemberName %output_block 0 "inner"
OpName %output "output"
OpName %ComputeInputs "ComputeInputs"
OpMemberName %ComputeInputs 0 "subgroup_invocation_id"
OpMemberName %ComputeInputs 1 "subgroup_size"
OpName %main_inner "main_inner"
OpName %inputs "inputs"
OpName %main "main"
OpDecorate %subgroup_invocation_id_1 BuiltIn SubgroupLocalInvocationId
OpDecorate %subgroup_size_1 BuiltIn SubgroupSize
OpDecorate %output_block Block
OpMemberDecorate %output_block 0 Offset 0
OpDecorate %_runtimearr_uint ArrayStride 4
OpDecorate %output DescriptorSet 0
OpDecorate %output Binding 0
OpMemberDecorate %ComputeInputs 0 Offset 0
OpMemberDecorate %ComputeInputs 1 Offset 4
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%subgroup_invocation_id_1 = OpVariable %_ptr_Input_uint Input
%subgroup_size_1 = OpVariable %_ptr_Input_uint Input
%_runtimearr_uint = OpTypeRuntimeArray %uint
%output_block = OpTypeStruct %_runtimearr_uint
%_ptr_StorageBuffer_output_block = OpTypePointer StorageBuffer %output_block
%output = OpVariable %_ptr_StorageBuffer_output_block StorageBuffer
%void = OpTypeVoid
%ComputeInputs = OpTypeStruct %uint %uint
%9 = OpTypeFunction %void %ComputeInputs
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%20 = OpTypeFunction %void
%main_inner = OpFunction %void None %9
%inputs = OpFunctionParameter %ComputeInputs
%14 = OpLabel
%16 = OpCompositeExtract %uint %inputs 0
%18 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %16
%19 = OpCompositeExtract %uint %inputs 1
OpStore %18 %19
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%22 = OpLabel
%24 = OpLoad %uint %subgroup_invocation_id_1
%25 = OpLoad %uint %subgroup_size_1
%26 = OpCompositeConstruct %ComputeInputs %24 %25
%23 = OpFunctionCall %void %main_inner %26
OpReturn
OpFunctionEnd