#include "libANGLE/Caps.h"
#include "common/angleutils.h"
#include "common/debug.h"
#include "libANGLE/formatutils.h"
#include "angle_gl.h"
#include <algorithm>
#include <sstream>
static void InsertExtensionString(const std::string &extension,
bool supported,
std::vector<std::string> *extensionVector)
{ … }
namespace gl
{
TextureCaps::TextureCaps() = default;
TextureCaps::TextureCaps(const TextureCaps &other) = default;
TextureCaps &TextureCaps::operator=(const TextureCaps &other) = default;
TextureCaps::~TextureCaps() = default;
GLuint TextureCaps::getMaxSamples() const
{ … }
GLuint TextureCaps::getNearestSamples(GLuint requestedSamples) const
{ … }
TextureCaps GenerateMinimumTextureCaps(GLenum sizedInternalFormat,
const Version &clientVersion,
const Extensions &extensions)
{ … }
TextureCapsMap::TextureCapsMap() { … }
TextureCapsMap::~TextureCapsMap() { … }
void TextureCapsMap::insert(GLenum internalFormat, const TextureCaps &caps)
{ … }
void TextureCapsMap::clear()
{ … }
const TextureCaps &TextureCapsMap::get(GLenum internalFormat) const
{ … }
const TextureCaps &TextureCapsMap::get(angle::FormatID formatID) const
{ … }
TextureCaps &TextureCapsMap::get(angle::FormatID formatID)
{ … }
void TextureCapsMap::set(angle::FormatID formatID, const TextureCaps &caps)
{ … }
void InitMinimumTextureCapsMap(const Version &clientVersion,
const Extensions &extensions,
TextureCapsMap *capsMap)
{ … }
Extensions::Extensions() = default;
Extensions::Extensions(const Extensions &other) = default;
Extensions &Extensions::operator=(const Extensions &other) = default;
std::vector<std::string> Extensions::getStrings() const
{ … }
Limitations::Limitations() = default;
Limitations::Limitations(const Limitations &other) = default;
Limitations &Limitations::operator=(const Limitations &other) = default;
static bool GetFormatSupportBase(const TextureCapsMap &textureCaps,
const GLenum *requiredFormats,
size_t requiredFormatsSize,
bool requiresTexturing,
bool requiresFiltering,
bool requiresAttachingTexture,
bool requiresRenderbufferSupport,
bool requiresBlending)
{ … }
template <size_t N>
static bool GetFormatSupport(const TextureCapsMap &textureCaps,
const GLenum (&requiredFormats)[N],
bool requiresTexturing,
bool requiresFiltering,
bool requiresAttachingTexture,
bool requiresRenderbufferSupport,
bool requiresBlending)
{ … }
static bool DeterminePackedDepthStencilSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineReadDepthSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineReadStencilSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDepthBufferFloat2Support(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineRGB8AndRGBA8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineBGRA8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineBGRAReadFormatSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineColorBufferHalfFloatSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineHalfFloatTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineHalfFloatTextureFilteringSupport(const TextureCapsMap &textureCaps,
bool checkLegacyFormats)
{ … }
static bool DetermineFloatTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineFloatTextureFilteringSupport(const TextureCapsMap &textureCaps,
bool checkLegacyFormats)
{ … }
static bool DetermineRGTextureSupport(const TextureCapsMap &textureCaps,
bool checkHalfFloatFormats,
bool checkFloatFormats)
{ … }
static bool DetermineTextureFormat2101010Support(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDXT1TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDXT3TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDXT5TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineS3TCsRGBTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineASTCLDRTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineASTCOESTExtureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC1RGB8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC2RGB8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC2sRGB8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC2PunchthroughARGB8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC2PunchthroughAsRGB8AlphaTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC2RGBA8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineETC2sRGB8Alpha8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineEACR11UnsignedTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineEACR11SignedTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineEACRG11UnsignedTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineEACRG11SignedTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineSRGBTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineSRGBR8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineSRGBRG8TextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDepthTextureANGLESupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDepthTextureOESSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDepth24OESSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineDepth32Support(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineColorBufferFloatRGBSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineColorBufferFloatRGBASupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineColorBufferFloatSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineFloatBlendSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineTextureNorm16Support(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineRGTCTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineBPTCTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DeterminePVRTCTextureSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DeterminePVRTCsRGBTextureSupport(const TextureCapsMap &textureCaps)
{ … }
bool DetermineCompressedTextureETCSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineStencilIndex8Support(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineRenderSharedExponentSupport(const TextureCapsMap &textureCaps)
{ … }
static bool DetermineRenderSnormSupport(const TextureCapsMap &textureCaps, bool textureNorm16EXT)
{ … }
void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps)
{ … }
TypePrecision::TypePrecision() = default;
TypePrecision::TypePrecision(const TypePrecision &other) = default;
TypePrecision &TypePrecision::operator=(const TypePrecision &other) = default;
void TypePrecision::setIEEEFloat()
{ … }
void TypePrecision::setIEEEHalfFloat()
{ … }
void TypePrecision::setTwosComplementInt(unsigned int bits)
{ … }
void TypePrecision::setSimulatedFloat(unsigned int r, unsigned int p)
{ … }
void TypePrecision::setSimulatedInt(unsigned int r)
{ … }
void TypePrecision::get(GLint *returnRange, GLint *returnPrecision) const
{ … }
Caps::Caps() = default;
Caps::Caps(const Caps &other) = default;
Caps::~Caps() = default;
Caps &Caps::operator=(const Caps &other) = default;
Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensions)
{ … }
}
namespace egl
{
Caps::Caps() = default;
DisplayExtensions::DisplayExtensions() = default;
std::vector<std::string> DisplayExtensions::getStrings() const
{ … }
DeviceExtensions::DeviceExtensions() = default;
std::vector<std::string> DeviceExtensions::getStrings() const
{ … }
ClientExtensions::ClientExtensions() = default;
ClientExtensions::ClientExtensions(const ClientExtensions &other) = default;
std::vector<std::string> ClientExtensions::getStrings() const
{ … }
}