blob: f49d4bb3df89682472ee6ea765b4fbe987fb406a [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
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
19namespace sh
20{
21
22TString TextureString(const TType &type);
23TString SamplerString(const TType &type);
24// Prepends an underscore to avoid naming clashes
25TString Decorate(const TString &string);
26TString DecorateUniform(const TString &string, const TType &type);
27TString DecorateField(const TString &string, const TStructure &structure);
28TString DecoratePrivate(const TString &privateText);
29TString TypeString(const TType &type);
30TString StructNameString(const TStructure &structure);
31TString QualifiedStructNameString(const TStructure &structure, bool useHLSLRowMajorPacking,
32 bool useStd140Packing);
33TString InterpolationString(TQualifier qualifier);
34TString QualifierString(TQualifier qualifier);
35
36}
37
38#endif // TRANSLATOR_UTILSHLSL_H_