File: multiple_same_entry_points_src.spvasm

package info (click to toggle)
spirv-tools 2025.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,588 kB
  • sloc: cpp: 470,407; javascript: 5,893; python: 3,326; ansic: 488; sh: 450; ruby: 88; makefile: 18; lisp: 9
file content (46 lines) | stat: -rw-r--r-- 1,509 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;; Test for multiple entry points with the same execution model.
               OpCapability Shader
          %1 = OpExtInstImport "GLSL.std.450"
               OpMemoryModel Logical GLSL450
               OpEntryPoint Vertex %4 "main1" %8 %10
               OpEntryPoint Vertex %12 "main2" %13 %14 %15
               OpSource ESSL 310
               OpName %4 "main1"
               OpName %12 "main2"
               OpName %8 "v"
               OpName %10 "a"
               OpName %13 "v"
               OpName %14 "a"
               OpName %15 "b"
               OpDecorate %8 Location 0
               OpDecorate %10 Location 0
               OpDecorate %13 Location 0
               OpDecorate %14 Location 0
               OpDecorate %15 Location 1
          %2 = OpTypeVoid
          %3 = OpTypeFunction %2
          %6 = OpTypeFloat 32

          %7 = OpTypePointer Output %6
          %9 = OpTypePointer Input %6
          %8 = OpVariable %7 Output
         %10 = OpVariable %9 Input
         %13 = OpVariable %7 Output
         %14 = OpVariable %9 Input
         %15 = OpVariable %9 Input

          %4 = OpFunction %2 None %3
          %5 = OpLabel
         %11 = OpLoad %6 %10
               OpStore %8 %11
               OpReturn
               OpFunctionEnd

         %12 = OpFunction %2 None %3
         %16 = OpLabel
         %17 = OpLoad %6 %14
         %18 = OpLoad %6 %15
         %19 = OpFAdd %6 %17 %18
               OpStore %13 %19
               OpReturn
               OpFunctionEnd