chromium/third_party/angle/src/compiler/translator/BaseTypes.h

//
// Copyright 2002 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

#ifndef COMPILER_TRANSLATOR_BASETYPES_H_
#define COMPILER_TRANSLATOR_BASETYPES_H_

#include <algorithm>
#include <array>

#include "GLSLANG/ShaderLang.h"
#include "common/debug.h"
#include "compiler/translator/ImmutableString.h"

namespace sh
{

//
// Precision qualifiers
//
enum TPrecision
{};

inline const char *getPrecisionString(TPrecision p)
{}

//
// Basic type.  Arrays, vectors, etc., are orthogonal to this.
//
enum TBasicType
{};

class TBasicMangledName
{};

const char *getBasicString(TBasicType t);

inline bool IsSampler(TBasicType type)
{}

inline bool IsImage(TBasicType type)
{}

inline bool IsUIntImage(TBasicType type)
{}

inline bool IsAtomicCounter(TBasicType type)
{}

inline bool IsPixelLocal(TBasicType type)
{}

inline bool IsSubpassInputType(TBasicType type)
{}

inline bool IsOpaqueType(TBasicType type)
{}

inline bool IsIntegerSampler(TBasicType type)
{}

inline bool IsIntegerSamplerUnsigned(TBasicType type)
{}

inline bool IsSampler2DMS(TBasicType type)
{}

inline bool IsSampler2DMSArray(TBasicType type)
{}

inline bool IsSamplerMS(TBasicType type)
{}

inline bool IsImageMS(TBasicType type)
{}

inline bool IsFloatImage(TBasicType type)
{}

inline bool IsIntegerImage(TBasicType type)
{}

inline bool IsUnsignedImage(TBasicType type)
{}

// Samplers are divided into 4 disjoint categories: 2D, cube, 3D, and array.
// Array samplers are not 2D samplers.
inline bool IsSampler2D(TBasicType type)
{}

inline bool IsSamplerCube(TBasicType type)
{}

inline bool IsSampler3D(TBasicType type)
{}

inline bool IsSamplerArray(TBasicType type)
{}

inline bool IsSampler1D(TBasicType type)
{}

inline bool IsSamplerBuffer(TBasicType type)
{}

inline bool IsShadowSampler(TBasicType type)
{}

inline bool IsImage2D(TBasicType type)
{}

inline bool IsImage3D(TBasicType type)
{}

inline bool IsImage2DArray(TBasicType type)
{}

inline bool IsImageCube(TBasicType type)
{}

inline bool IsImageBuffer(TBasicType type)
{}

inline bool IsInteger(TBasicType type)
{}

inline bool SupportsPrecision(TBasicType type)
{}

//
// Qualifiers and built-ins.  These are mainly used to see what can be read
// or written, and by the machine dependent translator to know which registers
// to allocate variables in.  Since built-ins tend to go to different registers
// than varying or uniform, it makes sense they are peers, not sub-classes.
//
enum TQualifier
{};

inline bool IsQualifierUnspecified(TQualifier qualifier)
{}

inline bool IsStorageBuffer(TQualifier qualifier)
{}

inline bool IsShaderIn(TQualifier qualifier)
{}

inline bool IsShaderOut(TQualifier qualifier)
{}

inline bool IsShaderIoBlock(TQualifier qualifier)
{}

enum TLayoutImageInternalFormat
{};

enum TLayoutMatrixPacking
{};

enum TLayoutBlockStorage
{};

enum TLayoutDepth
{};

enum TYuvCscStandardEXT
{};

enum TLayoutPrimitiveType
{};

enum TLayoutTessEvaluationType
{};

class AdvancedBlendEquations
{};

struct TLayoutQualifier
{};

struct TMemoryQualifier
{};

inline const char *getWorkGroupSizeString(size_t dimension)
{}

// Used for GLSL generation, debugging and error messages.
inline const char *getQualifierString(TQualifier q)
{}

inline const char *getMatrixPackingString(TLayoutMatrixPacking mpq)
{}

inline const char *getBlockStorageString(TLayoutBlockStorage bsq)
{}

inline const char *getImageInternalFormatString(TLayoutImageInternalFormat iifq)
{}

inline const char *getDepthString(TLayoutDepth depth)
{}

inline TYuvCscStandardEXT getYuvCscStandardEXT(const ImmutableString &str)
{}

inline const char *getYuvCscStandardEXTString(TYuvCscStandardEXT ycsq)
{}

inline const char *getGeometryShaderPrimitiveTypeString(TLayoutPrimitiveType primitiveType)
{}

inline const char *getTessEvaluationShaderTypeString(TLayoutTessEvaluationType type)
{}

}  // namespace sh

#endif  // COMPILER_TRANSLATOR_BASETYPES_H_