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 | |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 10 | #ifndef COMPILER_TRANSLATOR_UTILSHLSL_H_ |
| 11 | #define COMPILER_TRANSLATOR_UTILSHLSL_H_ |
Jamie Madill | 033dae6 | 2014-06-18 12:56:28 -0400 | [diff] [blame] | 12 | |
| 13 | #include <vector> |
| 14 | #include "compiler/translator/Types.h" |
| 15 | |
Jamie Madill | f51639a | 2014-06-25 16:04:57 -0400 | [diff] [blame] | 16 | #include "angle_gl.h" |
Jamie Madill | 033dae6 | 2014-06-18 12:56:28 -0400 | [diff] [blame] | 17 | |
| 18 | namespace sh |
| 19 | { |
| 20 | |
| 21 | TString TextureString(const TType &type); |
| 22 | TString SamplerString(const TType &type); |
| 23 | // Prepends an underscore to avoid naming clashes |
| 24 | TString Decorate(const TString &string); |
| 25 | TString DecorateUniform(const TString &string, const TType &type); |
| 26 | TString DecorateField(const TString &string, const TStructure &structure); |
| 27 | TString DecoratePrivate(const TString &privateText); |
| 28 | TString TypeString(const TType &type); |
| 29 | TString StructNameString(const TStructure &structure); |
| 30 | TString QualifiedStructNameString(const TStructure &structure, bool useHLSLRowMajorPacking, |
| 31 | bool useStd140Packing); |
| 32 | TString InterpolationString(TQualifier qualifier); |
| 33 | TString QualifierString(TQualifier qualifier); |
| 34 | |
| 35 | } |
| 36 | |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 37 | #endif // COMPILER_TRANSLATOR_UTILSHLSL_H_ |