Debian Codegraph @

third_party/spirv-cross/shaders-msl-no-opt/asm/frag/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_texture "g_texture"
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_texture DescriptorSet 0
29 OpDecorate %g_texture 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_texture 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 %int_1 = OpConstant %int 1
40 %v2int = OpTypeVector %int 2
41 %16 = OpConstantComposite %v2int %int_0 %int_0
42 %type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown
43 %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image
44 %type_sampler = OpTypeSampler
45 %_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler
46 %v4float = OpTypeVector %float 4
47 %_ptr_Input_v4float = OpTypePointer Input %v4float
48 %v2float = OpTypeVector %float 2
49 %_ptr_Input_v2float = OpTypePointer Input %v2float
50 %_ptr_Output_v4float = OpTypePointer Output %v4float
51 %void = OpTypeVoid
52 %25 = OpTypeFunction %void
53 %type_sampled_image = OpTypeSampledImage %type_2d_image
54 %g_texture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
55 %g_sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
56 %g_comp = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
57 %gl_FragCoord = OpVariable %_ptr_Input_v4float Input
58 %in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input
59 %out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output
60 %psMain = OpFunction %void None %25
61 %26 = OpLabel
62 %27 = OpLoad %v2float %in_var_TEXCOORD0
63 %28 = OpLoad %type_2d_image %g_texture
64 %29 = OpLoad %type_sampler %g_comp
65 %30 = OpSampledImage %type_sampled_image %28 %29
66 %32 = OpLoad %type_sampler %g_sampler
67 %33 = OpSampledImage %type_sampled_image %28 %32
68 %31 = OpImageGather %v4float %33 %27 %int_1 ConstOffset %16
69 %34 = OpImageGather %v4float %33 %27 %int_0 ConstOffset %16
70 %35 = OpFMul %v4float %34 %31
71 OpStore %out_var_SV_Target0 %35
72 OpReturn
73 OpFunctionEnd
74