mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 17:44:09 +01:00
* add support for zero value constructors and constructors that infer their type from their parameters * address comments * extract constructor machinery into new module * fix doc link
272 lines
7.5 KiB
Plaintext
272 lines
7.5 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.1
|
|
; Generator: rspirv
|
|
; Bound: 214
|
|
OpCapability Shader
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %202 "main"
|
|
OpExecutionMode %202 LocalSize 1 1 1
|
|
OpMemberDecorate %27 0 Offset 0
|
|
OpMemberDecorate %27 1 Offset 16
|
|
OpDecorate %32 ArrayStride 32
|
|
OpDecorate %33 ArrayStride 4
|
|
%2 = OpTypeVoid
|
|
%4 = OpTypeFloat 32
|
|
%3 = OpConstant %4 1.0
|
|
%5 = OpConstant %4 0.0
|
|
%6 = OpConstant %4 0.5
|
|
%8 = OpTypeInt 32 1
|
|
%7 = OpConstant %8 1
|
|
%10 = OpTypeBool
|
|
%9 = OpConstantTrue %10
|
|
%11 = OpConstant %8 0
|
|
%12 = OpConstantFalse %10
|
|
%13 = OpConstant %4 0.1
|
|
%14 = OpConstant %4 2.0
|
|
%15 = OpConstant %4 3.0
|
|
%16 = OpConstant %4 4.0
|
|
%17 = OpConstant %8 5
|
|
%18 = OpConstant %8 2
|
|
%20 = OpTypeInt 32 0
|
|
%19 = OpConstant %20 0
|
|
%21 = OpConstant %8 3
|
|
%22 = OpConstant %20 4
|
|
%23 = OpTypeVector %4 4
|
|
%24 = OpTypeVector %8 4
|
|
%25 = OpTypeVector %10 4
|
|
%26 = OpTypeVector %4 3
|
|
%27 = OpTypeStruct %23 %8
|
|
%28 = OpTypeVector %4 2
|
|
%29 = OpTypeMatrix %28 2
|
|
%30 = OpTypeMatrix %23 4
|
|
%31 = OpTypeVector %20 2
|
|
%32 = OpTypeArray %27 %21
|
|
%33 = OpTypeArray %8 %22
|
|
%34 = OpConstantComposite %23 %3 %3 %3 %3
|
|
%35 = OpConstantComposite %23 %5 %5 %5 %5
|
|
%36 = OpConstantComposite %23 %6 %6 %6 %6
|
|
%37 = OpConstantComposite %24 %7 %7 %7 %7
|
|
%38 = OpConstantComposite %31 %19 %19
|
|
%39 = OpConstantComposite %28 %5 %5
|
|
%40 = OpConstantComposite %29 %39 %39
|
|
%41 = OpConstantComposite %23 %5 %5 %5 %5
|
|
%42 = OpConstantComposite %27 %41 %11
|
|
%43 = OpConstantComposite %32 %42 %42 %42
|
|
%46 = OpTypeFunction %23
|
|
%87 = OpTypeFunction %8
|
|
%94 = OpConstantNull %8
|
|
%98 = OpTypeFunction %26 %26
|
|
%100 = OpTypeVector %10 3
|
|
%107 = OpTypePointer Function %27
|
|
%109 = OpTypePointer Function %10
|
|
%111 = OpTypePointer Function %8
|
|
%113 = OpTypePointer Function %20
|
|
%115 = OpTypePointer Function %4
|
|
%117 = OpTypePointer Function %31
|
|
%119 = OpTypePointer Function %29
|
|
%121 = OpTypePointer Function %32
|
|
%126 = OpTypePointer Function %33
|
|
%129 = OpTypeFunction %4
|
|
%146 = OpTypePointer Function %23
|
|
%147 = OpTypePointer Function %4
|
|
%152 = OpTypeFunction %2
|
|
%156 = OpTypeVector %8 3
|
|
%45 = OpFunction %23 None %46
|
|
%44 = OpLabel
|
|
OpBranch %47
|
|
%47 = OpLabel
|
|
%48 = OpSelect %8 %9 %7 %11
|
|
%50 = OpCompositeConstruct %25 %9 %9 %9 %9
|
|
%49 = OpSelect %23 %50 %34 %35
|
|
%51 = OpCompositeConstruct %25 %12 %12 %12 %12
|
|
%52 = OpSelect %23 %51 %35 %34
|
|
%53 = OpExtInst %23 %1 FMix %35 %34 %36
|
|
%55 = OpCompositeConstruct %23 %13 %13 %13 %13
|
|
%54 = OpExtInst %23 %1 FMix %35 %34 %55
|
|
%56 = OpCompositeExtract %8 %37 0
|
|
%57 = OpBitcast %4 %56
|
|
%58 = OpBitcast %23 %37
|
|
%59 = OpConvertFToS %24 %35
|
|
%60 = OpCompositeConstruct %24 %48 %48 %48 %48
|
|
%61 = OpIAdd %24 %60 %59
|
|
%62 = OpConvertSToF %23 %61
|
|
%63 = OpFAdd %23 %62 %49
|
|
%64 = OpFAdd %23 %63 %53
|
|
%65 = OpFAdd %23 %64 %54
|
|
%66 = OpCompositeConstruct %23 %57 %57 %57 %57
|
|
%67 = OpFAdd %23 %65 %66
|
|
%68 = OpFAdd %23 %67 %58
|
|
OpReturnValue %68
|
|
OpFunctionEnd
|
|
%70 = OpFunction %23 None %46
|
|
%69 = OpLabel
|
|
OpBranch %71
|
|
%71 = OpLabel
|
|
%72 = OpCompositeConstruct %28 %14 %14
|
|
%73 = OpCompositeConstruct %28 %3 %3
|
|
%74 = OpFAdd %28 %73 %72
|
|
%75 = OpCompositeConstruct %28 %15 %15
|
|
%76 = OpFSub %28 %74 %75
|
|
%77 = OpCompositeConstruct %28 %16 %16
|
|
%78 = OpFDiv %28 %76 %77
|
|
%79 = OpCompositeConstruct %24 %17 %17 %17 %17
|
|
%80 = OpCompositeConstruct %24 %18 %18 %18 %18
|
|
%81 = OpSMod %24 %79 %80
|
|
%82 = OpVectorShuffle %23 %78 %78 0 1 0 1
|
|
%83 = OpConvertSToF %23 %81
|
|
%84 = OpFAdd %23 %82 %83
|
|
OpReturnValue %84
|
|
OpFunctionEnd
|
|
%86 = OpFunction %8 None %87
|
|
%85 = OpLabel
|
|
OpBranch %88
|
|
%88 = OpLabel
|
|
%89 = OpLogicalNot %10 %9
|
|
OpSelectionMerge %90 None
|
|
OpBranchConditional %89 %91 %92
|
|
%91 = OpLabel
|
|
OpReturnValue %7
|
|
%92 = OpLabel
|
|
%93 = OpNot %8 %7
|
|
OpReturnValue %93
|
|
%90 = OpLabel
|
|
OpReturnValue %94
|
|
OpFunctionEnd
|
|
%97 = OpFunction %26 None %98
|
|
%96 = OpFunctionParameter %26
|
|
%95 = OpLabel
|
|
OpBranch %99
|
|
%99 = OpLabel
|
|
%101 = OpCompositeConstruct %26 %5 %5 %5
|
|
%102 = OpFUnordNotEqual %100 %96 %101
|
|
%103 = OpCompositeConstruct %26 %5 %5 %5
|
|
%104 = OpCompositeConstruct %26 %3 %3 %3
|
|
%105 = OpSelect %26 %102 %104 %103
|
|
OpReturnValue %105
|
|
OpFunctionEnd
|
|
%128 = OpFunction %4 None %129
|
|
%127 = OpLabel
|
|
%123 = OpVariable %117 Function
|
|
%118 = OpVariable %119 Function %40
|
|
%112 = OpVariable %113 Function %19
|
|
%106 = OpVariable %107 Function
|
|
%124 = OpVariable %119 Function
|
|
%120 = OpVariable %121 Function %43
|
|
%114 = OpVariable %115 Function %5
|
|
%108 = OpVariable %109 Function %12
|
|
%125 = OpVariable %126 Function
|
|
%122 = OpVariable %107 Function %42
|
|
%116 = OpVariable %117 Function %38
|
|
%110 = OpVariable %111 Function %11
|
|
OpBranch %130
|
|
%130 = OpLabel
|
|
%131 = OpCompositeConstruct %23 %3 %3 %3 %3
|
|
%132 = OpCompositeConstruct %27 %131 %7
|
|
OpStore %106 %132
|
|
%133 = OpCompositeConstruct %28 %3 %5
|
|
%134 = OpCompositeConstruct %28 %5 %3
|
|
%135 = OpCompositeConstruct %29 %133 %134
|
|
%136 = OpCompositeConstruct %23 %3 %5 %5 %5
|
|
%137 = OpCompositeConstruct %23 %5 %3 %5 %5
|
|
%138 = OpCompositeConstruct %23 %5 %5 %3 %5
|
|
%139 = OpCompositeConstruct %23 %5 %5 %5 %3
|
|
%140 = OpCompositeConstruct %30 %136 %137 %138 %139
|
|
%141 = OpCompositeConstruct %31 %19 %19
|
|
OpStore %123 %141
|
|
%142 = OpCompositeConstruct %28 %5 %5
|
|
%143 = OpCompositeConstruct %28 %5 %5
|
|
%144 = OpCompositeConstruct %29 %142 %143
|
|
OpStore %124 %144
|
|
%145 = OpCompositeConstruct %33 %11 %7 %18 %21
|
|
OpStore %125 %145
|
|
%148 = OpAccessChain %147 %106 %19 %19
|
|
%149 = OpLoad %4 %148
|
|
OpReturnValue %149
|
|
OpFunctionEnd
|
|
%151 = OpFunction %2 None %152
|
|
%150 = OpLabel
|
|
OpBranch %153
|
|
%153 = OpLabel
|
|
%154 = OpSMod %8 %7 %7
|
|
%155 = OpFRem %4 %3 %3
|
|
%157 = OpCompositeConstruct %156 %7 %7 %7
|
|
%158 = OpCompositeConstruct %156 %7 %7 %7
|
|
%159 = OpSMod %156 %157 %158
|
|
%160 = OpCompositeConstruct %26 %3 %3 %3
|
|
%161 = OpCompositeConstruct %26 %3 %3 %3
|
|
%162 = OpFRem %26 %160 %161
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%164 = OpFunction %2 None %152
|
|
%163 = OpLabel
|
|
OpBranch %165
|
|
%165 = OpLabel
|
|
%166 = OpCompositeConstruct %23 %3 %5 %5 %5
|
|
%167 = OpCompositeConstruct %23 %5 %3 %5 %5
|
|
%168 = OpCompositeConstruct %23 %5 %5 %3 %5
|
|
%169 = OpCompositeConstruct %23 %5 %5 %5 %3
|
|
%170 = OpCompositeConstruct %30 %166 %167 %168 %169
|
|
%171 = OpMatrixTimesScalar %30 %170 %14
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%173 = OpFunction %2 None %152
|
|
%172 = OpLabel
|
|
OpBranch %174
|
|
%174 = OpLabel
|
|
%175 = OpLogicalOr %10 %9 %12
|
|
%176 = OpLogicalAnd %10 %9 %12
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%179 = OpFunction %2 None %152
|
|
%178 = OpLabel
|
|
%177 = OpVariable %111 Function %7
|
|
OpBranch %180
|
|
%180 = OpLabel
|
|
%181 = OpLoad %8 %177
|
|
%182 = OpIAdd %8 %181 %7
|
|
OpStore %177 %182
|
|
%183 = OpLoad %8 %177
|
|
%184 = OpISub %8 %183 %7
|
|
OpStore %177 %184
|
|
%185 = OpLoad %8 %177
|
|
%186 = OpLoad %8 %177
|
|
%187 = OpIMul %8 %185 %186
|
|
OpStore %177 %187
|
|
%188 = OpLoad %8 %177
|
|
%189 = OpLoad %8 %177
|
|
%190 = OpSDiv %8 %188 %189
|
|
OpStore %177 %190
|
|
%191 = OpLoad %8 %177
|
|
%192 = OpSMod %8 %191 %7
|
|
OpStore %177 %192
|
|
%193 = OpLoad %8 %177
|
|
%194 = OpBitwiseXor %8 %193 %11
|
|
OpStore %177 %194
|
|
%195 = OpLoad %8 %177
|
|
%196 = OpBitwiseAnd %8 %195 %11
|
|
OpStore %177 %196
|
|
%197 = OpLoad %8 %177
|
|
%198 = OpIAdd %8 %197 %7
|
|
OpStore %177 %198
|
|
%199 = OpLoad %8 %177
|
|
%200 = OpISub %8 %199 %7
|
|
OpStore %177 %200
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%202 = OpFunction %2 None %152
|
|
%201 = OpLabel
|
|
OpBranch %203
|
|
%203 = OpLabel
|
|
%204 = OpFunctionCall %23 %45
|
|
%205 = OpFunctionCall %23 %70
|
|
%206 = OpFunctionCall %8 %86
|
|
%207 = OpVectorShuffle %26 %34 %34 0 1 2
|
|
%208 = OpFunctionCall %26 %97 %207
|
|
%209 = OpFunctionCall %4 %128
|
|
%210 = OpFunctionCall %2 %151
|
|
%211 = OpFunctionCall %2 %164
|
|
%212 = OpFunctionCall %2 %173
|
|
%213 = OpFunctionCall %2 %179
|
|
OpReturn
|
|
OpFunctionEnd |