Debian Codegraph @

third_party/spirv-cross/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 7
4 ; Bound: 64
5 ; Schema: 0
6 OpCapability Shader
7 %1 = OpExtInstImport "GLSL.std.450"
8 OpMemoryModel Logical GLSL450
9 OpEntryPoint Fragment %main "main" %pos_1 %_entryPointOutput
10 OpExecutionMode %main OriginUpperLeft
11 OpSource HLSL 500
12 OpName %main "main"
13 OpName %_main_vf4_ "@main(vf4;"
14 OpName %pos "pos"
15 OpName %Foo "Foo"
16 OpMemberName %Foo 0 "a"
17 OpMemberName %Foo 1 "b"
18 OpName %foo "foo"
19 OpName %Foo_0 "Foo"
20 OpMemberName %Foo_0 0 "a"
21 OpMemberName %Foo_0 1 "b"
22 OpName %buf "buf"
23 OpMemberName %buf 0 "results"
24 OpMemberName %buf 1 "bar"
25 OpName %_ ""
26 OpName %pos_0 "pos"
27 OpName %pos_1 "pos"
28 OpName %_entryPointOutput "@entryPointOutput"
29 OpName %param "param"
30 OpMemberDecorate %Foo_0 0 Offset 0
31 OpMemberDecorate %Foo_0 1 Offset 12
32 OpDecorate %_arr_Foo_0_uint_16 ArrayStride 16
33 OpMemberDecorate %buf 0 Offset 0
34 OpMemberDecorate %buf 1 Offset 256
35 OpDecorate %buf Block
36 OpDecorate %_ DescriptorSet 0
37 OpDecorate %_ Binding 0
38 OpDecorate %pos_1 BuiltIn FragCoord
39 OpDecorate %_entryPointOutput Location 0
40 %void = OpTypeVoid
41 %3 = OpTypeFunction %void
42 %float = OpTypeFloat 32
43 %v4float = OpTypeVector %float 4
44 %_ptr_Function_v4float = OpTypePointer Function %v4float
45 %9 = OpTypeFunction %v4float %_ptr_Function_v4float
46 %v3float = OpTypeVector %float 3
47 %Foo = OpTypeStruct %v3float %float
48 %_ptr_Function_Foo = OpTypePointer Function %Foo
49 %Foo_0 = OpTypeStruct %v3float %float
50 %uint = OpTypeInt 32 0
51 %uint_16 = OpConstant %uint 16
52 %_arr_Foo_0_uint_16 = OpTypeArray %Foo_0 %uint_16
53 %buf = OpTypeStruct %_arr_Foo_0_uint_16 %v4float
54 %_ptr_Uniform_buf = OpTypePointer Uniform %buf
55 %_ = OpVariable %_ptr_Uniform_buf Uniform
56 %int = OpTypeInt 32 1
57 %int_0 = OpConstant %int 0
58 %uint_0 = OpConstant %uint 0
59 %_ptr_Function_float = OpTypePointer Function %float
60 %int_16 = OpConstant %int 16
61 %_ptr_Uniform_Foo_0 = OpTypePointer Uniform %Foo_0
62 %_ptr_Function_v3float = OpTypePointer Function %v3float
63 %int_1 = OpConstant %int 1
64 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
65 %float_0 = OpConstant %float 0
66 %_ptr_Input_v4float = OpTypePointer Input %v4float
67 %pos_1 = OpVariable %_ptr_Input_v4float Input
68 %_ptr_Output_v4float = OpTypePointer Output %v4float
69 %_entryPointOutput = OpVariable %_ptr_Output_v4float Output
70 %main = OpFunction %void None %3
71 %5 = OpLabel
72 %pos_0 = OpVariable %_ptr_Function_v4float Function
73 %param = OpVariable %_ptr_Function_v4float Function
74 %58 = OpLoad %v4float %pos_1
75 OpStore %pos_0 %58
76 %62 = OpLoad %v4float %pos_0
77 OpStore %param %62
78 %63 = OpFunctionCall %v4float %_main_vf4_ %param
79 OpStore %_entryPointOutput %63
80 OpReturn
81 OpFunctionEnd
82 %_main_vf4_ = OpFunction %v4float None %9
83 %pos = OpFunctionParameter %_ptr_Function_v4float
84 %12 = OpLabel
85 %foo = OpVariable %_ptr_Function_Foo Function
86 %28 = OpAccessChain %_ptr_Function_float %pos %uint_0
87 %29 = OpLoad %float %28
88 %30 = OpConvertFToS %int %29
89 %32 = OpSMod %int %30 %int_16
90 %34 = OpAccessChain %_ptr_Uniform_Foo_0 %_ %int_0 %32
91 %35 = OpLoad %Foo_0 %34
92 %36 = OpCompositeExtract %v3float %35 0
93 %38 = OpAccessChain %_ptr_Function_v3float %foo %int_0
94 OpStore %38 %36
95 %39 = OpCompositeExtract %float %35 1
96 %41 = OpAccessChain %_ptr_Function_float %foo %int_1
97 OpStore %41 %39
98 %42 = OpAccessChain %_ptr_Function_v3float %foo %int_0
99 %43 = OpLoad %v3float %42
100 %45 = OpAccessChain %_ptr_Uniform_v4float %_ %int_1
101 %46 = OpLoad %v4float %45
102 %47 = OpVectorShuffle %v3float %46 %46 0 1 2
103 %48 = OpDot %float %43 %47
104 %49 = OpAccessChain %_ptr_Function_float %foo %int_1
105 %50 = OpLoad %float %49
106 %52 = OpCompositeConstruct %v4float %48 %50 %float_0 %float_0
107 OpReturnValue %52
108 OpFunctionEnd