Jamie Madill | 033dae6 | 2014-06-18 12:56:28 -0400 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (c) 2014 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 | // UtilsHLSL.h: |
| 7 | // Utility methods for GLSL to HLSL translation. |
| 8 | // |
| 9 | |
| 10 | #ifndef TRANSLATOR_UTILSHLSL_H_ |
| 11 | #define TRANSLATOR_UTILSHLSL_H_ |
| 12 | |
| 13 | #include <vector> |
| 14 | #include "compiler/translator/Types.h" |
| 15 | |
| 16 | #include <GLES3/gl3.h> |
| 17 | #include <GLES2/gl2.h> |
| 18 | |
| 19 | namespace sh |
| 20 | { |
| 21 | |
| 22 | TString TextureString(const TType &type); |
| 23 | TString SamplerString(const TType &type); |
| 24 | // Prepends an underscore to avoid naming clashes |
| 25 | TString Decorate(const TString &string); |
| 26 | TString DecorateUniform(const TString &string, const TType &type); |
| 27 | TString DecorateField(const TString &string, const TStructure &structure); |
| 28 | TString DecoratePrivate(const TString &privateText); |
| 29 | TString TypeString(const TType &type); |
| 30 | TString StructNameString(const TStructure &structure); |
| 31 | TString QualifiedStructNameString(const TStructure &structure, bool useHLSLRowMajorPacking, |
| 32 | bool useStd140Packing); |
| 33 | TString InterpolationString(TQualifier qualifier); |
| 34 | TString QualifierString(TQualifier qualifier); |
| 35 | |
| 36 | } |
| 37 | |
| 38 | #endif // TRANSLATOR_UTILSHLSL_H_ |