Created
February 10, 2023 18:24
-
-
Save pashu123/a5c8c10298c04f0575df8eff8fd3fa66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; SPIR-V | |
; Version: 1.3 | |
; Generator: Khronos; 22 | |
; Bound: 138 | |
; Schema: 0 | |
OpCapability Shader | |
OpCapability Int64 | |
OpCapability GroupNonUniformShuffle | |
OpExtension "SPV_KHR_storage_buffer_storage_class" | |
%104 = OpExtInstImport "GLSL.std.450" | |
OpMemoryModel Logical GLSL450 | |
OpEntryPoint GLCompute %forward_dispatch_43_generic_10x9216x9216 "forward_dispatch_43_generic_10x9216x9216" %__builtin_var_LocalInvocationId__ %__builtin_var_WorkgroupId__ | |
OpExecutionMode %forward_dispatch_43_generic_10x9216x9216 LocalSize 256 1 1 | |
OpName %__workgroup_mem__4 "__workgroup_mem__4" | |
OpName %__builtin_var_WorkgroupId__ "__builtin_var_WorkgroupId__" | |
OpName %__builtin_var_LocalInvocationId__ "__builtin_var_LocalInvocationId__" | |
OpName %__resource_var_0_0_ "__resource_var_0_0_" | |
OpName %__resource_var_0_1_ "__resource_var_0_1_" | |
OpName %forward_dispatch_43_generic_10x9216x9216 "forward_dispatch_43_generic_10x9216x9216" | |
OpDecorate %__builtin_var_WorkgroupId__ BuiltIn WorkgroupId | |
OpDecorate %__builtin_var_LocalInvocationId__ BuiltIn LocalInvocationId | |
OpDecorate %_runtimearr_v4float ArrayStride 16 | |
OpMemberDecorate %_struct_13 0 Offset 0 | |
OpDecorate %_struct_13 Block | |
OpDecorate %__resource_var_0_0_ Binding 0 | |
OpDecorate %__resource_var_0_0_ DescriptorSet 0 | |
OpDecorate %__resource_var_0_1_ Binding 1 | |
OpDecorate %__resource_var_0_1_ DescriptorSet 0 | |
%float = OpTypeFloat 32 | |
%uint = OpTypeInt 32 0 | |
%uint_8 = OpConstant %uint 8 | |
%_arr_float_uint_8 = OpTypeArray %float %uint_8 | |
%_struct_2 = OpTypeStruct %_arr_float_uint_8 | |
%_ptr_Workgroup__struct_2 = OpTypePointer Workgroup %_struct_2 | |
%__workgroup_mem__4 = OpVariable %_ptr_Workgroup__struct_2 Workgroup | |
%v3uint = OpTypeVector %uint 3 | |
%_ptr_Input_v3uint = OpTypePointer Input %v3uint | |
%__builtin_var_WorkgroupId__ = OpVariable %_ptr_Input_v3uint Input | |
%__builtin_var_LocalInvocationId__ = OpVariable %_ptr_Input_v3uint Input | |
%v4float = OpTypeVector %float 4 | |
%_runtimearr_v4float = OpTypeRuntimeArray %v4float | |
%_struct_13 = OpTypeStruct %_runtimearr_v4float | |
%_ptr_StorageBuffer__struct_13 = OpTypePointer StorageBuffer %_struct_13 | |
%__resource_var_0_0_ = OpVariable %_ptr_StorageBuffer__struct_13 StorageBuffer | |
%__resource_var_0_1_ = OpVariable %_ptr_StorageBuffer__struct_13 StorageBuffer | |
%void = OpTypeVoid | |
%18 = OpTypeFunction %void | |
%ulong = OpTypeInt 64 0 | |
%ulong_218234880 = OpConstant %ulong 218234880 | |
%ulong_2304 = OpConstant %ulong 2304 | |
%ulong_21233664 = OpConstant %ulong 21233664 | |
%ulong_18446744073709551615 = OpConstant %ulong 18446744073709551615 | |
%ulong_4 = OpConstant %ulong 4 | |
%ulong_0 = OpConstant %ulong 0 | |
%float_0 = OpConstant %float 0 | |
%29 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 | |
%uint_1 = OpConstant %uint 1 | |
%uint_2 = OpConstant %uint 2 | |
%uint_4 = OpConstant %uint 4 | |
%uint_16 = OpConstant %uint 16 | |
%ulong_32 = OpConstant %ulong 32 | |
%ulong_7 = OpConstant %ulong 7 | |
%uint_0 = OpConstant %uint 0 | |
%ulong_1024 = OpConstant %ulong 1024 | |
%ulong_9216 = OpConstant %ulong 9216 | |
%_ptr_Function_v4float = OpTypePointer Function %v4float | |
%bool = OpTypeBool | |
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float | |
%uint_3 = OpConstant %uint 3 | |
%_ptr_Workgroup_float = OpTypePointer Workgroup %float | |
%uint_264 = OpConstant %uint 264 | |
%forward_dispatch_43_generic_10x9216x9216 = OpFunction %void None %18 | |
%21 = OpLabel | |
%50 = OpVariable %_ptr_Function_v4float Function | |
%40 = OpLoad %v3uint %__builtin_var_LocalInvocationId__ | |
%41 = OpCompositeExtract %uint %40 0 | |
%42 = OpUConvert %ulong %41 | |
%43 = OpLoad %v3uint %__builtin_var_WorkgroupId__ | |
%44 = OpCompositeExtract %uint %43 0 | |
%45 = OpUConvert %ulong %44 | |
%46 = OpLoad %v3uint %__builtin_var_WorkgroupId__ | |
%47 = OpCompositeExtract %uint %46 1 | |
%48 = OpUConvert %ulong %47 | |
OpBranch %51 | |
%51 = OpLabel | |
%54 = OpPhi %ulong %74 %52 %ulong_0 %21 | |
%55 = OpPhi %v4float %73 %52 %29 %21 | |
%57 = OpSLessThan %bool %54 %ulong_9216 | |
OpLoopMerge %53 %52 None | |
OpBranchConditional %57 %52 %53 | |
%52 = OpLabel | |
%58 = OpSLessThan %bool %54 %ulong_0 | |
%59 = OpISub %ulong %ulong_18446744073709551615 %54 | |
%60 = OpSelect %ulong %58 %59 %54 | |
%61 = OpSDiv %ulong %60 %ulong_4 | |
%62 = OpISub %ulong %ulong_18446744073709551615 %61 | |
%63 = OpSelect %ulong %58 %62 %61 | |
%64 = OpIMul %ulong %48 %ulong_21233664 | |
%65 = OpIAdd %ulong %42 %64 | |
%66 = OpIMul %ulong %45 %ulong_2304 | |
%67 = OpIAdd %ulong %65 %66 | |
%68 = OpIAdd %ulong %63 %67 | |
%69 = OpIAdd %ulong %68 %ulong_218234880 | |
%71 = OpAccessChain %_ptr_StorageBuffer_v4float %__resource_var_0_0_ %ulong_0 %69 | |
%72 = OpLoad %v4float %71 | |
%73 = OpFAdd %v4float %72 %55 | |
OpStore %50 %73 | |
%74 = OpIAdd %ulong %54 %ulong_1024 | |
OpBranch %51 | |
%53 = OpLabel | |
%75 = OpLoad %v4float %50 | |
%76 = OpCompositeExtract %float %75 0 | |
%77 = OpCompositeExtract %float %75 1 | |
%78 = OpCompositeExtract %float %75 2 | |
%79 = OpCompositeExtract %float %75 3 | |
%80 = OpFAdd %float %76 %77 | |
%81 = OpFAdd %float %80 %78 | |
%82 = OpFAdd %float %81 %79 | |
%83 = OpGroupNonUniformShuffleXor %float %uint_3 %82 %uint_1 | |
%85 = OpFAdd %float %82 %83 | |
%86 = OpGroupNonUniformShuffleXor %float %uint_3 %85 %uint_2 | |
%87 = OpFAdd %float %85 %86 | |
%88 = OpGroupNonUniformShuffleXor %float %uint_3 %87 %uint_4 | |
%89 = OpFAdd %float %87 %88 | |
%90 = OpGroupNonUniformShuffleXor %float %uint_3 %89 %uint_8 | |
%91 = OpFAdd %float %89 %90 | |
%92 = OpGroupNonUniformShuffleXor %float %uint_3 %91 %uint_16 | |
%93 = OpFAdd %float %91 %92 | |
%94 = OpUDiv %ulong %42 %ulong_32 | |
%95 = OpUMod %ulong %42 %ulong_32 | |
%96 = OpIEqual %bool %95 %ulong_0 | |
OpBranch %97 | |
%97 = OpLabel | |
OpSelectionMerge %99 None | |
OpBranchConditional %96 %98 %99 | |
%98 = OpLabel | |
%101 = OpAccessChain %_ptr_Workgroup_float %__workgroup_mem__4 %ulong_0 %94 | |
OpStore %101 %93 | |
OpBranch %99 | |
%99 = OpLabel | |
OpControlBarrier %uint_2 %uint_2 %uint_264 | |
%103 = OpExtInst %ulong %104 UMin %95 %ulong_7 | |
%105 = OpAccessChain %_ptr_Workgroup_float %__workgroup_mem__4 %ulong_0 %103 | |
%106 = OpLoad %float %105 | |
%107 = OpGroupNonUniformShuffleXor %float %uint_3 %106 %uint_1 | |
%108 = OpFAdd %float %106 %107 | |
%109 = OpGroupNonUniformShuffleXor %float %uint_3 %108 %uint_2 | |
%110 = OpFAdd %float %108 %109 | |
%111 = OpGroupNonUniformShuffleXor %float %uint_3 %110 %uint_4 | |
%112 = OpFAdd %float %110 %111 | |
%113 = OpGroupNonUniformShuffle %float %uint_3 %112 %uint_0 | |
%114 = OpFAdd %float %113 %float_0 | |
%115 = OpCompositeConstruct %v4float %114 %114 %114 %114 | |
OpBranch %116 | |
%116 = OpLabel | |
%119 = OpPhi %ulong %137 %117 %ulong_0 %99 | |
%120 = OpSLessThan %bool %119 %ulong_9216 | |
OpLoopMerge %118 %117 None | |
OpBranchConditional %120 %117 %118 | |
%117 = OpLabel | |
%121 = OpSLessThan %bool %119 %ulong_0 | |
%122 = OpISub %ulong %ulong_18446744073709551615 %119 | |
%123 = OpSelect %ulong %121 %122 %119 | |
%124 = OpSDiv %ulong %123 %ulong_4 | |
%125 = OpISub %ulong %ulong_18446744073709551615 %124 | |
%126 = OpSelect %ulong %121 %125 %124 | |
%127 = OpIMul %ulong %48 %ulong_21233664 | |
%128 = OpIAdd %ulong %42 %127 | |
%129 = OpIMul %ulong %45 %ulong_2304 | |
%130 = OpIAdd %ulong %128 %129 | |
%131 = OpIAdd %ulong %126 %130 | |
%132 = OpIAdd %ulong %131 %ulong_218234880 | |
%133 = OpAccessChain %_ptr_StorageBuffer_v4float %__resource_var_0_0_ %ulong_0 %132 | |
%134 = OpLoad %v4float %133 | |
%135 = OpFDiv %v4float %134 %115 | |
%136 = OpAccessChain %_ptr_StorageBuffer_v4float %__resource_var_0_1_ %ulong_0 %131 | |
OpStore %136 %135 | |
%137 = OpIAdd %ulong %119 %ulong_1024 | |
OpBranch %116 | |
%118 = OpLabel | |
OpReturn | |
OpFunctionEnd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment