Debian Codegraph @

third_party/spirv-cross/shaders-msl-no-opt/frag/depth-image-gather.asm.frag

raw
1 ; SPIR-V
2 ; Version: 1.3
3 ; Generator: Google spiregg; 0
4 ; Bound: 36
5 ; Schema: 0
6 OpCapability Shader
7 OpExtension "SPV_GOOGLE_hlsl_functionality1"
8 OpExtension "SPV_GOOGLE_user_type"
9 OpMemoryModel Logical GLSL450
10 OpEntryPoint Fragment %psMain "main" %gl_FragCoord %in_var_TEXCOORD0 %out_var_SV_Target0
11 OpExecutionMode %psMain OriginUpperLeft
12 OpSource HLSL 500
13 OpName %type_2d_image "type.2d.image"
14 OpName %g_depthTexture "g_depthTexture"
15 OpName %type_sampler "type.sampler"
16 OpName %g_sampler "g_sampler"
17 OpName %g_comp "g_comp"
18 OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0"
19 OpName %out_var_SV_Target0 "out.var.SV_Target0"
20 OpName %psMain "psMain"
21 OpName %type_sampled_image "type.sampled.image"
22 OpDecorate %gl_FragCoord BuiltIn FragCoord
23 OpDecorateString %gl_FragCoord UserSemantic "SV_Position"
24 OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0"
25 OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0"
26 OpDecorate %in_var_TEXCOORD0 Location 0
27 OpDecorate %out_var_SV_Target0 Location 0
28 OpDecorate %g_depthTexture DescriptorSet 0
29 OpDecorate %g_depthTexture Binding 0
30 OpDecorate %g_sampler DescriptorSet 0
31 OpDecorate %g_sampler Binding 0
32 OpDecorate %g_comp DescriptorSet 0
33 OpDecorate %g_comp Binding 1
34 OpDecorateString %g_depthTexture UserTypeGOOGLE "texture2d"
35 %float = OpTypeFloat 32
36 %float_0_5 = OpConstant %float 0.5
37 %int = OpTypeInt 32 1
38 %int_0 = OpConstant %int 0
39 %v2int = OpTypeVector %int 2
40 %16 = OpConstantComposite %v2int %int_0 %int_0
41 %type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown
42 %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image
43 %type_sampler = OpTypeSampler
44 %_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler
45 %v4float = OpTypeVector %float 4
46 %_ptr_Input_v4float = OpTypePointer Input %v4float
47 %v2float = OpTypeVector %float 2
48 %_ptr_Input_v2float = OpTypePointer Input %v2float
49 %_ptr_Output_v4float = OpTypePointer Output %v4float
50 %void = OpTypeVoid
51 %25 = OpTypeFunction %void
52 %type_sampled_image = OpTypeSampledImage %type_2d_image
53 %g_depthTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
54 %g_sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
55 %g_comp = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
56 %gl_FragCoord = OpVariable %_ptr_Input_v4float Input
57 %in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input
58 %out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output
59 %psMain = OpFunction %void None %25
60 %26 = OpLabel
61 %27 = OpLoad %v2float %in_var_TEXCOORD0
62 %28 = OpLoad %type_2d_image %g_depthTexture
63 %29 = OpLoad %type_sampler %g_comp
64 %30 = OpSampledImage %type_sampled_image %28 %29
65 %31 = OpImageDrefGather %v4float %30 %27 %float_0_5 None
66 %32 = OpLoad %type_sampler %g_sampler
67 %33 = OpSampledImage %type_sampled_image %28 %32
68 %34 = OpImageGather %v4float %33 %27 %int_0 ConstOffset %16
69 %35 = OpFMul %v4float %31 %34
70 OpStore %out_var_SV_Target0 %35
71 OpReturn
72 OpFunctionEnd