#ifndef LIBANGLE_RENDERER_FORMAT_H_
#define LIBANGLE_RENDERER_FORMAT_H_
#include "libANGLE/renderer/FormatID_autogen.h"
#include "libANGLE/renderer/renderer_utils.h"
namespace angle
{
enum class FormatID;
extern const Format gFormatInfoTable[];
struct Format final : private angle::NonCopyable
{ … };
constexpr GLuint GetChannelCount(GLuint redBits,
GLuint greenBits,
GLuint blueBits,
GLuint alphaBits,
GLuint luminanceBits,
GLuint depthBits,
GLuint stencilBits)
{ … }
constexpr Format::Format(FormatID id,
GLenum glFormat,
GLenum fboFormat,
rx::MipGenerationFunction mipGen,
const rx::FastCopyFunctionMap &fastCopyFunctions,
rx::PixelReadFunction colorRead,
rx::PixelWriteFunction colorWrite,
GLenum componentType,
GLuint redBits,
GLuint greenBits,
GLuint blueBits,
GLuint alphaBits,
GLuint luminanceBits,
GLuint depthBits,
GLuint stencilBits,
GLuint pixelBytes,
GLuint componentAlignmentMask,
bool isBlock,
bool isFixed,
bool isScaled,
bool isSRGB,
bool isYUV,
gl::VertexAttribType vertexAttribType)
: … { … }
constexpr bool Format::hasDepthOrStencilBits() const
{ … }
constexpr bool Format::hasDepthAndStencilBits() const
{ … }
constexpr bool Format::isLUMA() const
{ … }
constexpr bool Format::isBGRA() const
{ … }
constexpr bool Format::isSint() const
{ … }
constexpr bool Format::isUint() const
{ … }
constexpr bool Format::isSnorm() const
{ … }
constexpr bool Format::isUnorm() const
{ … }
constexpr bool Format::isFloat() const
{ … }
constexpr bool Format::isVertexTypeHalfFloat() const
{ … }
FormatMap;
}
#endif