Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / compiler / translator / TranslatorHLSL.h
1 //
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.
5 //
6
7 #ifndef COMPILER_TRANSLATORHLSL_H_
8 #define COMPILER_TRANSLATORHLSL_H_
9
10 #include "compiler/translator/Compiler.h"
11
12 class TranslatorHLSL : public TCompiler
13 {
14   public:
15     TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
16     virtual TranslatorHLSL *getAsTranslatorHLSL() { return this; }
17
18     bool hasInterfaceBlock(const std::string &interfaceBlockName) const;
19     unsigned int getInterfaceBlockRegister(const std::string &interfaceBlockName) const;
20
21     bool hasUniform(const std::string &uniformName) const;
22     unsigned int getUniformRegister(const std::string &uniformName) const;
23
24   protected:
25     virtual void translate(TIntermNode* root);
26
27     std::map<std::string, unsigned int> mInterfaceBlockRegisterMap;
28     std::map<std::string, unsigned int> mUniformRegisterMap;
29 };
30
31 #endif  // COMPILER_TRANSLATORHLSL_H_