Commit 169a14ec by Geoff Lang Committed by Commit Bot

Move member initializers from Caps.cpp into the struct definitions.

BUG=angleproject:3663 Change-Id: I13a1a920173e3f2e5360e6d7253f24a44bdc5e13 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1690675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 8e70900e
...@@ -29,13 +29,7 @@ static void InsertExtensionString(const std::string &extension, ...@@ -29,13 +29,7 @@ static void InsertExtensionString(const std::string &extension,
namespace gl namespace gl
{ {
TextureCaps::TextureCaps() TextureCaps::TextureCaps() = default;
: texturable(false),
filterable(false),
textureAttachment(false),
renderbuffer(false),
sampleCounts()
{}
TextureCaps::TextureCaps(const TextureCaps &other) = default; TextureCaps::TextureCaps(const TextureCaps &other) = default;
...@@ -138,136 +132,7 @@ void InitMinimumTextureCapsMap(const Version &clientVersion, ...@@ -138,136 +132,7 @@ void InitMinimumTextureCapsMap(const Version &clientVersion,
} }
} }
Extensions::Extensions() Extensions::Extensions() = default;
: elementIndexUint(false),
packedDepthStencil(false),
getProgramBinary(false),
rgb8rgba8(false),
textureFormatBGRA8888(false),
readFormatBGRA(false),
pixelBufferObject(false),
mapBuffer(false),
mapBufferRange(false),
colorBufferHalfFloat(false),
textureHalfFloat(false),
textureHalfFloatLinear(false),
textureFloat(false),
textureFloatLinear(false),
textureRG(false),
textureCompressionDXT1(false),
textureCompressionDXT3(false),
textureCompressionDXT5(false),
textureCompressionS3TCsRGB(false),
textureCompressionASTCHDR(false),
textureCompressionASTCLDR(false),
textureCompressionBPTC(false),
compressedETC1RGB8Texture(false),
compressedETC2RGB8Texture(false),
compressedETC2sRGB8Texture(false),
compressedETC2PunchthroughARGB8Texture(false),
compressedETC2PunchthroughAsRGB8AlphaTexture(false),
compressedETC2RGBA8Texture(false),
compressedETC2sRGB8Alpha8Texture(false),
compressedEACR11UnsignedTexture(false),
compressedEACR11SignedTexture(false),
compressedEACRG11UnsignedTexture(false),
compressedEACRG11SignedTexture(false),
compressedTextureETC(false),
sRGB(false),
depthTextureANGLE(false),
depthTextureOES(false),
depth24OES(false),
depth32(false),
texture3DOES(false),
textureStorage(false),
textureNPOT(false),
drawBuffers(false),
textureFilterAnisotropic(false),
maxTextureAnisotropy(0.0f),
occlusionQueryBoolean(false),
fence(false),
disjointTimerQuery(false),
queryCounterBitsTimeElapsed(0),
queryCounterBitsTimestamp(0),
robustness(false),
robustBufferAccessBehavior(false),
blendMinMax(false),
framebufferBlit(false),
framebufferMultisample(false),
instancedArraysANGLE(false),
instancedArraysEXT(false),
packReverseRowOrder(false),
standardDerivatives(false),
shaderTextureLOD(false),
fragDepth(false),
multiview(false),
maxViews(1u),
multiview2(false),
textureUsage(false),
translatedShaderSource(false),
fboRenderMipmap(false),
discardFramebuffer(false),
debugMarker(false),
eglImage(false),
eglImageExternal(false),
eglImageExternalEssl3(false),
eglSync(false),
memoryObject(false),
memoryObjectFd(false),
semaphore(false),
semaphoreFd(false),
eglStreamConsumerExternal(false),
unpackSubimage(false),
packSubimage(false),
vertexArrayObject(false),
debug(false),
maxDebugMessageLength(0),
maxDebugLoggedMessages(0),
maxDebugGroupStackDepth(0),
maxLabelLength(0),
noError(false),
lossyETCDecode(false),
bindUniformLocation(false),
syncQuery(false),
copyTexture(false),
copyCompressedTexture(false),
copyTexture3d(false),
webglCompatibility(false),
requestExtension(false),
bindGeneratesResource(false),
robustClientMemory(false),
textureBorderClamp(false),
textureSRGBDecode(false),
sRGBWriteControl(false),
colorBufferFloatRGB(false),
colorBufferFloatRGBA(false),
colorBufferFloat(false),
multisampleCompatibility(false),
framebufferMixedSamples(false),
textureNorm16(false),
pathRendering(false),
surfacelessContext(false),
clientArrays(false),
robustResourceInitialization(false),
programCacheControl(false),
textureRectangle(false),
geometryShader(false),
pointSizeArray(false),
textureCubeMap(false),
pointSprite(false),
drawTexture(false),
explicitContextGles1(false),
explicitContext(false),
parallelShaderCompile(false),
textureStorageMultisample2DArray(false),
multiviewMultisample(false),
blendFuncExtended(false),
maxDualSourceDrawBuffers(0),
floatBlend(false),
memorySize(false),
textureMultisample(false),
multiDraw(false)
{}
Extensions::Extensions(const Extensions &other) = default; Extensions::Extensions(const Extensions &other) = default;
...@@ -286,17 +151,7 @@ std::vector<std::string> Extensions::getStrings() const ...@@ -286,17 +151,7 @@ std::vector<std::string> Extensions::getStrings() const
return extensionStrings; return extensionStrings;
} }
Limitations::Limitations() Limitations::Limitations() = default;
: noFrontFacingSupport(false),
noSampleAlphaToCoverageSupport(false),
attributeZeroRequiresZeroDivisorInEXT(false),
noSeparateStencilRefsAndMasks(false),
shadersRequireIndexedLoopValidation(false),
noSimultaneousConstantColorAndAlphaBlendFunc(false),
noFlexibleVaryingPacking(false),
noDoubleBoundTransformFeedbackBuffers(false),
noVertexAttributeAliasing(false)
{}
static bool GetFormatSupportBase(const TextureCapsMap &textureCaps, static bool GetFormatSupportBase(const TextureCapsMap &textureCaps,
const GLenum *requiredFormats, const GLenum *requiredFormats,
...@@ -971,7 +826,7 @@ const ExtensionInfoMap &GetExtensionInfoMap() ...@@ -971,7 +826,7 @@ const ExtensionInfoMap &GetExtensionInfoMap()
return extensionInfo; return extensionInfo;
} }
TypePrecision::TypePrecision() : range({{0, 0}}), precision(0) {} TypePrecision::TypePrecision() = default;
TypePrecision::TypePrecision(const TypePrecision &other) = default; TypePrecision::TypePrecision(const TypePrecision &other) = default;
...@@ -1005,136 +860,7 @@ void TypePrecision::get(GLint *returnRange, GLint *returnPrecision) const ...@@ -1005,136 +860,7 @@ void TypePrecision::get(GLint *returnRange, GLint *returnPrecision) const
*returnPrecision = precision; *returnPrecision = precision;
} }
Caps::Caps() Caps::Caps() = default;
: maxElementIndex(0),
max3DTextureSize(0),
max2DTextureSize(0),
maxRectangleTextureSize(0),
maxArrayTextureLayers(0),
maxLODBias(0),
maxCubeMapTextureSize(0),
maxRenderbufferSize(0),
minAliasedPointSize(1.0f),
maxAliasedPointSize(1.0f),
minAliasedLineWidth(0),
maxAliasedLineWidth(0),
// Table 20.40
maxDrawBuffers(0),
maxFramebufferWidth(0),
maxFramebufferHeight(0),
maxFramebufferSamples(0),
maxColorAttachments(0),
maxViewportWidth(0),
maxViewportHeight(0),
maxSampleMaskWords(0),
maxColorTextureSamples(0),
maxDepthTextureSamples(0),
maxIntegerSamples(0),
maxServerWaitTimeout(0),
// Table 20.41
maxVertexAttribRelativeOffset(0),
maxVertexAttribBindings(0),
maxVertexAttribStride(0),
maxElementsIndices(0),
maxElementsVertices(0),
// Table 20.43
// Table 20.44
// Table 20.45
// Table 20.43gs (GL_EXT_geometry_shader)
// Table 20.46 (GL_EXT_geometry_shader)
maxShaderUniformBlocks({}),
maxShaderTextureImageUnits({}),
maxShaderStorageBlocks({}),
maxShaderUniformComponents({}),
maxShaderAtomicCounterBuffers({}),
maxShaderAtomicCounters({}),
maxShaderImageUniforms({}),
maxCombinedShaderUniformComponents({}),
// Table 20.43
maxVertexAttributes(0),
maxVertexUniformVectors(0),
maxVertexOutputComponents(0),
// Table 20.44
maxFragmentUniformVectors(0),
maxFragmentInputComponents(0),
minProgramTextureGatherOffset(0),
maxProgramTextureGatherOffset(0),
minProgramTexelOffset(0),
maxProgramTexelOffset(0),
// Table 20.45
maxComputeWorkGroupInvocations(0),
maxComputeSharedMemorySize(0),
// Table 20.46
maxUniformBufferBindings(0),
maxUniformBlockSize(0),
uniformBufferOffsetAlignment(0),
maxCombinedUniformBlocks(0),
maxVaryingComponents(0),
maxVaryingVectors(0),
maxCombinedTextureImageUnits(0),
maxCombinedShaderOutputResources(0),
// Table 20.47
maxUniformLocations(0),
maxAtomicCounterBufferBindings(0),
maxAtomicCounterBufferSize(0),
maxCombinedAtomicCounterBuffers(0),
maxCombinedAtomicCounters(0),
maxImageUnits(0),
maxCombinedImageUniforms(0),
maxShaderStorageBufferBindings(0),
maxShaderStorageBlockSize(0),
maxCombinedShaderStorageBlocks(0),
shaderStorageBufferOffsetAlignment(0),
// Table 20.48
maxTransformFeedbackInterleavedComponents(0),
maxTransformFeedbackSeparateAttributes(0),
maxTransformFeedbackSeparateComponents(0),
// Table 20.49
maxSamples(0),
// Table 20.40 (cont.) (GL_EXT_geometry_shader)
maxFramebufferLayers(0),
layerProvokingVertex(0),
// Table 20.43gs (GL_EXT_geometry_shader)
maxGeometryInputComponents(0),
maxGeometryOutputComponents(0),
maxGeometryOutputVertices(0),
maxGeometryTotalOutputComponents(0),
maxGeometryShaderInvocations(0),
subPixelBits(4),
// GLES1 emulation: Table 6.20 / 6.22 (ES 1.1 spec)
maxMultitextureUnits(0),
maxClipPlanes(0),
maxLights(0),
maxModelviewMatrixStackDepth(0),
maxProjectionMatrixStackDepth(0),
maxTextureMatrixStackDepth(0),
minSmoothPointSize(0),
maxSmoothPointSize(0),
minSmoothLineWidth(0),
maxSmoothLineWidth(0)
{
for (size_t i = 0; i < 3; ++i)
{
maxComputeWorkGroupCount[i] = 0;
maxComputeWorkGroupSize[i] = 0;
}
}
Caps::Caps(const Caps &other) = default; Caps::Caps(const Caps &other) = default;
Caps::~Caps() = default; Caps::~Caps() = default;
...@@ -1376,58 +1102,9 @@ Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensi ...@@ -1376,58 +1102,9 @@ Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensi
namespace egl namespace egl
{ {
Caps::Caps() : textureNPOT(false) {} Caps::Caps() = default;
DisplayExtensions::DisplayExtensions() DisplayExtensions::DisplayExtensions() = default;
: createContextRobustness(false),
d3dShareHandleClientBuffer(false),
d3dTextureClientBuffer(false),
surfaceD3DTexture2DShareHandle(false),
querySurfacePointer(false),
windowFixedSize(false),
keyedMutex(false),
surfaceOrientation(false),
postSubBuffer(false),
createContext(false),
deviceQuery(false),
image(false),
imageBase(false),
imagePixmap(false),
glTexture2DImage(false),
glTextureCubemapImage(false),
glTexture3DImage(false),
glRenderbufferImage(false),
getAllProcAddresses(false),
flexibleSurfaceCompatibility(false),
directComposition(false),
windowsUIComposition(false),
createContextNoError(false),
stream(false),
streamConsumerGLTexture(false),
streamConsumerGLTextureYUV(false),
streamProducerD3DTexture(false),
fenceSync(false),
waitSync(false),
createContextWebGLCompatibility(false),
createContextBindGeneratesResource(false),
getSyncValues(false),
swapBuffersWithDamage(false),
pixelFormatFloat(false),
surfacelessContext(false),
displayTextureShareGroup(false),
createContextClientArrays(false),
programCacheControl(false),
robustResourceInitialization(false),
iosurfaceClientBuffer(false),
createContextExtensionsEnabled(false),
presentationTime(false),
blobCache(false),
imageNativeBuffer(false),
getFrameTimestamps(false),
recordable(false),
powerPreference(false),
imageD3D11Texture(false)
{}
std::vector<std::string> DisplayExtensions::getStrings() const std::vector<std::string> DisplayExtensions::getStrings() const
{ {
...@@ -1490,7 +1167,7 @@ std::vector<std::string> DisplayExtensions::getStrings() const ...@@ -1490,7 +1167,7 @@ std::vector<std::string> DisplayExtensions::getStrings() const
return extensionStrings; return extensionStrings;
} }
DeviceExtensions::DeviceExtensions() : deviceD3D(false) {} DeviceExtensions::DeviceExtensions() = default;
std::vector<std::string> DeviceExtensions::getStrings() const std::vector<std::string> DeviceExtensions::getStrings() const
{ {
...@@ -1504,25 +1181,7 @@ std::vector<std::string> DeviceExtensions::getStrings() const ...@@ -1504,25 +1181,7 @@ std::vector<std::string> DeviceExtensions::getStrings() const
return extensionStrings; return extensionStrings;
} }
ClientExtensions::ClientExtensions() ClientExtensions::ClientExtensions() = default;
: clientExtensions(false),
platformBase(false),
platformDevice(false),
platformANGLE(false),
platformANGLED3D(false),
platformANGLEOpenGL(false),
platformANGLEVulkan(false),
platformANGLEContextVirtualization(false),
deviceCreation(false),
deviceCreationD3D11(false),
x11Visual(false),
experimentalPresentPath(false),
clientGetAllProcAddresses(false),
debug(false),
explicitContext(false),
featureControlANGLE(false)
{}
ClientExtensions::ClientExtensions(const ClientExtensions &other) = default; ClientExtensions::ClientExtensions(const ClientExtensions &other) = default;
std::vector<std::string> ClientExtensions::getStrings() const std::vector<std::string> ClientExtensions::getStrings() const
......
...@@ -30,16 +30,16 @@ struct TextureCaps ...@@ -30,16 +30,16 @@ struct TextureCaps
~TextureCaps(); ~TextureCaps();
// Supports for basic texturing: glTexImage, glTexSubImage, etc // Supports for basic texturing: glTexImage, glTexSubImage, etc
bool texturable; bool texturable = false;
// Support for linear or anisotropic filtering // Support for linear or anisotropic filtering
bool filterable; bool filterable = false;
// Support for being used as a framebuffer attachment, i.e. glFramebufferTexture2D // Support for being used as a framebuffer attachment, i.e. glFramebufferTexture2D
bool textureAttachment; bool textureAttachment = false;
// Support for being used as a renderbuffer format, i.e. glFramebufferRenderbuffer // Support for being used as a renderbuffer format, i.e. glFramebufferRenderbuffer
bool renderbuffer; bool renderbuffer = false;
// Set of supported sample counts, only guaranteed to be valid in ES3. // Set of supported sample counts, only guaranteed to be valid in ES3.
SupportedSampleSet sampleCounts; SupportedSampleSet sampleCounts;
...@@ -121,388 +121,391 @@ struct Extensions ...@@ -121,388 +121,391 @@ struct Extensions
// ES2 Extension support // ES2 Extension support
// GL_OES_element_index_uint // GL_OES_element_index_uint
bool elementIndexUint; bool elementIndexUint = false;
// GL_OES_packed_depth_stencil // GL_OES_packed_depth_stencil
bool packedDepthStencil; bool packedDepthStencil = false;
// GL_OES_get_program_binary // GL_OES_get_program_binary
bool getProgramBinary; bool getProgramBinary = false;
// GL_OES_rgb8_rgba8 // GL_OES_rgb8_rgba8
// Implies that TextureCaps for GL_RGB8 and GL_RGBA8 exist // Implies that TextureCaps for GL_RGB8 and GL_RGBA8 exist
bool rgb8rgba8; bool rgb8rgba8 = false;
// GL_EXT_texture_format_BGRA8888 // GL_EXT_texture_format_BGRA8888
// Implies that TextureCaps for GL_BGRA8 exist // Implies that TextureCaps for GL_BGRA8 exist
bool textureFormatBGRA8888; bool textureFormatBGRA8888 = false;
// GL_EXT_read_format_bgra // GL_EXT_read_format_bgra
bool readFormatBGRA; bool readFormatBGRA = false;
// GL_NV_pixel_buffer_object // GL_NV_pixel_buffer_object
bool pixelBufferObject; bool pixelBufferObject = false;
// GL_OES_mapbuffer and GL_EXT_map_buffer_range // GL_OES_mapbuffer and GL_EXT_map_buffer_range
bool mapBuffer; bool mapBuffer = false;
bool mapBufferRange; bool mapBufferRange = false;
// GL_EXT_color_buffer_half_float // GL_EXT_color_buffer_half_float
// Together with GL_OES_texture_half_float in a GLES 2.0 context, implies that half-float // Together with GL_OES_texture_half_float in a GLES 2.0 context, implies that half-float
// textures are renderable. // textures are renderable.
bool colorBufferHalfFloat; bool colorBufferHalfFloat = false;
// GL_OES_texture_half_float and GL_OES_texture_half_float_linear // GL_OES_texture_half_float and GL_OES_texture_half_float_linear
// Implies that TextureCaps for GL_RGB16F, GL_RGBA16F, GL_ALPHA32F_EXT, GL_LUMINANCE32F_EXT and // Implies that TextureCaps for GL_RGB16F, GL_RGBA16F, GL_ALPHA32F_EXT, GL_LUMINANCE32F_EXT and
// GL_LUMINANCE_ALPHA32F_EXT exist // GL_LUMINANCE_ALPHA32F_EXT exist
bool textureHalfFloat; bool textureHalfFloat = false;
bool textureHalfFloatLinear; bool textureHalfFloatLinear = false;
// GL_OES_texture_float and GL_OES_texture_float_linear // GL_OES_texture_float and GL_OES_texture_float_linear
// Implies that TextureCaps for GL_RGB32F, GL_RGBA32F, GL_ALPHA16F_EXT, GL_LUMINANCE16F_EXT and // Implies that TextureCaps for GL_RGB32F, GL_RGBA32F, GL_ALPHA16F_EXT, GL_LUMINANCE16F_EXT and
// GL_LUMINANCE_ALPHA16F_EXT exist // GL_LUMINANCE_ALPHA16F_EXT exist
bool textureFloat; bool textureFloat = false;
bool textureFloatLinear; bool textureFloatLinear = false;
// GL_EXT_texture_rg // GL_EXT_texture_rg
// Implies that TextureCaps for GL_R8, GL_RG8 (and floating point R/RG texture formats if // Implies that TextureCaps for GL_R8, GL_RG8 (and floating point R/RG texture formats if
// floating point extensions are also present) exist // floating point extensions are also present) exist
bool textureRG; bool textureRG = false;
// GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3 and // GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3 and
// GL_ANGLE_texture_compression_dxt5 Implies that TextureCaps exist for // GL_ANGLE_texture_compression_dxt5 Implies that TextureCaps exist for
// GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT // GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
// GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE and GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE // GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE and GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE
bool textureCompressionDXT1; bool textureCompressionDXT1 = false;
bool textureCompressionDXT3; bool textureCompressionDXT3 = false;
bool textureCompressionDXT5; bool textureCompressionDXT5 = false;
// GL_EXT_texture_compression_s3tc_srgb // GL_EXT_texture_compression_s3tc_srgb
// Implies that TextureCaps exist for GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, // Implies that TextureCaps exist for GL_COMPRESSED_SRGB_S3TC_DXT1_EXT,
// GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, and // GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, and
// GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT // GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
bool textureCompressionS3TCsRGB; bool textureCompressionS3TCsRGB = false;
// GL_KHR_texture_compression_astc_hdr // GL_KHR_texture_compression_astc_hdr
bool textureCompressionASTCHDR; bool textureCompressionASTCHDR = false;
// GL_KHR_texture_compression_astc_ldr // GL_KHR_texture_compression_astc_ldr
bool textureCompressionASTCLDR; bool textureCompressionASTCLDR = false;
// GL_EXT_texture_compression_bptc // GL_EXT_texture_compression_bptc
bool textureCompressionBPTC; bool textureCompressionBPTC = false;
// GL_OES_compressed_ETC1_RGB8_texture // GL_OES_compressed_ETC1_RGB8_texture
// Implies that TextureCaps for GL_ETC1_RGB8_OES exist // Implies that TextureCaps for GL_ETC1_RGB8_OES exist
bool compressedETC1RGB8Texture; bool compressedETC1RGB8Texture = false;
// OES_compressed_ETC2_RGB8_texture // OES_compressed_ETC2_RGB8_texture
bool compressedETC2RGB8Texture; bool compressedETC2RGB8Texture = false;
// OES_compressed_ETC2_sRGB8_texture // OES_compressed_ETC2_sRGB8_texture
bool compressedETC2sRGB8Texture; bool compressedETC2sRGB8Texture = false;
// OES_compressed_ETC2_punchthroughA_RGBA8_texture // OES_compressed_ETC2_punchthroughA_RGBA8_texture
bool compressedETC2PunchthroughARGB8Texture; bool compressedETC2PunchthroughARGB8Texture = false;
// OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture // OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture
bool compressedETC2PunchthroughAsRGB8AlphaTexture; bool compressedETC2PunchthroughAsRGB8AlphaTexture = false;
// OES_compressed_ETC2_RGBA8_texture // OES_compressed_ETC2_RGBA8_texture
bool compressedETC2RGBA8Texture; bool compressedETC2RGBA8Texture = false;
// OES_compressed_ETC2_sRGB8_alpha8_texture // OES_compressed_ETC2_sRGB8_alpha8_texture
bool compressedETC2sRGB8Alpha8Texture; bool compressedETC2sRGB8Alpha8Texture = false;
// OES_compressed_EAC_R11_unsigned_texture // OES_compressed_EAC_R11_unsigned_texture
bool compressedEACR11UnsignedTexture; bool compressedEACR11UnsignedTexture = false;
// OES_compressed_EAC_R11_signed_texture // OES_compressed_EAC_R11_signed_texture
bool compressedEACR11SignedTexture; bool compressedEACR11SignedTexture = false;
// OES_compressed_EAC_RG11_unsigned_texture // OES_compressed_EAC_RG11_unsigned_texture
bool compressedEACRG11UnsignedTexture; bool compressedEACRG11UnsignedTexture = false;
// OES_compressed_EAC_RG11_signed_texture // OES_compressed_EAC_RG11_signed_texture
bool compressedEACRG11SignedTexture; bool compressedEACRG11SignedTexture = false;
// GL_CHROMIUM_compressed_texture_etc // GL_CHROMIUM_compressed_texture_etc
// ONLY exposed if ETC texture formats are natively supported without decompression // ONLY exposed if ETC texture formats are natively supported without decompression
// Backends should enable this extension explicitly. It is not enabled with // Backends should enable this extension explicitly. It is not enabled with
// setTextureExtensionSupport, use DetermineCompressedTextureETCSupport to check if all of the // setTextureExtensionSupport, use DetermineCompressedTextureETCSupport to check if all of the
// individual formats required to support this extension are available. // individual formats required to support this extension are available.
bool compressedTextureETC; bool compressedTextureETC = false;
// GL_EXT_sRGB // GL_EXT_sRGB
// Implies that TextureCaps for GL_SRGB8_ALPHA8 and GL_SRGB8 exist // Implies that TextureCaps for GL_SRGB8_ALPHA8 and GL_SRGB8 exist
// TODO: Don't advertise this extension in ES3 // TODO: Don't advertise this extension in ES3
bool sRGB; bool sRGB = false;
// GL_ANGLE_depth_texture // GL_ANGLE_depth_texture
bool depthTextureANGLE; bool depthTextureANGLE = false;
// OES_depth_texture // OES_depth_texture
bool depthTextureOES; bool depthTextureOES = false;
// GL_OES_depth24 // GL_OES_depth24
// Allows DEPTH_COMPONENT24_OES as a valid Renderbuffer format. // Allows DEPTH_COMPONENT24_OES as a valid Renderbuffer format.
bool depth24OES; bool depth24OES = false;
// GL_OES_depth32 // GL_OES_depth32
// Allows DEPTH_COMPONENT32_OES as a valid Renderbuffer format. // Allows DEPTH_COMPONENT32_OES as a valid Renderbuffer format.
bool depth32; bool depth32 = false;
// GL_OES_texture_3D // GL_OES_texture_3D
bool texture3DOES; bool texture3DOES = false;
// GL_EXT_texture_storage // GL_EXT_texture_storage
bool textureStorage; bool textureStorage = false;
// GL_OES_texture_npot // GL_OES_texture_npot
bool textureNPOT; bool textureNPOT = false;
// GL_EXT_draw_buffers // GL_EXT_draw_buffers
bool drawBuffers; bool drawBuffers = false;
// GL_EXT_texture_filter_anisotropic // GL_EXT_texture_filter_anisotropic
bool textureFilterAnisotropic; bool textureFilterAnisotropic = false;
GLfloat maxTextureAnisotropy; GLfloat maxTextureAnisotropy = 0.0f;
// GL_EXT_occlusion_query_boolean // GL_EXT_occlusion_query_boolean
bool occlusionQueryBoolean; bool occlusionQueryBoolean = false;
// GL_NV_fence // GL_NV_fence
bool fence; bool fence = false;
// GL_EXT_disjoint_timer_query // GL_EXT_disjoint_timer_query
bool disjointTimerQuery; bool disjointTimerQuery = false;
GLuint queryCounterBitsTimeElapsed; GLuint queryCounterBitsTimeElapsed = 0;
GLuint queryCounterBitsTimestamp; GLuint queryCounterBitsTimestamp = 0;
// GL_EXT_robustness // GL_EXT_robustness
bool robustness; bool robustness = false;
// GL_KHR_robust_buffer_access_behavior // GL_KHR_robust_buffer_access_behavior
bool robustBufferAccessBehavior; bool robustBufferAccessBehavior = false;
// GL_EXT_blend_minmax // GL_EXT_blend_minmax
bool blendMinMax; bool blendMinMax = false;
// GL_ANGLE_framebuffer_blit // GL_ANGLE_framebuffer_blit
bool framebufferBlit; bool framebufferBlit = false;
// GL_ANGLE_framebuffer_multisample // GL_ANGLE_framebuffer_multisample
bool framebufferMultisample; bool framebufferMultisample = false;
// GL_ANGLE_instanced_arrays // GL_ANGLE_instanced_arrays
bool instancedArraysANGLE; bool instancedArraysANGLE = false;
// GL_EXT_instanced_arrays // GL_EXT_instanced_arrays
bool instancedArraysEXT; bool instancedArraysEXT = false;
// Any version of the instanced arrays extension // Any version of the instanced arrays extension
bool instancedArraysAny() const { return (instancedArraysANGLE || instancedArraysEXT); } bool instancedArraysAny() const { return (instancedArraysANGLE || instancedArraysEXT); }
// GL_ANGLE_pack_reverse_row_order // GL_ANGLE_pack_reverse_row_order
bool packReverseRowOrder; bool packReverseRowOrder = false;
// GL_OES_standard_derivatives // GL_OES_standard_derivatives
bool standardDerivatives; bool standardDerivatives = false;
// GL_EXT_shader_texture_lod // GL_EXT_shader_texture_lod
bool shaderTextureLOD; bool shaderTextureLOD = false;
// GL_EXT_frag_depth // GL_EXT_frag_depth
bool fragDepth; bool fragDepth = false;
// OVR_multiview // OVR_multiview
bool multiview; bool multiview = false;
GLuint maxViews; GLuint maxViews = 1;
// OVR_multiview2 // OVR_multiview2
bool multiview2; bool multiview2 = false;
// GL_ANGLE_texture_usage // GL_ANGLE_texture_usage
bool textureUsage; bool textureUsage = false;
// GL_ANGLE_translated_shader_source // GL_ANGLE_translated_shader_source
bool translatedShaderSource; bool translatedShaderSource = false;
// GL_OES_fbo_render_mipmap // GL_OES_fbo_render_mipmap
bool fboRenderMipmap; bool fboRenderMipmap = false;
// GL_EXT_discard_framebuffer // GL_EXT_discard_framebuffer
bool discardFramebuffer; bool discardFramebuffer = false;
// EXT_debug_marker // EXT_debug_marker
bool debugMarker; bool debugMarker = false;
// GL_OES_EGL_image // GL_OES_EGL_image
bool eglImage; bool eglImage = false;
// GL_OES_EGL_image_external // GL_OES_EGL_image_external
bool eglImageExternal; bool eglImageExternal = false;
// GL_OES_EGL_image_external_essl3 // GL_OES_EGL_image_external_essl3
bool eglImageExternalEssl3; bool eglImageExternalEssl3 = false;
// GL_OES_EGL_sync // GL_OES_EGL_sync
bool eglSync; bool eglSync = false;
// GL_EXT_memory_object // GL_EXT_memory_object
bool memoryObject; bool memoryObject = false;
// GL_EXT_memory_object_fd // GL_EXT_memory_object_fd
bool memoryObjectFd; bool memoryObjectFd = false;
// GL_EXT_semaphore // GL_EXT_semaphore
bool semaphore; bool semaphore = false;
// GL_EXT_semaphore_fd // GL_EXT_semaphore_fd
bool semaphoreFd; bool semaphoreFd = false;
// NV_EGL_stream_consumer_external // NV_EGL_stream_consumer_external
bool eglStreamConsumerExternal; bool eglStreamConsumerExternal = false;
// EXT_unpack_subimage // EXT_unpack_subimage
bool unpackSubimage; bool unpackSubimage = false;
// NV_pack_subimage // NV_pack_subimage
bool packSubimage; bool packSubimage = false;
// GL_OES_vertex_array_object // GL_OES_vertex_array_object
bool vertexArrayObject; bool vertexArrayObject = false;
// GL_KHR_debug // GL_KHR_debug
bool debug; bool debug = false;
GLuint maxDebugMessageLength; GLuint maxDebugMessageLength = 0;
GLuint maxDebugLoggedMessages; GLuint maxDebugLoggedMessages = 0;
GLuint maxDebugGroupStackDepth; GLuint maxDebugGroupStackDepth = 0;
GLuint maxLabelLength; GLuint maxLabelLength = 0;
// KHR_no_error // KHR_no_error
bool noError; bool noError = false;
// GL_ANGLE_lossy_etc_decode // GL_ANGLE_lossy_etc_decode
bool lossyETCDecode; bool lossyETCDecode = false;
// GL_CHROMIUM_bind_uniform_location // GL_CHROMIUM_bind_uniform_location
bool bindUniformLocation; bool bindUniformLocation = false;
// GL_CHROMIUM_sync_query // GL_CHROMIUM_sync_query
bool syncQuery; bool syncQuery = false;
// GL_CHROMIUM_copy_texture // GL_CHROMIUM_copy_texture
bool copyTexture; bool copyTexture = false;
// GL_CHROMIUM_copy_compressed_texture // GL_CHROMIUM_copy_compressed_texture
bool copyCompressedTexture; bool copyCompressedTexture = false;
// GL_ANGLE_copy_texture_3d // GL_ANGLE_copy_texture_3d
bool copyTexture3d; bool copyTexture3d = false;
// GL_ANGLE_webgl_compatibility // GL_ANGLE_webgl_compatibility
bool webglCompatibility; bool webglCompatibility = false;
// GL_ANGLE_request_extension // GL_ANGLE_request_extension
bool requestExtension; bool requestExtension = false;
// GL_CHROMIUM_bind_generates_resource // GL_CHROMIUM_bind_generates_resource
bool bindGeneratesResource; bool bindGeneratesResource = false;
// GL_ANGLE_robust_client_memory // GL_ANGLE_robust_client_memory
bool robustClientMemory; bool robustClientMemory = false;
// GL_OES_texture_border_clamp // GL_OES_texture_border_clamp
bool textureBorderClamp; bool textureBorderClamp = false;
// GL_EXT_texture_sRGB_decode // GL_EXT_texture_sRGB_decode
bool textureSRGBDecode; bool textureSRGBDecode = false;
// GL_EXT_sRGB_write_control // GL_EXT_sRGB_write_control
bool sRGBWriteControl; bool sRGBWriteControl = false;
// GL_CHROMIUM_color_buffer_float_rgb // GL_CHROMIUM_color_buffer_float_rgb
bool colorBufferFloatRGB; bool colorBufferFloatRGB = false;
// GL_CHROMIUM_color_buffer_float_rgba // GL_CHROMIUM_color_buffer_float_rgba
bool colorBufferFloatRGBA; bool colorBufferFloatRGBA = false;
// ES3 Extension support // ES3 Extension support
// GL_EXT_color_buffer_float // GL_EXT_color_buffer_float
bool colorBufferFloat; bool colorBufferFloat = false;
// GL_EXT_multisample_compatibility. // GL_EXT_multisample_compatibility.
// written against ES 3.1 but can apply to earlier versions. // written against ES 3.1 but can apply to earlier versions.
bool multisampleCompatibility; bool multisampleCompatibility = false;
// GL_CHROMIUM_framebuffer_mixed_samples // GL_CHROMIUM_framebuffer_mixed_samples
bool framebufferMixedSamples; bool framebufferMixedSamples = false;
// GL_EXT_texture_norm16 // GL_EXT_texture_norm16
// written against ES 3.1 but can apply to ES 3.0 as well. // written against ES 3.1 but can apply to ES 3.0 as well.
bool textureNorm16; bool textureNorm16 = false;
// GL_CHROMIUM_path_rendering // GL_CHROMIUM_path_rendering
bool pathRendering; bool pathRendering = false;
// GL_OES_surfaceless_context // GL_OES_surfaceless_context
bool surfacelessContext; bool surfacelessContext = false;
// GL_ANGLE_client_arrays // GL_ANGLE_client_arrays
bool clientArrays; bool clientArrays = false;
// GL_ANGLE_robust_resource_initialization // GL_ANGLE_robust_resource_initialization
bool robustResourceInitialization; bool robustResourceInitialization = false;
// GL_ANGLE_program_cache_control // GL_ANGLE_program_cache_control
bool programCacheControl; bool programCacheControl = false;
// GL_ANGLE_texture_rectangle // GL_ANGLE_texture_rectangle
bool textureRectangle; bool textureRectangle = false;
// GL_EXT_geometry_shader // GL_EXT_geometry_shader
bool geometryShader; bool geometryShader = false;
// GLES1 emulation: GLES1 extensions // GLES1 emulation: GLES1 extensions
// GL_OES_point_size_array // GL_OES_point_size_array
bool pointSizeArray; bool pointSizeArray = false;
// GL_OES_texture_cube_map // GL_OES_texture_cube_map
bool textureCubeMap; bool textureCubeMap = false;
// GL_OES_point_sprite // GL_OES_point_sprite
bool pointSprite; bool pointSprite = false;
// GL_OES_draw_texture // GL_OES_draw_texture
bool drawTexture; bool drawTexture = false;
// EGL_ANGLE_explicit_context GL subextensions // EGL_ANGLE_explicit_context GL subextensions
// GL_ANGLE_explicit_context_gles1 // GL_ANGLE_explicit_context_gles1
bool explicitContextGles1; bool explicitContextGles1 = false;
// GL_ANGLE_explicit_context // GL_ANGLE_explicit_context
bool explicitContext; bool explicitContext = false;
// GL_KHR_parallel_shader_compile // GL_KHR_parallel_shader_compile
bool parallelShaderCompile; bool parallelShaderCompile = false;
// GL_OES_texture_storage_multisample_2d_array // GL_OES_texture_storage_multisample_2d_array
bool textureStorageMultisample2DArray; bool textureStorageMultisample2DArray = false;
// GL_ANGLE_multiview_multisample // GL_ANGLE_multiview_multisample
bool multiviewMultisample; bool multiviewMultisample = false;
// GL_EXT_blend_func_extended // GL_EXT_blend_func_extended
bool blendFuncExtended; bool blendFuncExtended = false;
GLuint maxDualSourceDrawBuffers; GLuint maxDualSourceDrawBuffers = 0;
// GL_EXT_float_blend // GL_EXT_float_blend
bool floatBlend; bool floatBlend = false;
// GL_ANGLE_memory_size // GL_ANGLE_memory_size
bool memorySize; bool memorySize = false;
// GL_ANGLE_texture_multisample // GL_ANGLE_texture_multisample
bool textureMultisample; bool textureMultisample = false;
// GL_ANGLE_multi_draw // GL_ANGLE_multi_draw
bool multiDraw; bool multiDraw = false;
// GL_ANGLE_provoking_vertex // GL_ANGLE_provoking_vertex
bool provokingVertex = false; bool provokingVertex = false;
...@@ -532,32 +535,32 @@ struct Limitations ...@@ -532,32 +535,32 @@ struct Limitations
Limitations(); Limitations();
// Renderer doesn't support gl_FrontFacing in fragment shaders // Renderer doesn't support gl_FrontFacing in fragment shaders
bool noFrontFacingSupport; bool noFrontFacingSupport = false;
// Renderer doesn't support GL_SAMPLE_ALPHA_TO_COVERAGE // Renderer doesn't support GL_SAMPLE_ALPHA_TO_COVERAGE
bool noSampleAlphaToCoverageSupport; bool noSampleAlphaToCoverageSupport = false;
// In glVertexAttribDivisorANGLE, attribute zero must have a zero divisor // In glVertexAttribDivisorANGLE, attribute zero must have a zero divisor
bool attributeZeroRequiresZeroDivisorInEXT; bool attributeZeroRequiresZeroDivisorInEXT = false;
// Unable to support different values for front and back faces for stencil refs and masks // Unable to support different values for front and back faces for stencil refs and masks
bool noSeparateStencilRefsAndMasks; bool noSeparateStencilRefsAndMasks = false;
// Renderer doesn't support non-constant indexing loops in fragment shader // Renderer doesn't support non-constant indexing loops in fragment shader
bool shadersRequireIndexedLoopValidation; bool shadersRequireIndexedLoopValidation = false;
// Renderer doesn't support Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA // Renderer doesn't support Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA
// and GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR blend functions. // and GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR blend functions.
bool noSimultaneousConstantColorAndAlphaBlendFunc; bool noSimultaneousConstantColorAndAlphaBlendFunc = false;
// D3D9 does not support flexible varying register packing. // D3D9 does not support flexible varying register packing.
bool noFlexibleVaryingPacking; bool noFlexibleVaryingPacking = false;
// D3D does not support having multiple transform feedback outputs go to the same buffer. // D3D does not support having multiple transform feedback outputs go to the same buffer.
bool noDoubleBoundTransformFeedbackBuffers; bool noDoubleBoundTransformFeedbackBuffers = false;
// D3D does not support vertex attribute aliasing // D3D does not support vertex attribute aliasing
bool noVertexAttributeAliasing; bool noVertexAttributeAliasing = false;
}; };
struct TypePrecision struct TypePrecision
...@@ -572,8 +575,8 @@ struct TypePrecision ...@@ -572,8 +575,8 @@ struct TypePrecision
void get(GLint *returnRange, GLint *returnPrecision) const; void get(GLint *returnRange, GLint *returnPrecision) const;
std::array<GLint, 2> range; std::array<GLint, 2> range = {0, 0};
GLint precision; GLint precision = 0;
}; };
struct Caps struct Caps
...@@ -583,39 +586,39 @@ struct Caps ...@@ -583,39 +586,39 @@ struct Caps
~Caps(); ~Caps();
// ES 3.1 (April 29, 2015) 20.39: implementation dependent values // ES 3.1 (April 29, 2015) 20.39: implementation dependent values
GLuint64 maxElementIndex; GLuint64 maxElementIndex = 0;
GLuint max3DTextureSize; GLuint max3DTextureSize = 0;
GLuint max2DTextureSize; GLuint max2DTextureSize = 0;
GLuint maxRectangleTextureSize; GLuint maxRectangleTextureSize = 0;
GLuint maxArrayTextureLayers; GLuint maxArrayTextureLayers = 0;
GLfloat maxLODBias; GLfloat maxLODBias = 0.0f;
GLuint maxCubeMapTextureSize; GLuint maxCubeMapTextureSize = 0;
GLuint maxRenderbufferSize; GLuint maxRenderbufferSize = 0;
GLfloat minAliasedPointSize; GLfloat minAliasedPointSize = 1.0f;
GLfloat maxAliasedPointSize; GLfloat maxAliasedPointSize = 1.0f;
GLfloat minAliasedLineWidth; GLfloat minAliasedLineWidth = 0.0f;
GLfloat maxAliasedLineWidth; GLfloat maxAliasedLineWidth = 0.0f;
// ES 3.1 (April 29, 2015) 20.40: implementation dependent values (cont.) // ES 3.1 (April 29, 2015) 20.40: implementation dependent values (cont.)
GLuint maxDrawBuffers; GLuint maxDrawBuffers = 0;
GLuint maxFramebufferWidth; GLuint maxFramebufferWidth = 0;
GLuint maxFramebufferHeight; GLuint maxFramebufferHeight = 0;
GLuint maxFramebufferSamples; GLuint maxFramebufferSamples = 0;
GLuint maxColorAttachments; GLuint maxColorAttachments = 0;
GLuint maxViewportWidth; GLuint maxViewportWidth = 0;
GLuint maxViewportHeight; GLuint maxViewportHeight = 0;
GLuint maxSampleMaskWords; GLuint maxSampleMaskWords = 0;
GLuint maxColorTextureSamples; GLuint maxColorTextureSamples = 0;
GLuint maxDepthTextureSamples; GLuint maxDepthTextureSamples = 0;
GLuint maxIntegerSamples; GLuint maxIntegerSamples = 0;
GLuint64 maxServerWaitTimeout; GLuint64 maxServerWaitTimeout = 0;
// ES 3.1 (April 29, 2015) Table 20.41: Implementation dependent values (cont.) // ES 3.1 (April 29, 2015) Table 20.41: Implementation dependent values (cont.)
GLint maxVertexAttribRelativeOffset; GLint maxVertexAttribRelativeOffset = 0;
GLuint maxVertexAttribBindings; GLuint maxVertexAttribBindings = 0;
GLint maxVertexAttribStride; GLint maxVertexAttribStride = 0;
GLuint maxElementsIndices; GLuint maxElementsIndices = 0;
GLuint maxElementsVertices; GLuint maxElementsVertices = 0;
std::vector<GLenum> compressedTextureFormats; std::vector<GLenum> compressedTextureFormats;
std::vector<GLenum> programBinaryFormats; std::vector<GLenum> programBinaryFormats;
std::vector<GLenum> shaderBinaryFormats; std::vector<GLenum> shaderBinaryFormats;
...@@ -641,95 +644,95 @@ struct Caps ...@@ -641,95 +644,95 @@ struct Caps
// limits // limits
// GL_EXT_geometry_shader (May 31, 2016) Table 20.46: Implementation dependent aggregate shader // GL_EXT_geometry_shader (May 31, 2016) Table 20.46: Implementation dependent aggregate shader
// limits // limits
ShaderMap<GLuint> maxShaderUniformBlocks; ShaderMap<GLuint> maxShaderUniformBlocks = {};
ShaderMap<GLuint> maxShaderTextureImageUnits; ShaderMap<GLuint> maxShaderTextureImageUnits = {};
ShaderMap<GLuint> maxShaderStorageBlocks; ShaderMap<GLuint> maxShaderStorageBlocks = {};
ShaderMap<GLuint> maxShaderUniformComponents; ShaderMap<GLuint> maxShaderUniformComponents = {};
ShaderMap<GLuint> maxShaderAtomicCounterBuffers; ShaderMap<GLuint> maxShaderAtomicCounterBuffers = {};
ShaderMap<GLuint> maxShaderAtomicCounters; ShaderMap<GLuint> maxShaderAtomicCounters = {};
ShaderMap<GLuint> maxShaderImageUniforms; ShaderMap<GLuint> maxShaderImageUniforms = {};
// Note that we can query MAX_COMPUTE_UNIFORM_COMPONENTS and MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT // Note that we can query MAX_COMPUTE_UNIFORM_COMPONENTS and MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT
// by GetIntegerv, but we can only use GetInteger64v on MAX_VERTEX_UNIFORM_COMPONENTS and // by GetIntegerv, but we can only use GetInteger64v on MAX_VERTEX_UNIFORM_COMPONENTS and
// MAX_FRAGMENT_UNIFORM_COMPONENTS. Currently we use GLuint64 to store all these values so that // MAX_FRAGMENT_UNIFORM_COMPONENTS. Currently we use GLuint64 to store all these values so that
// we can put them together into one ShaderMap. // we can put them together into one ShaderMap.
ShaderMap<GLuint64> maxCombinedShaderUniformComponents; ShaderMap<GLuint64> maxCombinedShaderUniformComponents = {};
// ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits // ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits
GLuint maxVertexAttributes; GLuint maxVertexAttributes = 0;
GLuint maxVertexUniformVectors; GLuint maxVertexUniformVectors = 0;
GLuint maxVertexOutputComponents; GLuint maxVertexOutputComponents = 0;
// ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits // ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits
GLuint maxFragmentUniformVectors; GLuint maxFragmentUniformVectors = 0;
GLuint maxFragmentInputComponents; GLuint maxFragmentInputComponents = 0;
GLint minProgramTextureGatherOffset; GLint minProgramTextureGatherOffset = 0;
GLuint maxProgramTextureGatherOffset; GLuint maxProgramTextureGatherOffset = 0;
GLint minProgramTexelOffset; GLint minProgramTexelOffset = 0;
GLint maxProgramTexelOffset; GLint maxProgramTexelOffset = 0;
// ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits // ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits
std::array<GLuint, 3> maxComputeWorkGroupCount; std::array<GLuint, 3> maxComputeWorkGroupCount = {0, 0, 0};
std::array<GLuint, 3> maxComputeWorkGroupSize; std::array<GLuint, 3> maxComputeWorkGroupSize = {0, 0, 0};
GLuint maxComputeWorkGroupInvocations; GLuint maxComputeWorkGroupInvocations = 0;
GLuint maxComputeSharedMemorySize; GLuint maxComputeSharedMemorySize = 0;
// ES 3.1 (April 29, 2015) Table 20.46: implementation dependent aggregate shader limits // ES 3.1 (April 29, 2015) Table 20.46: implementation dependent aggregate shader limits
GLuint maxUniformBufferBindings; GLuint maxUniformBufferBindings = 0;
GLuint64 maxUniformBlockSize; GLuint64 maxUniformBlockSize = 0;
GLuint uniformBufferOffsetAlignment; GLuint uniformBufferOffsetAlignment = 0;
GLuint maxCombinedUniformBlocks; GLuint maxCombinedUniformBlocks = 0;
GLuint maxVaryingComponents; GLuint maxVaryingComponents = 0;
GLuint maxVaryingVectors; GLuint maxVaryingVectors = 0;
GLuint maxCombinedTextureImageUnits; GLuint maxCombinedTextureImageUnits = 0;
GLuint maxCombinedShaderOutputResources; GLuint maxCombinedShaderOutputResources = 0;
// ES 3.1 (April 29, 2015) Table 20.47: implementation dependent aggregate shader limits (cont.) // ES 3.1 (April 29, 2015) Table 20.47: implementation dependent aggregate shader limits (cont.)
GLuint maxUniformLocations; GLuint maxUniformLocations = 0;
GLuint maxAtomicCounterBufferBindings; GLuint maxAtomicCounterBufferBindings = 0;
GLuint maxAtomicCounterBufferSize; GLuint maxAtomicCounterBufferSize = 0;
GLuint maxCombinedAtomicCounterBuffers; GLuint maxCombinedAtomicCounterBuffers = 0;
GLuint maxCombinedAtomicCounters; GLuint maxCombinedAtomicCounters = 0;
GLuint maxImageUnits; GLuint maxImageUnits = 0;
GLuint maxCombinedImageUniforms; GLuint maxCombinedImageUniforms = 0;
GLuint maxShaderStorageBufferBindings; GLuint maxShaderStorageBufferBindings = 0;
GLuint64 maxShaderStorageBlockSize; GLuint64 maxShaderStorageBlockSize = 0;
GLuint maxCombinedShaderStorageBlocks; GLuint maxCombinedShaderStorageBlocks = 0;
GLuint shaderStorageBufferOffsetAlignment; GLuint shaderStorageBufferOffsetAlignment = 0;
// ES 3.1 (April 29, 2015) Table 20.48: implementation dependent transform feedback limits // ES 3.1 (April 29, 2015) Table 20.48: implementation dependent transform feedback limits
GLuint maxTransformFeedbackInterleavedComponents; GLuint maxTransformFeedbackInterleavedComponents = 0;
GLuint maxTransformFeedbackSeparateAttributes; GLuint maxTransformFeedbackSeparateAttributes = 0;
GLuint maxTransformFeedbackSeparateComponents; GLuint maxTransformFeedbackSeparateComponents = 0;
// ES 3.1 (April 29, 2015) Table 20.49: Framebuffer Dependent Values // ES 3.1 (April 29, 2015) Table 20.49: Framebuffer Dependent Values
GLuint maxSamples; GLuint maxSamples = 0;
// GL_EXT_geometry_shader (May 31, 2016) Table 20.40: Implementation-Dependent Values (cont.) // GL_EXT_geometry_shader (May 31, 2016) Table 20.40: Implementation-Dependent Values (cont.)
GLuint maxFramebufferLayers; GLuint maxFramebufferLayers = 0;
GLuint layerProvokingVertex; GLuint layerProvokingVertex = 0;
// GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader // GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader
// limits // limits
GLuint maxGeometryInputComponents; GLuint maxGeometryInputComponents = 0;
GLuint maxGeometryOutputComponents; GLuint maxGeometryOutputComponents = 0;
GLuint maxGeometryOutputVertices; GLuint maxGeometryOutputVertices = 0;
GLuint maxGeometryTotalOutputComponents; GLuint maxGeometryTotalOutputComponents = 0;
GLuint maxGeometryShaderInvocations; GLuint maxGeometryShaderInvocations = 0;
GLuint subPixelBits; GLuint subPixelBits = 4;
// GLES1 emulation: Caps for ES 1.1. Taken from Table 6.20 / 6.22 in the OpenGL ES 1.1 spec. // GLES1 emulation: Caps for ES 1.1. Taken from Table 6.20 / 6.22 in the OpenGL ES 1.1 spec.
GLuint maxMultitextureUnits; GLuint maxMultitextureUnits = 0;
GLuint maxClipPlanes; GLuint maxClipPlanes = 0;
GLuint maxLights; GLuint maxLights = 0;
static constexpr int GlobalMatrixStackDepth = 16; static constexpr int GlobalMatrixStackDepth = 16;
GLuint maxModelviewMatrixStackDepth; GLuint maxModelviewMatrixStackDepth = 0;
GLuint maxProjectionMatrixStackDepth; GLuint maxProjectionMatrixStackDepth = 0;
GLuint maxTextureMatrixStackDepth; GLuint maxTextureMatrixStackDepth = 0;
GLfloat minSmoothPointSize; GLfloat minSmoothPointSize = 0.0f;
GLfloat maxSmoothPointSize; GLfloat maxSmoothPointSize = 0.0f;
GLfloat minSmoothLineWidth; GLfloat minSmoothLineWidth = 0.0f;
GLfloat maxSmoothLineWidth; GLfloat maxSmoothLineWidth = 0.0f;
}; };
Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensions); Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensions);
...@@ -754,148 +757,148 @@ struct DisplayExtensions ...@@ -754,148 +757,148 @@ struct DisplayExtensions
std::vector<std::string> getStrings() const; std::vector<std::string> getStrings() const;
// EGL_EXT_create_context_robustness // EGL_EXT_create_context_robustness
bool createContextRobustness; bool createContextRobustness = false;
// EGL_ANGLE_d3d_share_handle_client_buffer // EGL_ANGLE_d3d_share_handle_client_buffer
bool d3dShareHandleClientBuffer; bool d3dShareHandleClientBuffer = false;
// EGL_ANGLE_d3d_texture_client_buffer // EGL_ANGLE_d3d_texture_client_buffer
bool d3dTextureClientBuffer; bool d3dTextureClientBuffer = false;
// EGL_ANGLE_surface_d3d_texture_2d_share_handle // EGL_ANGLE_surface_d3d_texture_2d_share_handle
bool surfaceD3DTexture2DShareHandle; bool surfaceD3DTexture2DShareHandle = false;
// EGL_ANGLE_query_surface_pointer // EGL_ANGLE_query_surface_pointer
bool querySurfacePointer; bool querySurfacePointer = false;
// EGL_ANGLE_window_fixed_size // EGL_ANGLE_window_fixed_size
bool windowFixedSize; bool windowFixedSize = false;
// EGL_ANGLE_keyed_mutex // EGL_ANGLE_keyed_mutex
bool keyedMutex; bool keyedMutex = false;
// EGL_ANGLE_surface_orientation // EGL_ANGLE_surface_orientation
bool surfaceOrientation; bool surfaceOrientation = false;
// EGL_NV_post_sub_buffer // EGL_NV_post_sub_buffer
bool postSubBuffer; bool postSubBuffer = false;
// EGL_KHR_create_context // EGL_KHR_create_context
bool createContext; bool createContext = false;
// EGL_EXT_device_query // EGL_EXT_device_query
bool deviceQuery; bool deviceQuery = false;
// EGL_KHR_image // EGL_KHR_image
bool image; bool image = false;
// EGL_KHR_image_base // EGL_KHR_image_base
bool imageBase; bool imageBase = false;
// EGL_KHR_image_pixmap // EGL_KHR_image_pixmap
bool imagePixmap; bool imagePixmap = false;
// EGL_KHR_gl_texture_2D_image // EGL_KHR_gl_texture_2D_image
bool glTexture2DImage; bool glTexture2DImage = false;
// EGL_KHR_gl_texture_cubemap_image // EGL_KHR_gl_texture_cubemap_image
bool glTextureCubemapImage; bool glTextureCubemapImage = false;
// EGL_KHR_gl_texture_3D_image // EGL_KHR_gl_texture_3D_image
bool glTexture3DImage; bool glTexture3DImage = false;
// EGL_KHR_gl_renderbuffer_image // EGL_KHR_gl_renderbuffer_image
bool glRenderbufferImage; bool glRenderbufferImage = false;
// EGL_KHR_get_all_proc_addresses // EGL_KHR_get_all_proc_addresses
bool getAllProcAddresses; bool getAllProcAddresses = false;
// EGL_ANGLE_flexible_surface_compatibility // EGL_ANGLE_flexible_surface_compatibility
bool flexibleSurfaceCompatibility; bool flexibleSurfaceCompatibility = false;
// EGL_ANGLE_direct_composition // EGL_ANGLE_direct_composition
bool directComposition; bool directComposition = false;
// EGL_ANGLE_windows_ui_composition // EGL_ANGLE_windows_ui_composition
bool windowsUIComposition; bool windowsUIComposition = false;
// KHR_create_context_no_error // KHR_create_context_no_error
bool createContextNoError; bool createContextNoError = false;
// EGL_KHR_stream // EGL_KHR_stream
bool stream; bool stream = false;
// EGL_KHR_stream_consumer_gltexture // EGL_KHR_stream_consumer_gltexture
bool streamConsumerGLTexture; bool streamConsumerGLTexture = false;
// EGL_NV_stream_consumer_gltexture_yuv // EGL_NV_stream_consumer_gltexture_yuv
bool streamConsumerGLTextureYUV; bool streamConsumerGLTextureYUV = false;
// EGL_ANGLE_stream_producer_d3d_texture // EGL_ANGLE_stream_producer_d3d_texture
bool streamProducerD3DTexture; bool streamProducerD3DTexture = false;
// EGL_KHR_fence_sync // EGL_KHR_fence_sync
bool fenceSync; bool fenceSync = false;
// EGL_KHR_wait_sync // EGL_KHR_wait_sync
bool waitSync; bool waitSync = false;
// EGL_ANGLE_create_context_webgl_compatibility // EGL_ANGLE_create_context_webgl_compatibility
bool createContextWebGLCompatibility; bool createContextWebGLCompatibility = false;
// EGL_CHROMIUM_create_context_bind_generates_resource // EGL_CHROMIUM_create_context_bind_generates_resource
bool createContextBindGeneratesResource; bool createContextBindGeneratesResource = false;
// EGL_CHROMIUM_get_sync_values // EGL_CHROMIUM_get_sync_values
bool getSyncValues; bool getSyncValues = false;
// EGL_KHR_swap_buffers_with_damage // EGL_KHR_swap_buffers_with_damage
bool swapBuffersWithDamage; bool swapBuffersWithDamage = false;
// EGL_EXT_pixel_format_float // EGL_EXT_pixel_format_float
bool pixelFormatFloat; bool pixelFormatFloat = false;
// EGL_KHR_surfaceless_context // EGL_KHR_surfaceless_context
bool surfacelessContext; bool surfacelessContext = false;
// EGL_ANGLE_display_texture_share_group // EGL_ANGLE_display_texture_share_group
bool displayTextureShareGroup; bool displayTextureShareGroup = false;
// EGL_ANGLE_create_context_client_arrays // EGL_ANGLE_create_context_client_arrays
bool createContextClientArrays; bool createContextClientArrays = false;
// EGL_ANGLE_program_cache_control // EGL_ANGLE_program_cache_control
bool programCacheControl; bool programCacheControl = false;
// EGL_ANGLE_robust_resource_initialization // EGL_ANGLE_robust_resource_initialization
bool robustResourceInitialization; bool robustResourceInitialization = false;
// EGL_ANGLE_iosurface_client_buffer // EGL_ANGLE_iosurface_client_buffer
bool iosurfaceClientBuffer; bool iosurfaceClientBuffer = false;
// EGL_ANGLE_create_context_extensions_enabled // EGL_ANGLE_create_context_extensions_enabled
bool createContextExtensionsEnabled; bool createContextExtensionsEnabled = false;
// EGL_ANDROID_presentation_time // EGL_ANDROID_presentation_time
bool presentationTime; bool presentationTime = false;
// EGL_ANDROID_blob_cache // EGL_ANDROID_blob_cache
bool blobCache; bool blobCache = false;
// EGL_ANDROID_image_native_buffer // EGL_ANDROID_image_native_buffer
bool imageNativeBuffer; bool imageNativeBuffer = false;
// EGL_ANDROID_get_frame_timestamps // EGL_ANDROID_get_frame_timestamps
bool getFrameTimestamps; bool getFrameTimestamps = false;
// EGL_ANDROID_recordable // EGL_ANDROID_recordable
bool recordable; bool recordable = false;
// EGL_ANGLE_power_preference // EGL_ANGLE_power_preference
bool powerPreference; bool powerPreference = false;
// EGL_ANGLE_image_d3d11_texture // EGL_ANGLE_image_d3d11_texture
bool imageD3D11Texture; bool imageD3D11Texture = false;
// EGL_ANDROID_get_native_client_buffer // EGL_ANDROID_get_native_client_buffer
bool getNativeClientBufferANDROID = false; bool getNativeClientBufferANDROID = false;
...@@ -909,7 +912,7 @@ struct DeviceExtensions ...@@ -909,7 +912,7 @@ struct DeviceExtensions
std::vector<std::string> getStrings() const; std::vector<std::string> getStrings() const;
// EGL_ANGLE_device_d3d // EGL_ANGLE_device_d3d
bool deviceD3D; bool deviceD3D = false;
}; };
struct ClientExtensions struct ClientExtensions
...@@ -921,55 +924,55 @@ struct ClientExtensions ...@@ -921,55 +924,55 @@ struct ClientExtensions
std::vector<std::string> getStrings() const; std::vector<std::string> getStrings() const;
// EGL_EXT_client_extensions // EGL_EXT_client_extensions
bool clientExtensions; bool clientExtensions = false;
// EGL_EXT_platform_base // EGL_EXT_platform_base
bool platformBase; bool platformBase = false;
// EGL_EXT_platform_device // EGL_EXT_platform_device
bool platformDevice; bool platformDevice = false;
// EGL_ANGLE_platform_angle // EGL_ANGLE_platform_angle
bool platformANGLE; bool platformANGLE = false;
// EGL_ANGLE_platform_angle_d3d // EGL_ANGLE_platform_angle_d3d
bool platformANGLED3D; bool platformANGLED3D = false;
// EGL_ANGLE_platform_angle_opengl // EGL_ANGLE_platform_angle_opengl
bool platformANGLEOpenGL; bool platformANGLEOpenGL = false;
// EGL_ANGLE_platform_angle_null // EGL_ANGLE_platform_angle_null
bool platformANGLENULL; bool platformANGLENULL = false;
// EGL_ANGLE_platform_angle_vulkan // EGL_ANGLE_platform_angle_vulkan
bool platformANGLEVulkan; bool platformANGLEVulkan = false;
// EGL_ANGLE_platform_angle_context_virtualization // EGL_ANGLE_platform_angle_context_virtualization
bool platformANGLEContextVirtualization; bool platformANGLEContextVirtualization = false;
// EGL_ANGLE_device_creation // EGL_ANGLE_device_creation
bool deviceCreation; bool deviceCreation = false;
// EGL_ANGLE_device_creation_d3d11 // EGL_ANGLE_device_creation_d3d11
bool deviceCreationD3D11; bool deviceCreationD3D11 = false;
// EGL_ANGLE_x11_visual // EGL_ANGLE_x11_visual
bool x11Visual; bool x11Visual = false;
// EGL_ANGLE_experimental_present_path // EGL_ANGLE_experimental_present_path
bool experimentalPresentPath; bool experimentalPresentPath = false;
// EGL_KHR_client_get_all_proc_addresses // EGL_KHR_client_get_all_proc_addresses
bool clientGetAllProcAddresses; bool clientGetAllProcAddresses = false;
// EGL_KHR_debug // EGL_KHR_debug
bool debug; bool debug = false;
// EGL_ANGLE_explicit_context // EGL_ANGLE_explicit_context
bool explicitContext; bool explicitContext = false;
// EGL_ANGLE_feature_control // EGL_ANGLE_feature_control
bool featureControlANGLE; bool featureControlANGLE = false;
}; };
} // namespace egl } // namespace egl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment