Files
wgpu/tests/out/shadow.spvasm.snap
T

213 lines
5.7 KiB
Plaintext

---
source: tests/snapshots.rs
expression: dis
---
; SPIR-V
; Version: 1.2
; Generator: rspirv
; Bound: 137
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %81 "fs_main" %73 %76 %79
OpExecutionMode %81 OriginUpperLeft
OpSource GLSL 450
OpName %9 "c_ambient"
OpName %11 "c_max_lights"
OpName %16 "Globals"
OpMemberName %16 0 "num_lights"
OpName %15 "u_globals"
OpName %20 "Lights"
OpMemberName %20 0 "data"
OpName %22 "Light"
OpMemberName %22 0 "proj"
OpMemberName %22 1 "pos"
OpMemberName %22 2 "color"
OpName %19 "s_lights"
OpName %26 "t_shadow"
OpName %29 "sampler_shadow"
OpName %35 "fetch_shadow"
OpName %68 "color"
OpName %70 "i"
OpName %73 "raw_normal"
OpName %76 "position"
OpName %81 "fs_main"
OpName %81 "fs_main"
OpDecorate %16 Block
OpMemberDecorate %16 0 Offset 0
OpDecorate %15 DescriptorSet 0
OpDecorate %15 Binding 0
OpDecorate %20 BufferBlock
OpMemberDecorate %20 0 Offset 0
OpDecorate %21 ArrayStride 96
OpMemberDecorate %22 0 Offset 0
OpMemberDecorate %22 0 ColMajor
OpMemberDecorate %22 0 MatrixStride 16
OpMemberDecorate %22 1 Offset 64
OpMemberDecorate %22 2 Offset 80
OpDecorate %19 NonWritable
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpDecorate %26 DescriptorSet 0
OpDecorate %26 Binding 2
OpDecorate %29 DescriptorSet 0
OpDecorate %29 Binding 3
OpDecorate %73 Location 0
OpDecorate %76 Location 1
OpDecorate %79 Location 0
%2 = OpTypeVoid
%4 = OpTypeFloat 32
%3 = OpConstant %4 0.0
%5 = OpConstant %4 1.0
%6 = OpConstant %4 0.5
%7 = OpConstant %4 -0.5
%8 = OpConstant %4 0.05
%10 = OpTypeVector %4 3
%9 = OpConstantComposite %10 %8 %8 %8
%12 = OpTypeInt 32 0
%11 = OpConstant %12 10
%13 = OpConstant %12 0
%14 = OpConstant %12 1
%17 = OpTypeVector %12 4
%16 = OpTypeStruct %17
%18 = OpTypePointer Uniform %16
%15 = OpVariable %18 Uniform
%24 = OpTypeVector %4 4
%23 = OpTypeMatrix %24 4
%22 = OpTypeStruct %23 %24 %24
%21 = OpTypeRuntimeArray %22
%20 = OpTypeStruct %21
%25 = OpTypePointer Uniform %20
%19 = OpVariable %25 Uniform
%27 = OpTypeImage %4 2D 1 1 0 1 Unknown
%28 = OpTypePointer UniformConstant %27
%26 = OpVariable %28 UniformConstant
%30 = OpTypeSampler
%31 = OpTypePointer UniformConstant %30
%29 = OpVariable %31 UniformConstant
%36 = OpTypeFunction %4 %12 %24
%41 = OpTypeBool
%45 = OpTypeVector %4 2
%56 = OpTypeInt 32 1
%60 = OpTypeSampledImage %27
%67 = OpConstant %4 0.0
%69 = OpTypePointer Function %10
%71 = OpTypePointer Function %12
%74 = OpTypePointer Input %10
%73 = OpVariable %74 Input
%77 = OpTypePointer Input %24
%76 = OpVariable %77 Input
%80 = OpTypePointer Output %24
%79 = OpVariable %80 Output
%82 = OpTypeFunction %2
%92 = OpTypePointer Uniform %17
%93 = OpConstant %56 0
%101 = OpTypePointer Uniform %21
%103 = OpTypePointer Uniform %22
%104 = OpConstant %56 0
%35 = OpFunction %4 None %36
%33 = OpFunctionParameter %12
%34 = OpFunctionParameter %24
%32 = OpLabel
%37 = OpLoad %27 %26
%38 = OpLoad %30 %29
OpBranch %39
%39 = OpLabel
%40 = OpCompositeExtract %4 %34 3
%42 = OpFOrdLessThanEqual %41 %40 %3
OpSelectionMerge %43 None
OpBranchConditional %42 %44 %43
%44 = OpLabel
OpReturnValue %5
%43 = OpLabel
%46 = OpCompositeConstruct %45 %6 %7
%47 = OpCompositeExtract %4 %34 3
%48 = OpFDiv %4 %5 %47
%49 = OpCompositeExtract %4 %34 0
%50 = OpCompositeExtract %4 %34 1
%51 = OpCompositeConstruct %45 %49 %50
%52 = OpFMul %45 %51 %46
%53 = OpVectorTimesScalar %45 %52 %48
%54 = OpCompositeConstruct %45 %6 %6
%55 = OpFAdd %45 %53 %54
%57 = OpBitcast %56 %33
%58 = OpCompositeExtract %4 %34 2
%59 = OpFMul %4 %58 %48
%61 = OpCompositeExtract %4 %55 0
%62 = OpCompositeExtract %4 %55 1
%63 = OpConvertUToF %4 %57
%64 = OpCompositeConstruct %10 %61 %62 %63
%65 = OpSampledImage %60 %37 %38
%66 = OpImageSampleDrefExplicitLod %4 %65 %64 %59 Lod %67
OpReturnValue %66
OpFunctionEnd
%81 = OpFunction %2 None %82
%72 = OpLabel
%68 = OpVariable %69 Function %9
%70 = OpVariable %71 Function %13
%75 = OpLoad %10 %73
%78 = OpLoad %24 %76
%83 = OpLoad %27 %26
%84 = OpLoad %30 %29
OpBranch %85
%85 = OpLabel
%86 = OpExtInst %10 %1 Normalize %75
OpBranch %87
%87 = OpLabel
OpLoopMerge %88 %90 None
OpBranch %89
%89 = OpLabel
%91 = OpLoad %12 %70
%94 = OpAccessChain %92 %15 %93
%95 = OpLoad %17 %94
%96 = OpCompositeExtract %12 %95 0
%97 = OpExtInst %12 %1 UMin %96 %11
%98 = OpUGreaterThanEqual %41 %91 %97
OpSelectionMerge %99 None
OpBranchConditional %98 %100 %99
%100 = OpLabel
OpBranch %88
%99 = OpLabel
%102 = OpLoad %12 %70
%105 = OpAccessChain %103 %19 %104 %102
%106 = OpLoad %22 %105
%107 = OpLoad %12 %70
%108 = OpCompositeExtract %23 %106 0
%109 = OpMatrixTimesVector %24 %108 %78
%110 = OpFunctionCall %4 %35 %107 %109
%111 = OpCompositeExtract %24 %106 1
%112 = OpCompositeExtract %4 %111 0
%113 = OpCompositeExtract %4 %111 1
%114 = OpCompositeExtract %4 %111 2
%115 = OpCompositeConstruct %10 %112 %113 %114
%116 = OpCompositeExtract %4 %78 0
%117 = OpCompositeExtract %4 %78 1
%118 = OpCompositeExtract %4 %78 2
%119 = OpCompositeConstruct %10 %116 %117 %118
%120 = OpFSub %10 %115 %119
%121 = OpExtInst %10 %1 Normalize %120
%122 = OpDot %4 %86 %121
%123 = OpExtInst %4 %1 FMax %3 %122
%124 = OpLoad %10 %68
%125 = OpFMul %4 %110 %123
%126 = OpCompositeExtract %24 %106 2
%127 = OpCompositeExtract %4 %126 0
%128 = OpCompositeExtract %4 %126 1
%129 = OpCompositeExtract %4 %126 2
%130 = OpCompositeConstruct %10 %127 %128 %129
%131 = OpVectorTimesScalar %10 %130 %125
%132 = OpFAdd %10 %124 %131
OpStore %68 %132
OpBranch %90
%90 = OpLabel
%133 = OpLoad %12 %70
%134 = OpIAdd %12 %133 %14
OpStore %70 %134
OpBranch %87
%88 = OpLabel
%135 = OpLoad %10 %68
%136 = OpCompositeConstruct %24 %135 %5
OpStore %79 %136
OpReturn
OpFunctionEnd