| 1 | // |
| 2 | // Copyright 2018 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 | |
| 10 | #ifndef COMPILER_TRANSLATOR_TREEOPS_EMULATEGLDRAWID_H_ |
| 11 | #define COMPILER_TRANSLATOR_TREEOPS_EMULATEGLDRAWID_H_ |
| 12 | |
| 13 | #include <GLSLANG/ShaderLang.h> |
| 14 | #include <vector> |
| 15 | |
| 16 | #include "compiler/translator/HashNames.h" |
| 17 | |
| 18 | namespace sh |
| 19 | { |
| 20 | struct Uniform; |
| 21 | class TIntermBlock; |
| 22 | class TSymbolTable; |
| 23 | |
| 24 | void EmulateGLDrawID(TIntermBlock *root, |
| 25 | TSymbolTable *symbolTable, |
| 26 | std::vector<sh::Uniform> *uniforms, |
| 27 | bool shouldCollect); |
| 28 | |
| 29 | } // namespace sh |
| 30 | |
| 31 | #endif // COMPILER_TRANSLATOR_TREEOPS_EMULATEGLDRAWID_H_ |
| 32 | |