• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // EmulateGLDrawID is an AST traverser to convert the gl_DrawID builtin
7 // to a uniform int
8 //
9 // EmulateGLBaseVertex is an AST traverser to convert the gl_BaseVertex builtin
10 // to a uniform int
11 //
12 // EmulateGLBaseInstance is an AST traverser to convert the gl_BaseInstance builtin
13 // to a uniform int
14 //
15 
16 #ifndef COMPILER_TRANSLATOR_TREEOPS_EMULATEMULTIDRAWSHADERBUILTINS_H_
17 #define COMPILER_TRANSLATOR_TREEOPS_EMULATEMULTIDRAWSHADERBUILTINS_H_
18 
19 #include <GLSLANG/ShaderLang.h>
20 #include <vector>
21 
22 #include "compiler/translator/HashNames.h"
23 
24 namespace sh
25 {
26 struct Uniform;
27 class TIntermBlock;
28 class TSymbolTable;
29 
30 void EmulateGLDrawID(TIntermBlock *root,
31                      TSymbolTable *symbolTable,
32                      std::vector<sh::Uniform> *uniforms,
33                      bool shouldCollect);
34 
35 void EmulateGLBaseVertex(TIntermBlock *root,
36                          TSymbolTable *symbolTable,
37                          std::vector<sh::Uniform> *uniforms,
38                          bool shouldCollect);
39 
40 void EmulateGLBaseInstance(TIntermBlock *root,
41                            TSymbolTable *symbolTable,
42                            std::vector<sh::Uniform> *uniforms,
43                            bool shouldCollect);
44 
45 }  // namespace sh
46 
47 #endif  // COMPILER_TRANSLATOR_TREEOPS_EMULATEMULTIDRAWSHADERBUILTINS_H_
48