2 // Copyright (c) 2002-2013 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.
7 #ifndef COMPILER_TRANSLATORHLSL_H_
8 #define COMPILER_TRANSLATORHLSL_H_
10 #include "compiler/translator/Compiler.h"
12 class TranslatorHLSL : public TCompiler
15 TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
16 virtual TranslatorHLSL *getAsTranslatorHLSL() { return this; }
18 bool hasInterfaceBlock(const std::string &interfaceBlockName) const;
19 unsigned int getInterfaceBlockRegister(const std::string &interfaceBlockName) const;
21 bool hasUniform(const std::string &uniformName) const;
22 unsigned int getUniformRegister(const std::string &uniformName) const;
25 virtual void translate(TIntermNode* root);
27 std::map<std::string, unsigned int> mInterfaceBlockRegisterMap;
28 std::map<std::string, unsigned int> mUniformRegisterMap;
31 #endif // COMPILER_TRANSLATORHLSL_H_