mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
261 lines
7.4 KiB
Plaintext
261 lines
7.4 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.4
|
|
; Generator: rspirv
|
|
; Bound: 166
|
|
OpCapability Shader
|
|
OpCapability RayQueryKHR
|
|
OpExtension "SPV_KHR_ray_query"
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %123 "main" %15 %17
|
|
OpEntryPoint GLCompute %143 "main_candidate" %15
|
|
OpExecutionMode %123 LocalSize 1 1 1
|
|
OpExecutionMode %143 LocalSize 1 1 1
|
|
OpMemberDecorate %10 0 Offset 0
|
|
OpMemberDecorate %10 1 Offset 4
|
|
OpMemberDecorate %10 2 Offset 8
|
|
OpMemberDecorate %10 3 Offset 12
|
|
OpMemberDecorate %10 4 Offset 16
|
|
OpMemberDecorate %10 5 Offset 20
|
|
OpMemberDecorate %10 6 Offset 24
|
|
OpMemberDecorate %10 7 Offset 28
|
|
OpMemberDecorate %10 8 Offset 36
|
|
OpMemberDecorate %10 9 Offset 48
|
|
OpMemberDecorate %10 9 ColMajor
|
|
OpMemberDecorate %10 9 MatrixStride 16
|
|
OpMemberDecorate %10 10 Offset 112
|
|
OpMemberDecorate %10 10 ColMajor
|
|
OpMemberDecorate %10 10 MatrixStride 16
|
|
OpMemberDecorate %12 0 Offset 0
|
|
OpMemberDecorate %12 1 Offset 4
|
|
OpMemberDecorate %12 2 Offset 8
|
|
OpMemberDecorate %12 3 Offset 12
|
|
OpMemberDecorate %12 4 Offset 16
|
|
OpMemberDecorate %12 5 Offset 32
|
|
OpMemberDecorate %13 0 Offset 0
|
|
OpMemberDecorate %13 1 Offset 16
|
|
OpDecorate %15 DescriptorSet 0
|
|
OpDecorate %15 Binding 0
|
|
OpDecorate %17 DescriptorSet 0
|
|
OpDecorate %17 Binding 1
|
|
OpDecorate %18 Block
|
|
OpMemberDecorate %18 0 Offset 0
|
|
%2 = OpTypeVoid
|
|
%3 = OpTypeFloat 32
|
|
%4 = OpTypeVector %3 3
|
|
%5 = OpTypeAccelerationStructureNV
|
|
%6 = OpTypeInt 32 0
|
|
%7 = OpTypeVector %3 2
|
|
%8 = OpTypeBool
|
|
%9 = OpTypeMatrix %4 4
|
|
%10 = OpTypeStruct %6 %3 %6 %6 %6 %6 %6 %7 %8 %9 %9
|
|
%11 = OpTypeRayQueryKHR
|
|
%12 = OpTypeStruct %6 %6 %3 %3 %4 %4
|
|
%13 = OpTypeStruct %6 %4
|
|
%14 = OpTypeVector %3 4
|
|
%16 = OpTypePointer UniformConstant %5
|
|
%15 = OpVariable %16 UniformConstant
|
|
%18 = OpTypeStruct %13
|
|
%19 = OpTypePointer StorageBuffer %18
|
|
%17 = OpVariable %19 StorageBuffer
|
|
%26 = OpTypeFunction %10 %4 %4 %16
|
|
%27 = OpConstant %6 4
|
|
%28 = OpConstant %6 255
|
|
%29 = OpConstant %3 0.1
|
|
%30 = OpConstant %3 100.0
|
|
%32 = OpTypePointer Function %11
|
|
%50 = OpTypePointer Function %10
|
|
%51 = OpTypePointer Function %6
|
|
%52 = OpTypePointer Function %9
|
|
%53 = OpTypePointer Function %7
|
|
%54 = OpTypePointer Function %8
|
|
%55 = OpTypePointer Function %3
|
|
%56 = OpTypeFunction %10 %32
|
|
%58 = OpConstantNull %10
|
|
%62 = OpConstant %6 1
|
|
%64 = OpConstant %6 0
|
|
%76 = OpConstant %6 2
|
|
%78 = OpConstant %6 3
|
|
%81 = OpConstant %6 5
|
|
%83 = OpConstant %6 6
|
|
%85 = OpConstant %6 9
|
|
%87 = OpConstant %6 10
|
|
%96 = OpConstant %6 7
|
|
%98 = OpConstant %6 8
|
|
%106 = OpTypeFunction %4 %4 %10
|
|
%107 = OpConstant %3 1.0
|
|
%108 = OpConstant %3 2.4
|
|
%109 = OpConstant %3 0.0
|
|
%124 = OpTypeFunction %2
|
|
%126 = OpTypePointer StorageBuffer %13
|
|
%128 = OpConstantComposite %4 %109 %109 %109
|
|
%129 = OpConstantComposite %4 %109 %107 %109
|
|
%132 = OpTypePointer StorageBuffer %6
|
|
%137 = OpTypePointer StorageBuffer %4
|
|
%145 = OpConstantComposite %12 %27 %28 %29 %30 %128 %129
|
|
%146 = OpConstant %3 10.0
|
|
%57 = OpFunction %10 None %56
|
|
%59 = OpFunctionParameter %32
|
|
%60 = OpLabel
|
|
%61 = OpVariable %50 Function %58
|
|
%63 = OpRayQueryGetIntersectionTypeKHR %6 %59 %62
|
|
%65 = OpAccessChain %51 %61 %64
|
|
OpStore %65 %63
|
|
%66 = OpINotEqual %8 %63 %64
|
|
OpSelectionMerge %68 None
|
|
OpBranchConditional %66 %67 %68
|
|
%67 = OpLabel
|
|
%69 = OpRayQueryGetIntersectionInstanceCustomIndexKHR %6 %59 %62
|
|
%70 = OpRayQueryGetIntersectionInstanceIdKHR %6 %59 %62
|
|
%71 = OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR %6 %59 %62
|
|
%72 = OpRayQueryGetIntersectionGeometryIndexKHR %6 %59 %62
|
|
%73 = OpRayQueryGetIntersectionPrimitiveIndexKHR %6 %59 %62
|
|
%74 = OpRayQueryGetIntersectionObjectToWorldKHR %9 %59 %62
|
|
%75 = OpRayQueryGetIntersectionWorldToObjectKHR %9 %59 %62
|
|
%77 = OpAccessChain %51 %61 %76
|
|
OpStore %77 %69
|
|
%79 = OpAccessChain %51 %61 %78
|
|
OpStore %79 %70
|
|
%80 = OpAccessChain %51 %61 %27
|
|
OpStore %80 %71
|
|
%82 = OpAccessChain %51 %61 %81
|
|
OpStore %82 %72
|
|
%84 = OpAccessChain %51 %61 %83
|
|
OpStore %84 %73
|
|
%86 = OpAccessChain %52 %61 %85
|
|
OpStore %86 %74
|
|
%88 = OpAccessChain %52 %61 %87
|
|
OpStore %88 %75
|
|
%89 = OpIEqual %8 %63 %62
|
|
%92 = OpRayQueryGetIntersectionTKHR %3 %59 %62
|
|
%93 = OpAccessChain %55 %61 %62
|
|
OpStore %93 %92
|
|
OpSelectionMerge %91 None
|
|
OpBranchConditional %66 %90 %91
|
|
%90 = OpLabel
|
|
%94 = OpRayQueryGetIntersectionBarycentricsKHR %7 %59 %62
|
|
%95 = OpRayQueryGetIntersectionFrontFaceKHR %8 %59 %62
|
|
%97 = OpAccessChain %53 %61 %96
|
|
OpStore %97 %94
|
|
%99 = OpAccessChain %54 %61 %98
|
|
OpStore %99 %95
|
|
OpBranch %91
|
|
%91 = OpLabel
|
|
OpBranch %68
|
|
%68 = OpLabel
|
|
%100 = OpLoad %10 %61
|
|
OpReturnValue %100
|
|
OpFunctionEnd
|
|
%25 = OpFunction %10 None %26
|
|
%21 = OpFunctionParameter %4
|
|
%22 = OpFunctionParameter %4
|
|
%23 = OpFunctionParameter %16
|
|
%20 = OpLabel
|
|
%31 = OpVariable %32 Function
|
|
%24 = OpLoad %5 %23
|
|
OpBranch %33
|
|
%33 = OpLabel
|
|
%34 = OpCompositeConstruct %12 %27 %28 %29 %30 %21 %22
|
|
%35 = OpCompositeExtract %6 %34 0
|
|
%36 = OpCompositeExtract %6 %34 1
|
|
%37 = OpCompositeExtract %3 %34 2
|
|
%38 = OpCompositeExtract %3 %34 3
|
|
%39 = OpCompositeExtract %4 %34 4
|
|
%40 = OpCompositeExtract %4 %34 5
|
|
OpRayQueryInitializeKHR %31 %24 %35 %36 %39 %37 %40 %38
|
|
OpBranch %41
|
|
%41 = OpLabel
|
|
OpLoopMerge %42 %44 None
|
|
OpBranch %43
|
|
%43 = OpLabel
|
|
%45 = OpRayQueryProceedKHR %8 %31
|
|
OpSelectionMerge %46 None
|
|
OpBranchConditional %45 %46 %47
|
|
%47 = OpLabel
|
|
OpBranch %42
|
|
%46 = OpLabel
|
|
OpBranch %48
|
|
%48 = OpLabel
|
|
OpBranch %49
|
|
%49 = OpLabel
|
|
OpBranch %44
|
|
%44 = OpLabel
|
|
OpBranch %41
|
|
%42 = OpLabel
|
|
%101 = OpFunctionCall %10 %57 %31
|
|
OpReturnValue %101
|
|
OpFunctionEnd
|
|
%105 = OpFunction %4 None %106
|
|
%103 = OpFunctionParameter %4
|
|
%104 = OpFunctionParameter %10
|
|
%102 = OpLabel
|
|
OpBranch %110
|
|
%110 = OpLabel
|
|
%111 = OpCompositeExtract %9 %104 10
|
|
%112 = OpCompositeConstruct %14 %103 %107
|
|
%113 = OpMatrixTimesVector %4 %111 %112
|
|
%114 = OpVectorShuffle %7 %113 %113 0 1
|
|
%115 = OpExtInst %7 %1 Normalize %114
|
|
%116 = OpVectorTimesScalar %7 %115 %108
|
|
%117 = OpCompositeExtract %9 %104 9
|
|
%118 = OpCompositeConstruct %14 %116 %109 %107
|
|
%119 = OpMatrixTimesVector %4 %117 %118
|
|
%120 = OpFSub %4 %103 %119
|
|
%121 = OpExtInst %4 %1 Normalize %120
|
|
OpReturnValue %121
|
|
OpFunctionEnd
|
|
%123 = OpFunction %2 None %124
|
|
%122 = OpLabel
|
|
%125 = OpLoad %5 %15
|
|
%127 = OpAccessChain %126 %17 %64
|
|
OpBranch %130
|
|
%130 = OpLabel
|
|
%131 = OpFunctionCall %10 %25 %128 %129 %15
|
|
%133 = OpCompositeExtract %6 %131 0
|
|
%134 = OpIEqual %8 %133 %64
|
|
%135 = OpSelect %6 %134 %62 %64
|
|
%136 = OpAccessChain %132 %127 %64
|
|
OpStore %136 %135
|
|
%138 = OpCompositeExtract %3 %131 1
|
|
%139 = OpVectorTimesScalar %4 %129 %138
|
|
%140 = OpFunctionCall %4 %105 %139 %131
|
|
%141 = OpAccessChain %137 %127 %62
|
|
OpStore %141 %140
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%143 = OpFunction %2 None %124
|
|
%142 = OpLabel
|
|
%147 = OpVariable %32 Function
|
|
%144 = OpLoad %5 %15
|
|
OpBranch %148
|
|
%148 = OpLabel
|
|
%149 = OpCompositeExtract %6 %145 0
|
|
%150 = OpCompositeExtract %6 %145 1
|
|
%151 = OpCompositeExtract %3 %145 2
|
|
%152 = OpCompositeExtract %3 %145 3
|
|
%153 = OpCompositeExtract %4 %145 4
|
|
%154 = OpCompositeExtract %4 %145 5
|
|
OpRayQueryInitializeKHR %147 %144 %149 %150 %153 %151 %154 %152
|
|
%155 = OpFunctionCall %10 %57 %147
|
|
%156 = OpCompositeExtract %6 %155 0
|
|
%157 = OpIEqual %8 %156 %78
|
|
OpSelectionMerge %158 None
|
|
OpBranchConditional %157 %159 %160
|
|
%159 = OpLabel
|
|
OpRayQueryGenerateIntersectionKHR %147 %146
|
|
OpReturn
|
|
%160 = OpLabel
|
|
%161 = OpCompositeExtract %6 %155 0
|
|
%162 = OpIEqual %8 %161 %62
|
|
OpSelectionMerge %163 None
|
|
OpBranchConditional %162 %164 %165
|
|
%164 = OpLabel
|
|
OpRayQueryConfirmIntersectionKHR %147
|
|
OpReturn
|
|
%165 = OpLabel
|
|
OpReturn
|
|
%163 = OpLabel
|
|
OpBranch %158
|
|
%158 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd |