blob: 9800a3bbf3f7ba59197f3cef4fca20e46e9b23a3 [file] [log] [blame]
Jamie Madill033dae62014-06-18 12:56:28 -04001//
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 Lang0a73dd82014-11-19 16:18:08 -050010#ifndef COMPILER_TRANSLATOR_UTILSHLSL_H_
11#define COMPILER_TRANSLATOR_UTILSHLSL_H_
Jamie Madill033dae62014-06-18 12:56:28 -040012
13#include <vector>
14#include "compiler/translator/Types.h"
15
Jamie Madillf51639a2014-06-25 16:04:57 -040016#include "angle_gl.h"
Jamie Madill033dae62014-06-18 12:56:28 -040017
18namespace sh
19{
20
21TString TextureString(const TType &type);
22TString SamplerString(const TType &type);
23// Prepends an underscore to avoid naming clashes
24TString Decorate(const TString &string);
25TString DecorateUniform(const TString &string, const TType &type);
26TString DecorateField(const TString &string, const TStructure &structure);
27TString DecoratePrivate(const TString &privateText);
28TString TypeString(const TType &type);
29TString StructNameString(const TStructure &structure);
30TString QualifiedStructNameString(const TStructure &structure, bool useHLSLRowMajorPacking,
31 bool useStd140Packing);
32TString InterpolationString(TQualifier qualifier);
33TString QualifierString(TQualifier qualifier);
34
35}
36
Geoff Lang0a73dd82014-11-19 16:18:08 -050037#endif // COMPILER_TRANSLATOR_UTILSHLSL_H_