2021-06-03 09:38:34 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2021-09-13 17:11:58 +00:00
|
|
|
; Bound: 36
|
2021-06-03 09:38:34 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpMemoryModel Logical GLSL450
|
2021-09-13 17:11:58 +00:00
|
|
|
OpEntryPoint GLCompute %main "main" %local_invocation_id_1 %local_invocation_index_1 %global_invocation_id_1 %workgroup_id_1 %num_workgroups_1
|
2021-06-03 09:38:34 +00:00
|
|
|
OpExecutionMode %main LocalSize 1 1 1
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %local_invocation_id_1 "local_invocation_id_1"
|
|
|
|
OpName %local_invocation_index_1 "local_invocation_index_1"
|
|
|
|
OpName %global_invocation_id_1 "global_invocation_id_1"
|
|
|
|
OpName %workgroup_id_1 "workgroup_id_1"
|
2021-09-13 17:11:58 +00:00
|
|
|
OpName %num_workgroups_1 "num_workgroups_1"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %main_inner "main_inner"
|
|
|
|
OpName %local_invocation_id "local_invocation_id"
|
|
|
|
OpName %local_invocation_index "local_invocation_index"
|
|
|
|
OpName %global_invocation_id "global_invocation_id"
|
|
|
|
OpName %workgroup_id "workgroup_id"
|
2021-09-13 17:11:58 +00:00
|
|
|
OpName %num_workgroups "num_workgroups"
|
2021-06-03 09:38:34 +00:00
|
|
|
OpName %main "main"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpDecorate %local_invocation_id_1 BuiltIn LocalInvocationId
|
|
|
|
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
|
|
|
OpDecorate %global_invocation_id_1 BuiltIn GlobalInvocationId
|
|
|
|
OpDecorate %workgroup_id_1 BuiltIn WorkgroupId
|
2021-09-13 17:11:58 +00:00
|
|
|
OpDecorate %num_workgroups_1 BuiltIn NumWorkgroups
|
2021-06-03 09:38:34 +00:00
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%v3uint = OpTypeVector %uint 3
|
|
|
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%local_invocation_id_1 = OpVariable %_ptr_Input_v3uint Input
|
2021-06-03 09:38:34 +00:00
|
|
|
%_ptr_Input_uint = OpTypePointer Input %uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
|
|
|
%global_invocation_id_1 = OpVariable %_ptr_Input_v3uint Input
|
|
|
|
%workgroup_id_1 = OpVariable %_ptr_Input_v3uint Input
|
2021-09-13 17:11:58 +00:00
|
|
|
%num_workgroups_1 = OpVariable %_ptr_Input_v3uint Input
|
2021-06-03 09:38:34 +00:00
|
|
|
%void = OpTypeVoid
|
2021-09-13 17:11:58 +00:00
|
|
|
%10 = OpTypeFunction %void %v3uint %uint %v3uint %v3uint %v3uint
|
|
|
|
%27 = OpTypeFunction %void
|
|
|
|
%main_inner = OpFunction %void None %10
|
2021-08-05 17:34:19 +00:00
|
|
|
%local_invocation_id = OpFunctionParameter %v3uint
|
|
|
|
%local_invocation_index = OpFunctionParameter %uint
|
|
|
|
%global_invocation_id = OpFunctionParameter %v3uint
|
|
|
|
%workgroup_id = OpFunctionParameter %v3uint
|
2021-09-13 17:11:58 +00:00
|
|
|
%num_workgroups = OpFunctionParameter %v3uint
|
|
|
|
%18 = OpLabel
|
|
|
|
%19 = OpCompositeExtract %uint %local_invocation_id 0
|
|
|
|
%20 = OpIAdd %uint %19 %local_invocation_index
|
|
|
|
%21 = OpCompositeExtract %uint %global_invocation_id 0
|
2021-08-05 17:34:19 +00:00
|
|
|
%22 = OpIAdd %uint %20 %21
|
2021-09-13 17:11:58 +00:00
|
|
|
%23 = OpCompositeExtract %uint %workgroup_id 0
|
|
|
|
%24 = OpIAdd %uint %22 %23
|
|
|
|
%25 = OpCompositeExtract %uint %num_workgroups 0
|
|
|
|
%26 = OpIAdd %uint %24 %25
|
2021-08-05 17:34:19 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2021-09-13 17:11:58 +00:00
|
|
|
%main = OpFunction %void None %27
|
|
|
|
%29 = OpLabel
|
|
|
|
%31 = OpLoad %v3uint %local_invocation_id_1
|
|
|
|
%32 = OpLoad %uint %local_invocation_index_1
|
|
|
|
%33 = OpLoad %v3uint %global_invocation_id_1
|
|
|
|
%34 = OpLoad %v3uint %workgroup_id_1
|
|
|
|
%35 = OpLoad %v3uint %num_workgroups_1
|
|
|
|
%30 = OpFunctionCall %void %main_inner %31 %32 %33 %34 %35
|
2021-06-03 09:38:34 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|