Debian Codegraph @

test/diff/diff_files/multiple_different_entry_points_src.spvasm

raw
1 ;; Basic test for multiple entry points. The entry points have different
2 ;; execution models and so can be trivially matched.
3 OpCapability Shader
4 %1 = OpExtInstImport "GLSL.std.450"
5 OpMemoryModel Logical GLSL450
6 OpEntryPoint Vertex %mainv "mainv" %vo %a
7 OpEntryPoint Fragment %mainf "mainf" %color %vi
8 OpExecutionMode %mainf OriginUpperLeft
9 OpSource ESSL 310
10 OpName %mainv "mainv"
11 OpName %mainf "mainf"
12 OpName %a "a"
13 OpName %vo "v"
14 OpName %vi "v"
15 OpName %color "color"
16 OpDecorate %a Location 0
17 OpDecorate %vo Location 0
18 OpDecorate %vi Location 0
19 OpDecorate %color Location 0
20 OpDecorate %color RelaxedPrecision
21 OpDecorate %vi RelaxedPrecision
22 OpDecorate %12 RelaxedPrecision
23 OpDecorate %13 RelaxedPrecision
24
25 %void = OpTypeVoid
26 %3 = OpTypeFunction %void
27 %float = OpTypeFloat 32
28 %v4float = OpTypeVector %float 4
29
30 %_ptr_Input_float = OpTypePointer Input %float
31 %a = OpVariable %_ptr_Input_float Input
32 %_ptr_Output_float = OpTypePointer Output %float
33 %vo = OpVariable %_ptr_Output_float Output
34 %vi = OpVariable %_ptr_Input_float Input
35 %_ptr_Output_v4float = OpTypePointer Output %v4float
36 %color = OpVariable %_ptr_Output_v4float Output
37
38 %mainv = OpFunction %void None %3
39 %5 = OpLabel
40 %11 = OpLoad %float %a
41 OpStore %vo %11
42 OpReturn
43 OpFunctionEnd
44
45 %mainf = OpFunction %void None %3
46 %6 = OpLabel
47 %12 = OpLoad %float %vi
48 %13 = OpCompositeConstruct %v4float %12 %12 %12 %12
49 OpStore %color %13
50 OpReturn
51 OpFunctionEnd