#include "libANGLE/renderer/gl/formatutilsgl.h"
#include <limits>
#include "anglebase/no_destructor.h"
#include "common/string_utils.h"
#include "libANGLE/formatutils.h"
#include "platform/autogen/FeaturesGL_autogen.h"
namespace rx
{
namespace nativegl
{
SupportRequirement::SupportRequirement()
: … { … }
SupportRequirement::SupportRequirement(const SupportRequirement &other) = default;
SupportRequirement &SupportRequirement::operator=(const SupportRequirement &other) = default;
SupportRequirement::~SupportRequirement() = default;
InternalFormat::InternalFormat() : … { … }
InternalFormat::InternalFormat(const InternalFormat &other) = default;
InternalFormat::~InternalFormat() { … }
static inline SupportRequirement VersionOrExts(GLuint major,
GLuint minor,
const std::string &versionExt)
{ … }
static inline SupportRequirement ExtAndVersionOrExt(const std::string &requiredExt,
GLuint major,
GLuint minor,
const std::string &requiredWithoutVersionExt)
{ … }
static inline SupportRequirement VersionOnly(GLuint major, GLuint minor)
{ … }
static inline SupportRequirement ExtsOnly(const std::vector<std::string> &exts)
{ … }
static inline SupportRequirement ExtsOnly(const std::string &ext)
{ … }
static inline SupportRequirement ExtsOnly(const std::string &ext1, const std::string &ext2)
{ … }
static inline SupportRequirement AlwaysSupported()
{ … }
static inline SupportRequirement NeverSupported()
{ … }
struct InternalFormatInfo
{ … };
InternalFormatInfoPair;
InternalFormatInfoMap;
static inline void InsertFormatMapping(InternalFormatInfoMap *map,
GLenum internalFormat,
const SupportRequirement &desktopTexture,
const SupportRequirement &desktopFilter,
const SupportRequirement &desktopRender,
const SupportRequirement &esTexture,
const SupportRequirement &esFilter,
const SupportRequirement &esTextureAttachment,
const SupportRequirement &esRenderbufferAttachment)
{ … }
static InternalFormatInfoMap BuildInternalFormatInfoMap()
{ … }
static const InternalFormatInfoMap &GetInternalFormatMap()
{ … }
const InternalFormat &GetInternalFormatInfo(GLenum internalFormat, StandardGL standard)
{ … }
static bool IsLUMAFormat(GLenum format)
{ … }
static GLenum EmulateLUMAFormat(const GLenum format)
{ … }
static const gl::InternalFormat &EmulateLUMA(const gl::InternalFormat &internalFormat)
{ … }
static GLenum GetNativeInternalFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
const gl::InternalFormat &internalFormat)
{ … }
static GLenum GetNativeFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum format,
GLenum type)
{ … }
static GLenum GetNativeCompressedFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum format)
{ … }
static GLenum GetNativeType(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum format,
GLenum type)
{ … }
static GLenum GetNativeReadType(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum type)
{ … }
static GLenum GetNativeReadFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum attachmentReadFormat,
GLenum format,
GLenum type)
{ … }
TexImageFormat GetTexImageFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum internalFormat,
GLenum format,
GLenum type)
{ … }
TexSubImageFormat GetTexSubImageFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum format,
GLenum type)
{ … }
CompressedTexImageFormat GetCompressedTexImageFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum internalFormat)
{ … }
CompressedTexSubImageFormat GetCompressedSubTexImageFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum format)
{ … }
CopyTexImageImageFormat GetCopyTexImageImageFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum internalFormat,
GLenum framebufferType)
{ … }
TexStorageFormat GetTexStorageFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum internalFormat)
{ … }
RenderbufferFormat GetRenderbufferFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum internalFormat)
{ … }
ReadPixelsFormat GetReadPixelsFormat(const FunctionsGL *functions,
const angle::FeaturesGL &features,
GLenum attachmentReadFormat,
GLenum format,
GLenum type)
{ … }
}
}