blob: e6a4664bb3013ac9c142c6ae8d5608e07afda792 [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
Olli Etuahof5cfc8d2015-08-06 16:36:39 +030018class TName;
19
Jamie Madill033dae62014-06-18 12:56:28 -040020namespace sh
21{
22
23TString TextureString(const TType &type);
24TString SamplerString(const TType &type);
25// Prepends an underscore to avoid naming clashes
26TString Decorate(const TString &string);
Olli Etuahof5cfc8d2015-08-06 16:36:39 +030027TString DecorateIfNeeded(const TName &name);
Jamie Madill033dae62014-06-18 12:56:28 -040028TString DecorateUniform(const TString &string, const TType &type);
29TString DecorateField(const TString &string, const TStructure &structure);
30TString DecoratePrivate(const TString &privateText);
31TString TypeString(const TType &type);
32TString StructNameString(const TStructure &structure);
33TString QualifiedStructNameString(const TStructure &structure, bool useHLSLRowMajorPacking,
34 bool useStd140Packing);
35TString InterpolationString(TQualifier qualifier);
36TString QualifierString(TQualifier qualifier);
37
38}
39
Geoff Lang0a73dd82014-11-19 16:18:08 -050040#endif // COMPILER_TRANSLATOR_UTILSHLSL_H_