Files
wgpu/tests/out/spv/ray-query.spvasm
T

152 lines
4.6 KiB
Plaintext

; SPIR-V
; Version: 1.4
; Generator: rspirv
; Bound: 95
OpCapability Shader
OpCapability RayQueryKHR
OpExtension "SPV_KHR_ray_query"
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %43 "main" %15 %17
OpExecutionMode %43 LocalSize 1 1 1
OpMemberDecorate %7 0 Offset 0
OpMemberDecorate %7 1 Offset 16
OpMemberDecorate %11 0 Offset 0
OpMemberDecorate %11 1 Offset 4
OpMemberDecorate %11 2 Offset 8
OpMemberDecorate %11 3 Offset 12
OpMemberDecorate %11 4 Offset 16
OpMemberDecorate %11 5 Offset 20
OpMemberDecorate %11 6 Offset 24
OpMemberDecorate %11 7 Offset 28
OpMemberDecorate %11 8 Offset 36
OpMemberDecorate %11 9 Offset 48
OpMemberDecorate %11 9 ColMajor
OpMemberDecorate %11 9 MatrixStride 16
OpMemberDecorate %11 10 Offset 112
OpMemberDecorate %11 10 ColMajor
OpMemberDecorate %11 10 MatrixStride 16
OpMemberDecorate %14 0 Offset 0
OpMemberDecorate %14 1 Offset 4
OpMemberDecorate %14 2 Offset 8
OpMemberDecorate %14 3 Offset 12
OpMemberDecorate %14 4 Offset 16
OpMemberDecorate %14 5 Offset 32
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 = OpTypeAccelerationStructureNV
%4 = OpTypeInt 32 0
%6 = OpTypeFloat 32
%5 = OpTypeVector %6 3
%7 = OpTypeStruct %4 %5
%8 = OpTypeVector %6 2
%9 = OpTypeBool
%10 = OpTypeMatrix %5 4
%11 = OpTypeStruct %4 %6 %4 %4 %4 %4 %4 %8 %9 %10 %10
%12 = OpTypeVector %6 4
%13 = OpTypeRayQueryKHR
%14 = OpTypeStruct %4 %4 %6 %6 %5 %5
%16 = OpTypePointer UniformConstant %3
%15 = OpVariable %16 UniformConstant
%18 = OpTypeStruct %7
%19 = OpTypePointer StorageBuffer %18
%17 = OpVariable %19 StorageBuffer
%24 = OpTypeFunction %5 %5 %11
%25 = OpConstant %6 1.0
%26 = OpConstant %6 2.4
%27 = OpConstant %6 0.0
%41 = OpTypePointer Function %13
%44 = OpTypeFunction %2
%46 = OpTypePointer StorageBuffer %7
%47 = OpConstant %4 0
%49 = OpConstant %4 4
%50 = OpConstant %4 255
%51 = OpConstant %6 0.1
%52 = OpConstant %6 100.0
%72 = OpConstant %4 1
%85 = OpTypePointer StorageBuffer %4
%90 = OpTypePointer StorageBuffer %5
%23 = OpFunction %5 None %24
%21 = OpFunctionParameter %5
%22 = OpFunctionParameter %11
%20 = OpLabel
OpBranch %28
%28 = OpLabel
%29 = OpCompositeExtract %10 %22 10
%30 = OpCompositeConstruct %12 %21 %25
%31 = OpMatrixTimesVector %5 %29 %30
%32 = OpVectorShuffle %8 %31 %31 0 1
%33 = OpExtInst %8 %1 Normalize %32
%34 = OpVectorTimesScalar %8 %33 %26
%35 = OpCompositeExtract %10 %22 9
%36 = OpCompositeConstruct %12 %34 %27 %25
%37 = OpMatrixTimesVector %5 %35 %36
%38 = OpFSub %5 %21 %37
%39 = OpExtInst %5 %1 Normalize %38
OpReturnValue %39
OpFunctionEnd
%43 = OpFunction %2 None %44
%42 = OpLabel
%40 = OpVariable %41 Function
%45 = OpLoad %3 %15
%48 = OpAccessChain %46 %17 %47
OpBranch %53
%53 = OpLabel
%54 = OpCompositeConstruct %5 %27 %25 %27
%55 = OpCompositeConstruct %5 %27 %27 %27
%56 = OpCompositeConstruct %14 %49 %50 %51 %52 %55 %54
%57 = OpCompositeExtract %4 %56 0
%58 = OpCompositeExtract %4 %56 1
%59 = OpCompositeExtract %6 %56 2
%60 = OpCompositeExtract %6 %56 3
%61 = OpCompositeExtract %5 %56 4
%62 = OpCompositeExtract %5 %56 5
OpRayQueryInitializeKHR %40 %45 %57 %58 %61 %59 %62 %60
OpBranch %63
%63 = OpLabel
OpLoopMerge %64 %66 None
OpBranch %65
%65 = OpLabel
%67 = OpRayQueryProceedKHR %9 %40
OpSelectionMerge %68 None
OpBranchConditional %67 %68 %69
%69 = OpLabel
OpBranch %64
%68 = OpLabel
OpBranch %70
%70 = OpLabel
OpBranch %71
%71 = OpLabel
OpBranch %66
%66 = OpLabel
OpBranch %63
%64 = OpLabel
%73 = OpRayQueryGetIntersectionTypeKHR %4 %40 %72
%74 = OpRayQueryGetIntersectionInstanceCustomIndexKHR %4 %40 %72
%75 = OpRayQueryGetIntersectionInstanceIdKHR %4 %40 %72
%76 = OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR %4 %40 %72
%77 = OpRayQueryGetIntersectionGeometryIndexKHR %4 %40 %72
%78 = OpRayQueryGetIntersectionPrimitiveIndexKHR %4 %40 %72
%79 = OpRayQueryGetIntersectionTKHR %6 %40 %72
%80 = OpRayQueryGetIntersectionBarycentricsKHR %8 %40 %72
%81 = OpRayQueryGetIntersectionFrontFaceKHR %9 %40 %72
%82 = OpRayQueryGetIntersectionObjectToWorldKHR %10 %40 %72
%83 = OpRayQueryGetIntersectionWorldToObjectKHR %10 %40 %72
%84 = OpCompositeConstruct %11 %73 %79 %74 %75 %76 %77 %78 %80 %81 %82 %83
%86 = OpCompositeExtract %4 %84 0
%87 = OpIEqual %9 %86 %47
%88 = OpSelect %4 %87 %72 %47
%89 = OpAccessChain %85 %48 %47
OpStore %89 %88
%91 = OpCompositeExtract %6 %84 1
%92 = OpVectorTimesScalar %5 %54 %91
%93 = OpFunctionCall %5 %23 %92 %84
%94 = OpAccessChain %90 %48 %72
OpStore %94 %93
OpReturn
OpFunctionEnd