From 94de306d8b8d2c1a7eea3761099395d105c6c6ed Mon Sep 17 00:00:00 2001 From: Alexis Hetu Date: Tue, 14 Jan 2020 16:18:56 -0500 Subject: [PATCH] Extensions suffixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added NV/OES suffixes to relevant Extensions members. Bug: angleproject:3104 Change-Id: Ia1798157086230bde8d11c6fcb4fe93211e996ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013168 Reviewed-by: Alexis Hétu Reviewed-by: Jamie Madill Commit-Queue: Jamie Madill --- src/libANGLE/Caps.cpp | 154 ++++++------- src/libANGLE/Caps.h | 80 +++---- src/libANGLE/Compiler.cpp | 10 +- src/libANGLE/Context.cpp | 57 ++--- src/libANGLE/State.cpp | 2 +- src/libANGLE/Texture.cpp | 2 +- src/libANGLE/formatutils.cpp | 213 +++++++++--------- src/libANGLE/queryutils.cpp | 12 +- src/libANGLE/renderer/d3d/DisplayD3D.cpp | 2 +- src/libANGLE/renderer/d3d/TextureD3D.cpp | 2 +- .../renderer/d3d/d3d11/Renderer11.cpp | 2 +- .../renderer/d3d/d3d11/renderer11_utils.cpp | 50 ++-- .../renderer/d3d/d3d9/IndexBuffer9.cpp | 2 +- src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp | 4 +- .../renderer/d3d/d3d9/renderer9_utils.cpp | 51 +++-- src/libANGLE/renderer/gl/renderergl_utils.cpp | 79 +++---- src/libANGLE/renderer/metal/DisplayMtl.mm | 19 +- .../renderer/metal/mtl_format_utils.mm | 14 +- src/libANGLE/renderer/null/ContextNULL.cpp | 20 +- .../renderer/vulkan/vk_caps_utils.cpp | 28 +-- src/libANGLE/validationEGL.cpp | 8 +- src/libANGLE/validationES.cpp | 49 ++-- src/libANGLE/validationES1.cpp | 6 +- src/libANGLE/validationES2.cpp | 82 +++---- src/libANGLE/validationES3.cpp | 16 +- src/libANGLE/validationES31.cpp | 2 +- 26 files changed, 486 insertions(+), 480 deletions(-) diff --git a/src/libANGLE/Caps.cpp b/src/libANGLE/Caps.cpp index 843a82241..7c938b704 100644 --- a/src/libANGLE/Caps.cpp +++ b/src/libANGLE/Caps.cpp @@ -766,11 +766,11 @@ bool DetermineCompressedTextureETCSupport(const TextureCapsMap &textureCaps) void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps) { - // TODO(ynovikov): rgb8rgba8, colorBufferHalfFloat, textureHalfFloat, textureHalfFloatLinear, - // textureFloat, textureFloatLinear, textureRG, sRGB, colorBufferFloatRGB, colorBufferFloatRGBA - // and colorBufferFloat were verified. Verify the rest. - packedDepthStencil = DeterminePackedDepthStencilSupport(textureCaps); - rgb8rgba8 = DetermineRGB8AndRGBA8TextureSupport(textureCaps); + // TODO(ynovikov): rgb8rgba8OES, colorBufferHalfFloat, textureHalfFloat, textureHalfFloatLinear, + // textureFloatOES, textureFloatLinearOES, textureRG, sRGB, colorBufferFloatRGB, + // colorBufferFloatRGBA and colorBufferFloat were verified. Verify the rest. + packedDepthStencilOES = DeterminePackedDepthStencilSupport(textureCaps); + rgb8rgba8OES = DetermineRGB8AndRGBA8TextureSupport(textureCaps); readDepthNV = DetermineReadDepthSupport(textureCaps); readStencilNV = DetermineReadStencilSupport(textureCaps); depthBufferFloat2NV = DetermineDepthBufferFloat2Support(textureCaps); @@ -779,43 +779,43 @@ void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps) textureHalfFloat = DetermineHalfFloatTextureSupport(textureCaps); textureHalfFloatLinear = DetermineHalfFloatTextureFilteringSupport(textureCaps, textureHalfFloat); - textureFloat = DetermineFloatTextureSupport(textureCaps); - textureFloatLinear = DetermineFloatTextureFilteringSupport(textureCaps, textureFloat); - textureRG = DetermineRGTextureSupport(textureCaps, textureHalfFloat, textureFloat); + textureFloatOES = DetermineFloatTextureSupport(textureCaps); + textureFloatLinearOES = DetermineFloatTextureFilteringSupport(textureCaps, textureFloatOES); + textureRG = DetermineRGTextureSupport(textureCaps, textureHalfFloat, textureFloatOES); colorBufferHalfFloat = textureHalfFloat && DetermineColorBufferHalfFloatSupport(textureCaps); textureCompressionDXT1 = DetermineDXT1TextureSupport(textureCaps); textureCompressionDXT3 = DetermineDXT3TextureSupport(textureCaps); textureCompressionDXT5 = DetermineDXT5TextureSupport(textureCaps); - textureCompressionS3TCsRGB = DetermineS3TCsRGBTextureSupport(textureCaps); - textureCompressionASTCLDRKHR = DetermineASTCLDRTextureSupport(textureCaps); - textureCompressionASTCOES = DetermineASTCOESTExtureSupport(textureCaps); - compressedETC1RGB8Texture = DetermineETC1RGB8TextureSupport(textureCaps); - compressedETC2RGB8Texture = DetermineETC2RGB8TextureSupport(textureCaps); - compressedETC2sRGB8Texture = DetermineETC2sRGB8TextureSupport(textureCaps); - compressedETC2PunchthroughARGB8Texture = + textureCompressionS3TCsRGB = DetermineS3TCsRGBTextureSupport(textureCaps); + textureCompressionASTCLDRKHR = DetermineASTCLDRTextureSupport(textureCaps); + textureCompressionASTCOES = DetermineASTCOESTExtureSupport(textureCaps); + compressedETC1RGB8TextureOES = DetermineETC1RGB8TextureSupport(textureCaps); + compressedETC2RGB8TextureOES = DetermineETC2RGB8TextureSupport(textureCaps); + compressedETC2sRGB8TextureOES = DetermineETC2sRGB8TextureSupport(textureCaps); + compressedETC2PunchthroughARGB8TextureOES = DetermineETC2PunchthroughARGB8TextureSupport(textureCaps); - compressedETC2PunchthroughAsRGB8AlphaTexture = + compressedETC2PunchthroughAsRGB8AlphaTextureOES = DetermineETC2PunchthroughAsRGB8AlphaTextureSupport(textureCaps); - compressedETC2RGBA8Texture = DetermineETC2RGBA8TextureSupport(textureCaps); - compressedETC2sRGB8Alpha8Texture = DetermineETC2sRGB8Alpha8TextureSupport(textureCaps); - compressedEACR11UnsignedTexture = DetermineEACR11UnsignedTextureSupport(textureCaps); - compressedEACR11SignedTexture = DetermineEACR11SignedTextureSupport(textureCaps); - compressedEACRG11UnsignedTexture = DetermineEACRG11UnsignedTextureSupport(textureCaps); - compressedEACRG11SignedTexture = DetermineEACRG11SignedTextureSupport(textureCaps); - sRGB = DetermineSRGBTextureSupport(textureCaps); - depthTextureANGLE = DetermineDepthTextureANGLESupport(textureCaps); - depthTextureOES = DetermineDepthTextureOESSupport(textureCaps); - depthTextureCubeMapOES = DetermineDepthTextureCubeMapOESSupport(textureCaps); - depth24OES = DetermineDepth24OESSupport(textureCaps); - depth32 = DetermineDepth32Support(textureCaps); - colorBufferFloatRGB = DetermineColorBufferFloatRGBSupport(textureCaps); - colorBufferFloatRGBA = DetermineColorBufferFloatRGBASupport(textureCaps); - colorBufferFloat = DetermineColorBufferFloatSupport(textureCaps); - floatBlend = DetermineFloatBlendSupport(textureCaps); - textureNorm16 = DetermineTextureNorm16Support(textureCaps); - textureCompressionBPTC = DetermineBPTCTextureSupport(textureCaps); - compressedTexturePVRTC = DeterminePVRTCTextureSupport(textureCaps); - compressedTexturePVRTCsRGB = DeterminePVRTCsRGBTextureSupport(textureCaps); + compressedETC2RGBA8TextureOES = DetermineETC2RGBA8TextureSupport(textureCaps); + compressedETC2sRGB8Alpha8TextureOES = DetermineETC2sRGB8Alpha8TextureSupport(textureCaps); + compressedEACR11UnsignedTextureOES = DetermineEACR11UnsignedTextureSupport(textureCaps); + compressedEACR11SignedTextureOES = DetermineEACR11SignedTextureSupport(textureCaps); + compressedEACRG11UnsignedTextureOES = DetermineEACRG11UnsignedTextureSupport(textureCaps); + compressedEACRG11SignedTextureOES = DetermineEACRG11SignedTextureSupport(textureCaps); + sRGB = DetermineSRGBTextureSupport(textureCaps); + depthTextureANGLE = DetermineDepthTextureANGLESupport(textureCaps); + depthTextureOES = DetermineDepthTextureOESSupport(textureCaps); + depthTextureCubeMapOES = DetermineDepthTextureCubeMapOESSupport(textureCaps); + depth24OES = DetermineDepth24OESSupport(textureCaps); + depth32OES = DetermineDepth32Support(textureCaps); + colorBufferFloatRGB = DetermineColorBufferFloatRGBSupport(textureCaps); + colorBufferFloatRGBA = DetermineColorBufferFloatRGBASupport(textureCaps); + colorBufferFloat = DetermineColorBufferFloatSupport(textureCaps); + floatBlend = DetermineFloatBlendSupport(textureCaps); + textureNorm16 = DetermineTextureNorm16Support(textureCaps); + textureCompressionBPTC = DetermineBPTCTextureSupport(textureCaps); + compressedTexturePVRTC = DeterminePVRTCTextureSupport(textureCaps); + compressedTexturePVRTCsRGB = DeterminePVRTCsRGBTextureSupport(textureCaps); } const ExtensionInfoMap &GetExtensionInfoMap() @@ -842,25 +842,25 @@ const ExtensionInfoMap &GetExtensionInfoMap() // clang-format off ExtensionInfoMap map; - map["GL_OES_element_index_uint"] = enableableExtension(&Extensions::elementIndexUint); - map["GL_OES_packed_depth_stencil"] = esOnlyExtension(&Extensions::packedDepthStencil); - map["GL_OES_get_program_binary"] = enableableExtension(&Extensions::getProgramBinary); - map["GL_OES_rgb8_rgba8"] = enableableExtension(&Extensions::rgb8rgba8); + map["GL_OES_element_index_uint"] = enableableExtension(&Extensions::elementIndexUintOES); + map["GL_OES_packed_depth_stencil"] = esOnlyExtension(&Extensions::packedDepthStencilOES); + map["GL_OES_get_program_binary"] = enableableExtension(&Extensions::getProgramBinaryOES); + map["GL_OES_rgb8_rgba8"] = enableableExtension(&Extensions::rgb8rgba8OES); map["GL_NV_read_depth"] = esOnlyExtension(&Extensions::readDepthNV); map["GL_NV_read_stencil"] = esOnlyExtension(&Extensions::readStencilNV); map["GL_NV_depth_buffer_float2"] = esOnlyExtension(&Extensions::depthBufferFloat2NV); map["GL_EXT_texture_format_BGRA8888"] = enableableExtension(&Extensions::textureFormatBGRA8888); map["GL_EXT_texture_type_2_10_10_10_REV"] = enableableExtension(&Extensions::textureFormat2101010REV); map["GL_EXT_read_format_bgra"] = enableableExtension(&Extensions::readFormatBGRA); - map["GL_NV_pixel_buffer_object"] = enableableExtension(&Extensions::pixelBufferObject); - map["GL_ARB_sync"] = enableableExtension(&Extensions::glSync); - map["GL_OES_mapbuffer"] = enableableExtension(&Extensions::mapBuffer); + map["GL_NV_pixel_buffer_object"] = enableableExtension(&Extensions::pixelBufferObjectNV); + map["GL_ARB_sync"] = enableableExtension(&Extensions::glSyncARB); + map["GL_OES_mapbuffer"] = enableableExtension(&Extensions::mapBufferOES); map["GL_EXT_map_buffer_range"] = enableableExtension(&Extensions::mapBufferRange); map["GL_EXT_color_buffer_half_float"] = enableableExtension(&Extensions::colorBufferHalfFloat); map["GL_OES_texture_half_float"] = enableableExtension(&Extensions::textureHalfFloat); map["GL_OES_texture_half_float_linear"] = enableableExtension(&Extensions::textureHalfFloatLinear); - map["GL_OES_texture_float"] = enableableExtension(&Extensions::textureFloat); - map["GL_OES_texture_float_linear"] = enableableExtension(&Extensions::textureFloatLinear); + map["GL_OES_texture_float"] = enableableExtension(&Extensions::textureFloatOES); + map["GL_OES_texture_float_linear"] = enableableExtension(&Extensions::textureFloatLinearOES); map["GL_EXT_texture_rg"] = enableableExtension(&Extensions::textureRG); map["GL_EXT_texture_compression_dxt1"] = enableableExtension(&Extensions::textureCompressionDXT1); map["GL_ANGLE_texture_compression_dxt3"] = enableableExtension(&Extensions::textureCompressionDXT3); @@ -870,17 +870,17 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_KHR_texture_compression_astc_hdr"] = enableableExtension(&Extensions::textureCompressionASTCHDRKHR); map["GL_OES_texture_compression_astc"] = enableableExtension(&Extensions::textureCompressionASTCOES); map["GL_EXT_texture_compression_bptc"] = enableableExtension(&Extensions::textureCompressionBPTC); - map["GL_OES_compressed_ETC1_RGB8_texture"] = enableableExtension(&Extensions::compressedETC1RGB8Texture); - map["GL_OES_compressed_ETC2_RGB8_texture"] = enableableExtension(&Extensions::compressedETC2RGB8Texture); - map["GL_OES_compressed_ETC2_sRGB8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8Texture); - map["GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture"] = enableableExtension(&Extensions::compressedETC2PunchthroughARGB8Texture); - map["GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture"] = enableableExtension(&Extensions::compressedETC2PunchthroughAsRGB8AlphaTexture); - map["GL_OES_compressed_ETC2_RGBA8_texture"] = enableableExtension(&Extensions::compressedETC2RGBA8Texture); - map["GL_OES_compressed_ETC2_sRGB8_alpha8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8Alpha8Texture); - map["GL_OES_compressed_EAC_R11_unsigned_texture"] = enableableExtension(&Extensions::compressedEACR11UnsignedTexture); - map["GL_OES_compressed_EAC_R11_signed_texture"] = enableableExtension(&Extensions::compressedEACR11SignedTexture); - map["GL_OES_compressed_EAC_RG11_unsigned_texture"] = enableableExtension(&Extensions::compressedEACRG11UnsignedTexture); - map["GL_OES_compressed_EAC_RG11_signed_texture"] = enableableExtension(&Extensions::compressedEACRG11SignedTexture); + map["GL_OES_compressed_ETC1_RGB8_texture"] = enableableExtension(&Extensions::compressedETC1RGB8TextureOES); + map["GL_OES_compressed_ETC2_RGB8_texture"] = enableableExtension(&Extensions::compressedETC2RGB8TextureOES); + map["GL_OES_compressed_ETC2_sRGB8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8TextureOES); + map["GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture"] = enableableExtension(&Extensions::compressedETC2PunchthroughARGB8TextureOES); + map["GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture"] = enableableExtension(&Extensions::compressedETC2PunchthroughAsRGB8AlphaTextureOES); + map["GL_OES_compressed_ETC2_RGBA8_texture"] = enableableExtension(&Extensions::compressedETC2RGBA8TextureOES); + map["GL_OES_compressed_ETC2_sRGB8_alpha8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8Alpha8TextureOES); + map["GL_OES_compressed_EAC_R11_unsigned_texture"] = enableableExtension(&Extensions::compressedEACR11UnsignedTextureOES); + map["GL_OES_compressed_EAC_R11_signed_texture"] = enableableExtension(&Extensions::compressedEACR11SignedTextureOES); + map["GL_OES_compressed_EAC_RG11_unsigned_texture"] = enableableExtension(&Extensions::compressedEACRG11UnsignedTextureOES); + map["GL_OES_compressed_EAC_RG11_signed_texture"] = enableableExtension(&Extensions::compressedEACRG11SignedTextureOES); map["GL_ANGLE_compressed_texture_etc"] = enableableExtension(&Extensions::compressedTextureETC); map["GL_IMG_texture_compression_pvrtc"] = enableableExtension(&Extensions::compressedTexturePVRTC); map["GL_EXT_pvrtc_sRGB"] = enableableExtension(&Extensions::compressedTexturePVRTCsRGB); @@ -889,14 +889,14 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_OES_depth_texture"] = esOnlyExtension(&Extensions::depthTextureOES); map["GL_OES_depth_texture_cube_map"] = esOnlyExtension(&Extensions::depthTextureCubeMapOES); map["GL_OES_depth24"] = esOnlyExtension(&Extensions::depth24OES); - map["GL_OES_depth32"] = esOnlyExtension(&Extensions::depth32); + map["GL_OES_depth32"] = esOnlyExtension(&Extensions::depth32OES); map["GL_OES_texture_3D"] = enableableExtension(&Extensions::texture3DOES); map["GL_EXT_texture_storage"] = enableableExtension(&Extensions::textureStorage); - map["GL_OES_texture_npot"] = enableableExtension(&Extensions::textureNPOT); + map["GL_OES_texture_npot"] = enableableExtension(&Extensions::textureNPOTOES); map["GL_EXT_draw_buffers"] = enableableExtension(&Extensions::drawBuffers); map["GL_EXT_texture_filter_anisotropic"] = enableableExtension(&Extensions::textureFilterAnisotropic); map["GL_EXT_occlusion_query_boolean"] = enableableExtension(&Extensions::occlusionQueryBoolean); - map["GL_NV_fence"] = esOnlyExtension(&Extensions::fence); + map["GL_NV_fence"] = esOnlyExtension(&Extensions::fenceNV); map["GL_EXT_disjoint_timer_query"] = enableableExtension(&Extensions::disjointTimerQuery); map["GL_EXT_robustness"] = esOnlyExtension(&Extensions::robustness); map["GL_KHR_robust_buffer_access_behavior"] = esOnlyExtension(&Extensions::robustBufferAccessBehavior); @@ -907,33 +907,33 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_ANGLE_instanced_arrays"] = enableableExtension(&Extensions::instancedArraysANGLE); map["GL_EXT_instanced_arrays"] = enableableExtension(&Extensions::instancedArraysEXT); map["GL_ANGLE_pack_reverse_row_order"] = enableableExtension(&Extensions::packReverseRowOrder); - map["GL_OES_standard_derivatives"] = enableableExtension(&Extensions::standardDerivatives); + map["GL_OES_standard_derivatives"] = enableableExtension(&Extensions::standardDerivativesOES); map["GL_EXT_shader_texture_lod"] = enableableExtension(&Extensions::shaderTextureLOD); map["GL_EXT_frag_depth"] = enableableExtension(&Extensions::fragDepth); map["GL_OVR_multiview"] = enableableExtension(&Extensions::multiview); map["GL_OVR_multiview2"] = enableableExtension(&Extensions::multiview2); map["GL_ANGLE_texture_usage"] = enableableExtension(&Extensions::textureUsage); map["GL_ANGLE_translated_shader_source"] = esOnlyExtension(&Extensions::translatedShaderSource); - map["GL_OES_fbo_render_mipmap"] = enableableExtension(&Extensions::fboRenderMipmap); + map["GL_OES_fbo_render_mipmap"] = enableableExtension(&Extensions::fboRenderMipmapOES); map["GL_EXT_discard_framebuffer"] = esOnlyExtension(&Extensions::discardFramebuffer); map["GL_EXT_debug_marker"] = esOnlyExtension(&Extensions::debugMarker); - map["GL_OES_EGL_image"] = enableableExtension(&Extensions::eglImage); - map["GL_OES_EGL_image_external"] = enableableExtension(&Extensions::eglImageExternal); - map["GL_OES_EGL_image_external_essl3"] = enableableExtension(&Extensions::eglImageExternalEssl3); - map["GL_OES_EGL_sync"] = esOnlyExtension(&Extensions::eglSync); + map["GL_OES_EGL_image"] = enableableExtension(&Extensions::eglImageOES); + map["GL_OES_EGL_image_external"] = enableableExtension(&Extensions::eglImageExternalOES); + map["GL_OES_EGL_image_external_essl3"] = enableableExtension(&Extensions::eglImageExternalEssl3OES); + map["GL_OES_EGL_sync"] = esOnlyExtension(&Extensions::eglSyncOES); map["GL_EXT_memory_object"] = enableableExtension(&Extensions::memoryObject); map["GL_EXT_memory_object_fd"] = enableableExtension(&Extensions::memoryObjectFd); map["GL_EXT_semaphore"] = enableableExtension(&Extensions::semaphore); map["GL_EXT_semaphore_fd"] = enableableExtension(&Extensions::semaphoreFd); - map["GL_NV_EGL_stream_consumer_external"] = enableableExtension(&Extensions::eglStreamConsumerExternal); + map["GL_NV_EGL_stream_consumer_external"] = enableableExtension(&Extensions::eglStreamConsumerExternalNV); map["GL_EXT_unpack_subimage"] = enableableExtension(&Extensions::unpackSubimage); map["GL_NV_pack_subimage"] = enableableExtension(&Extensions::packSubimage); map["GL_EXT_color_buffer_float"] = enableableExtension(&Extensions::colorBufferFloat); - map["GL_OES_vertex_half_float"] = enableableExtension(&Extensions::vertexHalfFloat); - map["GL_OES_vertex_array_object"] = enableableExtension(&Extensions::vertexArrayObject); - map["GL_OES_vertex_type_10_10_10_2"] = enableableExtension(&Extensions::vertexAttribType1010102); + map["GL_OES_vertex_half_float"] = enableableExtension(&Extensions::vertexHalfFloatOES); + map["GL_OES_vertex_array_object"] = enableableExtension(&Extensions::vertexArrayObjectOES); + map["GL_OES_vertex_type_10_10_10_2"] = enableableExtension(&Extensions::vertexAttribType1010102OES); map["GL_KHR_debug"] = esOnlyExtension(&Extensions::debug); - map["GL_OES_texture_border_clamp"] = enableableExtension(&Extensions::textureBorderClamp); + map["GL_OES_texture_border_clamp"] = enableableExtension(&Extensions::textureBorderClampOES); // TODO(jmadill): Enable this when complete. //map["GL_KHR_no_error"] = esOnlyExtension(&Extensions::noError); map["GL_ANGLE_lossy_etc_decode"] = enableableExtension(&Extensions::lossyETCDecode); @@ -954,7 +954,7 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_CHROMIUM_framebuffer_mixed_samples"] = esOnlyExtension(&Extensions::framebufferMixedSamples); map["GL_EXT_texture_norm16"] = enableableExtension(&Extensions::textureNorm16); map["GL_CHROMIUM_path_rendering"] = esOnlyExtension(&Extensions::pathRendering); - map["GL_OES_surfaceless_context"] = esOnlyExtension(&Extensions::surfacelessContext); + map["GL_OES_surfaceless_context"] = esOnlyExtension(&Extensions::surfacelessContextOES); map["GL_ANGLE_client_arrays"] = esOnlyExtension(&Extensions::clientArrays); map["GL_ANGLE_robust_resource_initialization"] = esOnlyExtension(&Extensions::robustResourceInitialization); map["GL_ANGLE_program_cache_control"] = esOnlyExtension(&Extensions::programCacheControl); @@ -963,7 +963,7 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_ANGLE_explicit_context_gles1"] = enableableExtension(&Extensions::explicitContextGles1); map["GL_ANGLE_explicit_context"] = enableableExtension(&Extensions::explicitContext); map["GL_KHR_parallel_shader_compile"] = enableableExtension(&Extensions::parallelShaderCompile); - map["GL_OES_texture_storage_multisample_2d_array"] = enableableExtension(&Extensions::textureStorageMultisample2DArray); + map["GL_OES_texture_storage_multisample_2d_array"] = enableableExtension(&Extensions::textureStorageMultisample2DArrayOES); map["GL_ANGLE_multiview_multisample"] = enableableExtension(&Extensions::multiviewMultisample); map["GL_EXT_blend_func_extended"] = enableableExtension(&Extensions::blendFuncExtended); map["GL_EXT_float_blend"] = enableableExtension(&Extensions::floatBlend); @@ -977,11 +977,11 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_OES_draw_elements_base_vertex"] = enableableExtension(&Extensions::drawElementsBaseVertexOES); map["GL_EXT_draw_elements_base_vertex"] = enableableExtension(&Extensions::drawElementsBaseVertexEXT); map["GL_EXT_gpu_shader5"] = enableableExtension(&Extensions::gpuShader5EXT); - // GLES1 extensinos - map["GL_OES_point_size_array"] = enableableExtension(&Extensions::pointSizeArray); - map["GL_OES_texture_cube_map"] = enableableExtension(&Extensions::textureCubeMap); - map["GL_OES_point_sprite"] = enableableExtension(&Extensions::pointSprite); - map["GL_OES_draw_texture"] = enableableExtension(&Extensions::drawTexture); + // GLES1 extensions + map["GL_OES_point_size_array"] = enableableExtension(&Extensions::pointSizeArrayOES); + map["GL_OES_texture_cube_map"] = enableableExtension(&Extensions::textureCubeMapOES); + map["GL_OES_point_sprite"] = enableableExtension(&Extensions::pointSpriteOES); + map["GL_OES_draw_texture"] = enableableExtension(&Extensions::drawTextureOES); map["GL_ANGLE_memory_size"] = enableableExtension(&Extensions::memorySize); map["GL_WEBGL_video_texture"] = enableableExtension(&Extensions::webglVideoTexture); // clang-format on diff --git a/src/libANGLE/Caps.h b/src/libANGLE/Caps.h index 280b12310..2da1a5bb3 100644 --- a/src/libANGLE/Caps.h +++ b/src/libANGLE/Caps.h @@ -126,10 +126,10 @@ struct Extensions // ES2 Extension support // GL_OES_element_index_uint - bool elementIndexUint = false; + bool elementIndexUintOES = false; // GL_OES_packed_depth_stencil - bool packedDepthStencil = false; + bool packedDepthStencilOES = false; // GL_NV_read_depth bool readDepthNV = false; @@ -141,11 +141,11 @@ struct Extensions bool depthBufferFloat2NV = false; // GL_OES_get_program_binary - bool getProgramBinary = false; + bool getProgramBinaryOES = false; // GL_OES_rgb8_rgba8 // Implies that TextureCaps for GL_RGB8 and GL_RGBA8 exist - bool rgb8rgba8 = false; + bool rgb8rgba8OES = false; // GL_EXT_texture_format_BGRA8888 // Implies that TextureCaps for GL_BGRA8 exist @@ -155,13 +155,13 @@ struct Extensions bool readFormatBGRA = false; // GL_NV_pixel_buffer_object - bool pixelBufferObject = false; + bool pixelBufferObjectNV = false; // GL_ARB_sync - bool glSync = false; + bool glSyncARB = false; // GL_OES_mapbuffer and GL_EXT_map_buffer_range - bool mapBuffer = false; + bool mapBufferOES = false; bool mapBufferRange = false; // GL_EXT_color_buffer_half_float @@ -181,8 +181,8 @@ struct Extensions // 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 // GL_LUMINANCE_ALPHA16F_EXT exist - bool textureFloat = false; - bool textureFloatLinear = false; + bool textureFloatOES = false; + bool textureFloatLinearOES = false; // GL_EXT_texture_rg // Implies that TextureCaps for GL_R8, GL_RG8 (and floating point R/RG texture formats if @@ -217,37 +217,37 @@ struct Extensions // GL_OES_compressed_ETC1_RGB8_texture // Implies that TextureCaps for GL_ETC1_RGB8_OES exist - bool compressedETC1RGB8Texture = false; + bool compressedETC1RGB8TextureOES = false; // OES_compressed_ETC2_RGB8_texture - bool compressedETC2RGB8Texture = false; + bool compressedETC2RGB8TextureOES = false; // OES_compressed_ETC2_sRGB8_texture - bool compressedETC2sRGB8Texture = false; + bool compressedETC2sRGB8TextureOES = false; // OES_compressed_ETC2_punchthroughA_RGBA8_texture - bool compressedETC2PunchthroughARGB8Texture = false; + bool compressedETC2PunchthroughARGB8TextureOES = false; // OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture - bool compressedETC2PunchthroughAsRGB8AlphaTexture = false; + bool compressedETC2PunchthroughAsRGB8AlphaTextureOES = false; // OES_compressed_ETC2_RGBA8_texture - bool compressedETC2RGBA8Texture = false; + bool compressedETC2RGBA8TextureOES = false; // OES_compressed_ETC2_sRGB8_alpha8_texture - bool compressedETC2sRGB8Alpha8Texture = false; + bool compressedETC2sRGB8Alpha8TextureOES = false; // OES_compressed_EAC_R11_unsigned_texture - bool compressedEACR11UnsignedTexture = false; + bool compressedEACR11UnsignedTextureOES = false; // OES_compressed_EAC_R11_signed_texture - bool compressedEACR11SignedTexture = false; + bool compressedEACR11SignedTextureOES = false; // OES_compressed_EAC_RG11_unsigned_texture - bool compressedEACRG11UnsignedTexture = false; + bool compressedEACRG11UnsignedTextureOES = false; // OES_compressed_EAC_RG11_signed_texture - bool compressedEACRG11SignedTexture = false; + bool compressedEACRG11SignedTextureOES = false; // ANGLE_compressed_texture_etc // ONLY exposed if ETC texture formats are natively supported without decompression @@ -282,7 +282,7 @@ struct Extensions // GL_OES_depth32 // Allows DEPTH_COMPONENT32_OES as a valid Renderbuffer format. - bool depth32 = false; + bool depth32OES = false; // GL_OES_texture_3D bool texture3DOES = false; @@ -291,7 +291,7 @@ struct Extensions bool textureStorage = false; // GL_OES_texture_npot - bool textureNPOT = false; + bool textureNPOTOES = false; // GL_EXT_draw_buffers bool drawBuffers = false; @@ -304,7 +304,7 @@ struct Extensions bool occlusionQueryBoolean = false; // GL_NV_fence - bool fence = false; + bool fenceNV = false; // GL_EXT_disjoint_timer_query bool disjointTimerQuery = false; @@ -340,7 +340,7 @@ struct Extensions bool packReverseRowOrder = false; // GL_OES_standard_derivatives - bool standardDerivatives = false; + bool standardDerivativesOES = false; // GL_EXT_shader_texture_lod bool shaderTextureLOD = false; @@ -362,7 +362,7 @@ struct Extensions bool translatedShaderSource = false; // GL_OES_fbo_render_mipmap - bool fboRenderMipmap = false; + bool fboRenderMipmapOES = false; // GL_EXT_discard_framebuffer bool discardFramebuffer = false; @@ -371,16 +371,16 @@ struct Extensions bool debugMarker = false; // GL_OES_EGL_image - bool eglImage = false; + bool eglImageOES = false; // GL_OES_EGL_image_external - bool eglImageExternal = false; + bool eglImageExternalOES = false; // GL_OES_EGL_image_external_essl3 - bool eglImageExternalEssl3 = false; + bool eglImageExternalEssl3OES = false; // GL_OES_EGL_sync - bool eglSync = false; + bool eglSyncOES = false; // GL_EXT_memory_object bool memoryObject = false; @@ -395,7 +395,7 @@ struct Extensions bool semaphoreFd = false; // NV_EGL_stream_consumer_external - bool eglStreamConsumerExternal = false; + bool eglStreamConsumerExternalNV = false; // EXT_unpack_subimage bool unpackSubimage = false; @@ -404,13 +404,13 @@ struct Extensions bool packSubimage = false; // GL_OES_vertex_half_float - bool vertexHalfFloat = false; + bool vertexHalfFloatOES = false; // GL_OES_vertex_array_object - bool vertexArrayObject = false; + bool vertexArrayObjectOES = false; // GL_OES_vertex_type_10_10_10_2 - bool vertexAttribType1010102 = false; + bool vertexAttribType1010102OES = false; // GL_KHR_debug bool debug = false; @@ -453,7 +453,7 @@ struct Extensions bool robustClientMemory = false; // GL_OES_texture_border_clamp - bool textureBorderClamp = false; + bool textureBorderClampOES = false; // GL_EXT_texture_sRGB_decode bool textureSRGBDecode = false; @@ -487,7 +487,7 @@ struct Extensions bool pathRendering = false; // GL_OES_surfaceless_context - bool surfacelessContext = false; + bool surfacelessContextOES = false; // GL_ANGLE_client_arrays bool clientArrays = false; @@ -506,16 +506,16 @@ struct Extensions // GLES1 emulation: GLES1 extensions // GL_OES_point_size_array - bool pointSizeArray = false; + bool pointSizeArrayOES = false; // GL_OES_texture_cube_map - bool textureCubeMap = false; + bool textureCubeMapOES = false; // GL_OES_point_sprite - bool pointSprite = false; + bool pointSpriteOES = false; // GL_OES_draw_texture - bool drawTexture = false; + bool drawTextureOES = false; // EGL_ANGLE_explicit_context GL subextensions // GL_ANGLE_explicit_context_gles1 @@ -527,7 +527,7 @@ struct Extensions bool parallelShaderCompile = false; // GL_OES_texture_storage_multisample_2d_array - bool textureStorageMultisample2DArray = false; + bool textureStorageMultisample2DArrayOES = false; // GL_ANGLE_multiview_multisample bool multiviewMultisample = false; diff --git a/src/libANGLE/Compiler.cpp b/src/libANGLE/Compiler.cpp index 9d6228b9c..4163223e8 100644 --- a/src/libANGLE/Compiler.cpp +++ b/src/libANGLE/Compiler.cpp @@ -87,16 +87,16 @@ Compiler::Compiler(rx::GLImplFactory *implFactory, const State &state) mResources.MaxTextureImageUnits = caps.maxShaderTextureImageUnits[ShaderType::Fragment]; mResources.MaxFragmentUniformVectors = caps.maxFragmentUniformVectors; mResources.MaxDrawBuffers = caps.maxDrawBuffers; - mResources.OES_standard_derivatives = extensions.standardDerivatives; + mResources.OES_standard_derivatives = extensions.standardDerivativesOES; mResources.EXT_draw_buffers = extensions.drawBuffers; mResources.EXT_shader_texture_lod = extensions.shaderTextureLOD; - mResources.OES_EGL_image_external = extensions.eglImageExternal; - mResources.OES_EGL_image_external_essl3 = extensions.eglImageExternalEssl3; - mResources.NV_EGL_stream_consumer_external = extensions.eglStreamConsumerExternal; + mResources.OES_EGL_image_external = extensions.eglImageExternalOES; + mResources.OES_EGL_image_external_essl3 = extensions.eglImageExternalEssl3OES; + mResources.NV_EGL_stream_consumer_external = extensions.eglStreamConsumerExternalNV; mResources.ARB_texture_rectangle = extensions.textureRectangle; mResources.EXT_gpu_shader5 = extensions.gpuShader5EXT; mResources.OES_texture_storage_multisample_2d_array = - extensions.textureStorageMultisample2DArray; + extensions.textureStorageMultisample2DArrayOES; mResources.OES_texture_3D = extensions.texture3DOES; mResources.ANGLE_texture_multisample = extensions.textureMultisample; mResources.ANGLE_multi_draw = extensions.multiDraw; diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp index 303112385..e9223366d 100644 --- a/src/libANGLE/Context.cpp +++ b/src/libANGLE/Context.cpp @@ -434,7 +434,8 @@ void Context::initialize() mZeroTextures[TextureType::Rectangle].set(this, zeroTextureRectangle); } - if (mSupportedExtensions.eglImageExternal || mSupportedExtensions.eglStreamConsumerExternal) + if (mSupportedExtensions.eglImageExternalOES || + mSupportedExtensions.eglStreamConsumerExternalNV) { Texture *zeroTextureExternal = new Texture(mImplementation.get(), {0}, TextureType::External); @@ -3360,10 +3361,10 @@ Extensions Context::generateSupportedExtensions() const if (getClientVersion() < ES_2_0) { // Default extensions for GLES1 - supportedExtensions.pointSizeArray = true; - supportedExtensions.textureCubeMap = true; - supportedExtensions.pointSprite = true; - supportedExtensions.drawTexture = true; + supportedExtensions.pointSizeArrayOES = true; + supportedExtensions.textureCubeMapOES = true; + supportedExtensions.pointSpriteOES = true; + supportedExtensions.drawTextureOES = true; supportedExtensions.parallelShaderCompile = false; supportedExtensions.texture3DOES = false; } @@ -3371,14 +3372,14 @@ Extensions Context::generateSupportedExtensions() const if (getClientVersion() < ES_3_0) { // Disable ES3+ extensions - supportedExtensions.colorBufferFloat = false; - supportedExtensions.eglImageExternalEssl3 = false; - supportedExtensions.textureNorm16 = false; - supportedExtensions.multiview = false; - supportedExtensions.multiview2 = false; - supportedExtensions.maxViews = 1u; - supportedExtensions.copyTexture3d = false; - supportedExtensions.textureMultisample = false; + supportedExtensions.colorBufferFloat = false; + supportedExtensions.eglImageExternalEssl3OES = false; + supportedExtensions.textureNorm16 = false; + supportedExtensions.multiview = false; + supportedExtensions.multiview2 = false; + supportedExtensions.maxViews = 1u; + supportedExtensions.copyTexture3d = false; + supportedExtensions.textureMultisample = false; // Requires glCompressedTexImage3D supportedExtensions.textureCompressionASTCOES = false; @@ -3392,16 +3393,16 @@ Extensions Context::generateSupportedExtensions() const // Don't expose GL_OES_texture_float_linear without full legacy float texture support // The renderer may report OES_texture_float_linear without OES_texture_float // This is valid in a GLES 3.0 context, but not in a GLES 2.0 context - if (!(supportedExtensions.textureFloat && supportedExtensions.textureHalfFloat)) + if (!(supportedExtensions.textureFloatOES && supportedExtensions.textureHalfFloat)) { - supportedExtensions.textureFloatLinear = false; + supportedExtensions.textureFloatLinearOES = false; supportedExtensions.textureHalfFloatLinear = false; } // Because of the difference in the SNORM to FLOAT conversion formula // between GLES 2.0 and 3.0, vertex type 10_10_10_2 is disabled // when the context version is lower than 3.0 - supportedExtensions.vertexAttribType1010102 = false; + supportedExtensions.vertexAttribType1010102OES = false; } if (getClientVersion() < ES_3_1) @@ -3411,7 +3412,7 @@ Extensions Context::generateSupportedExtensions() const // TODO(http://anglebug.com/2775): Multisample arrays could be supported on ES 3.0 as well // once 2D multisample texture extension is exposed there. - supportedExtensions.textureStorageMultisample2DArray = false; + supportedExtensions.textureStorageMultisample2DArrayOES = false; } if (getClientVersion() > ES_2_0) @@ -3441,7 +3442,7 @@ Extensions Context::generateSupportedExtensions() const // Some extensions are always available because they are implemented in the GL layer. supportedExtensions.bindUniformLocation = true; - supportedExtensions.vertexArrayObject = true; + supportedExtensions.vertexArrayObjectOES = true; supportedExtensions.bindGeneratesResource = true; supportedExtensions.clientArrays = true; supportedExtensions.requestExtension = true; @@ -3451,7 +3452,7 @@ Extensions Context::generateSupportedExtensions() const supportedExtensions.noError = mSkipValidation; // Enable surfaceless to advertise we'll have the correct behavior when there is no default FBO - supportedExtensions.surfacelessContext = mSurfacelessSupported; + supportedExtensions.surfacelessContextOES = mSurfacelessSupported; // Explicitly enable GL_KHR_debug supportedExtensions.debug = true; @@ -3487,7 +3488,7 @@ Extensions Context::generateSupportedExtensions() const ASSERT(mDisplay); if (!mDisplay->getExtensions().fenceSync) { - supportedExtensions.eglSync = false; + supportedExtensions.eglSyncOES = false; } supportedExtensions.memorySize = true; @@ -3750,7 +3751,7 @@ void Context::updateCaps() } // If program binary is disabled, blank out the memory cache pointer. - if (!mSupportedExtensions.getProgramBinary) + if (!mSupportedExtensions.getProgramBinaryOES) { mMemoryProgramCache = nullptr; } @@ -3760,7 +3761,7 @@ void Context::updateCaps() mValidBufferBindings.set(BufferBinding::ElementArray); mValidBufferBindings.set(BufferBinding::Array); - if (mState.mExtensions.pixelBufferObject || getClientVersion() >= ES_3_0) + if (mState.mExtensions.pixelBufferObjectNV || getClientVersion() >= ES_3_0) { mValidBufferBindings.set(BufferBinding::PixelPack); mValidBufferBindings.set(BufferBinding::PixelUnpack); @@ -8862,9 +8863,9 @@ void StateCache::updateValidBindTextureTypes(Context *context) {TextureType::_2D, true}, {TextureType::_2DArray, isGLES3}, {TextureType::_2DMultisample, isGLES31 || exts.textureMultisample}, - {TextureType::_2DMultisampleArray, exts.textureStorageMultisample2DArray}, + {TextureType::_2DMultisampleArray, exts.textureStorageMultisample2DArrayOES}, {TextureType::_3D, isGLES3 || exts.texture3DOES}, - {TextureType::External, exts.eglImageExternal || exts.eglStreamConsumerExternal}, + {TextureType::External, exts.eglImageExternalOES || exts.eglStreamConsumerExternalNV}, {TextureType::Rectangle, exts.textureRectangle}, {TextureType::CubeMap, true}, {TextureType::VideoImage, exts.webglVideoTexture}, @@ -8874,7 +8875,7 @@ void StateCache::updateValidBindTextureTypes(Context *context) void StateCache::updateValidDrawElementsTypes(Context *context) { bool supportsUint = - (context->getClientMajorVersion() >= 3 || context->getExtensions().elementIndexUint); + (context->getClientMajorVersion() >= 3 || context->getExtensions().elementIndexUintOES); mCachedValidDrawElementsTypes = {{ {DrawElementsType::UnsignedByte, true}, @@ -8891,13 +8892,13 @@ void StateCache::updateTransformFeedbackActiveUnpaused(Context *context) void StateCache::updateVertexAttribTypesValidation(Context *context) { - VertexAttribTypeCase halfFloatValidity = (context->getExtensions().vertexHalfFloat) + VertexAttribTypeCase halfFloatValidity = (context->getExtensions().vertexHalfFloatOES) ? VertexAttribTypeCase::Valid : VertexAttribTypeCase::Invalid; VertexAttribTypeCase vertexType1010102Validity = - (context->getExtensions().vertexAttribType1010102) ? VertexAttribTypeCase::ValidSize3or4 - : VertexAttribTypeCase::Invalid; + (context->getExtensions().vertexAttribType1010102OES) ? VertexAttribTypeCase::ValidSize3or4 + : VertexAttribTypeCase::Invalid; if (context->getClientMajorVersion() <= 2) { diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp index 4b5e9dd30..722cdc866 100644 --- a/src/libANGLE/State.cpp +++ b/src/libANGLE/State.cpp @@ -415,7 +415,7 @@ void State::initialize(Context *context) { mSamplerTextures[TextureType::Rectangle].resize(caps.maxCombinedTextureImageUnits); } - if (nativeExtensions.eglImageExternal || nativeExtensions.eglStreamConsumerExternal) + if (nativeExtensions.eglImageExternalOES || nativeExtensions.eglStreamConsumerExternalNV) { mSamplerTextures[TextureType::External].resize(caps.maxCombinedTextureImageUnits); } diff --git a/src/libANGLE/Texture.cpp b/src/libANGLE/Texture.cpp index 58891ba33..69dc2adf1 100644 --- a/src/libANGLE/Texture.cpp +++ b/src/libANGLE/Texture.cpp @@ -302,7 +302,7 @@ bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState, { return false; } - bool npotSupport = data.getExtensions().textureNPOT || data.getClientMajorVersion() >= 3; + bool npotSupport = data.getExtensions().textureNPOTOES || data.getClientMajorVersion() >= 3; if (!npotSupport) { if ((samplerState.getWrapS() != GL_CLAMP_TO_EDGE && diff --git a/src/libANGLE/formatutils.cpp b/src/libANGLE/formatutils.cpp index 5dbf8a204..862e4a7ec 100644 --- a/src/libANGLE/formatutils.cpp +++ b/src/libANGLE/formatutils.cpp @@ -295,21 +295,22 @@ static bool SizedHalfFloatRGBARenderbufferSupport(const Version &clientVersion, static bool SizedFloatRGSupport(const Version &clientVersion, const Extensions &extensions) { return clientVersion >= Version(3, 0) || - (extensions.textureStorage && extensions.textureFloat && extensions.textureRG); + (extensions.textureStorage && extensions.textureFloatOES && extensions.textureRG); } // RGB32F static bool SizedFloatRGBSupport(const Version &clientVersion, const Extensions &extensions) { return clientVersion >= Version(3, 0) || - (extensions.textureStorage && extensions.textureFloat) || extensions.colorBufferFloatRGB; + (extensions.textureStorage && extensions.textureFloatOES) || + extensions.colorBufferFloatRGB; } // RGBA32F static bool SizedFloatRGBASupport(const Version &clientVersion, const Extensions &extensions) { return clientVersion >= Version(3, 0) || - (extensions.textureStorage && extensions.textureFloat) || + (extensions.textureStorage && extensions.textureFloatOES) || extensions.colorBufferFloatRGBA; } @@ -773,48 +774,48 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() // clang-format off - // | Internal format |sized| R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend - AddRGBAFormat(&map, GL_R8, true, 8, 0, 0, 0, 0, GL_RED, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, SizedRGSupport, AlwaysSupported, SizedRGSupport, RequireESOrExt<3, 0, &Extensions::textureRG>, RequireESOrExt<3, 0, &Extensions::textureRG>); - AddRGBAFormat(&map, GL_R8_SNORM, true, 8, 0, 0, 0, 0, GL_RED, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RG8, true, 8, 8, 0, 0, 0, GL_RG, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, SizedRGSupport, AlwaysSupported, SizedRGSupport, RequireESOrExt<3, 0, &Extensions::textureRG>, RequireESOrExt<3, 0, &Extensions::textureRG>); - AddRGBAFormat(&map, GL_RG8_SNORM, true, 8, 8, 0, 0, 0, GL_RG, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB8, true, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>); - AddRGBAFormat(&map, GL_RGB8_SNORM, true, 8, 8, 8, 0, 0, GL_RGB, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB565, true, 5, 6, 5, 0, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireES<2, 0>, RequireES<2, 0>); - AddRGBAFormat(&map, GL_RGBA4, true, 4, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireES<2, 0>, RequireES<2, 0>); - AddRGBAFormat(&map, GL_RGB5_A1, true, 5, 5, 5, 1, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireES<2, 0>, RequireES<2, 0>); - AddRGBAFormat(&map, GL_RGBA8, true, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>); - AddRGBAFormat(&map, GL_RGBA8_SNORM, true, 8, 8, 8, 8, 0, GL_RGBA, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB10_A2, true, 10, 10, 10, 2, 0, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, RequireES<3, 0>, RequireES<3, 0>, RequireES<3, 0>); - AddRGBAFormat(&map, GL_RGB10_A2UI, true, 10, 10, 10, 2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_SRGB8, true, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_SRGB8_ALPHA8, true, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireES<3, 0>, AlwaysSupported, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::sRGB>, RequireESOrExt<3, 0, &Extensions::sRGB>); - AddRGBAFormat(&map, GL_R11F_G11F_B10F, true, 11, 11, 10, 0, 0, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT, false, RequireES<3, 0>, AlwaysSupported, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>); - AddRGBAFormat(&map, GL_RGB9_E5, true, 9, 9, 9, 0, 5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_R8I, true, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R8UI, true, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R16I, true, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R16UI, true, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R32I, true, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R32UI, true, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG8I, true, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG8UI, true, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG16I, true, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG16UI, true, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG32I, true, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG32UI, true, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGB8I, true, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB8UI, true, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB16I, true, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB16UI, true, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB32I, true, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB32UI, true, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGBA8I, true, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA8UI, true, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA16I, true, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA16UI, true, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA32I, true, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA32UI, true, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + // | Internal format |sized| R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + AddRGBAFormat(&map, GL_R8, true, 8, 0, 0, 0, 0, GL_RED, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, SizedRGSupport, AlwaysSupported, SizedRGSupport, RequireESOrExt<3, 0, &Extensions::textureRG>, RequireESOrExt<3, 0, &Extensions::textureRG>); + AddRGBAFormat(&map, GL_R8_SNORM, true, 8, 0, 0, 0, 0, GL_RED, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RG8, true, 8, 8, 0, 0, 0, GL_RG, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, SizedRGSupport, AlwaysSupported, SizedRGSupport, RequireESOrExt<3, 0, &Extensions::textureRG>, RequireESOrExt<3, 0, &Extensions::textureRG>); + AddRGBAFormat(&map, GL_RG8_SNORM, true, 8, 8, 0, 0, 0, GL_RG, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB8, true, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8OES>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8OES>); + AddRGBAFormat(&map, GL_RGB8_SNORM, true, 8, 8, 8, 0, 0, GL_RGB, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB565, true, 5, 6, 5, 0, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireES<2, 0>, RequireES<2, 0>); + AddRGBAFormat(&map, GL_RGBA4, true, 4, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireES<2, 0>, RequireES<2, 0>); + AddRGBAFormat(&map, GL_RGB5_A1, true, 5, 5, 5, 1, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireES<2, 0>, RequireES<2, 0>); + AddRGBAFormat(&map, GL_RGBA8, true, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureStorage>, AlwaysSupported, RequireESOrExt<3, 0, &Extensions::textureStorage>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8OES>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8OES>); + AddRGBAFormat(&map, GL_RGBA8_SNORM, true, 8, 8, 8, 8, 0, GL_RGBA, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB10_A2, true, 10, 10, 10, 2, 0, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_NORMALIZED, false, RequireES<3, 0>, AlwaysSupported, RequireES<3, 0>, RequireES<3, 0>, RequireES<3, 0>); + AddRGBAFormat(&map, GL_RGB10_A2UI, true, 10, 10, 10, 2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_SRGB8, true, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_SRGB8_ALPHA8, true, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireES<3, 0>, AlwaysSupported, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::sRGB>, RequireESOrExt<3, 0, &Extensions::sRGB>); + AddRGBAFormat(&map, GL_R11F_G11F_B10F, true, 11, 11, 10, 0, 0, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT, false, RequireES<3, 0>, AlwaysSupported, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>); + AddRGBAFormat(&map, GL_RGB9_E5, true, 9, 9, 9, 0, 5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT, false, RequireES<3, 0>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_R8I, true, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_R8UI, true, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_R16I, true, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_R16UI, true, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_R32I, true, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_R32UI, true, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RG8I, true, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RG8UI, true, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RG16I, true, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RG16UI, true, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RG32I, true, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RG32UI, true, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RGB8I, true, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB8UI, true, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB16I, true, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB16UI, true, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB32I, true, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB32UI, true, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGBA8I, true, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA8UI, true, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA16I, true, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA16UI, true, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA32I, true, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA32UI, true, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); AddRGBAFormat(&map, GL_BGRA8_EXT, true, 8, 8, 8, 8, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::textureFormatBGRA8888>, AlwaysSupported, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>); AddRGBAFormat(&map, GL_BGRA4_ANGLEX, true, 4, 4, 4, 4, 0, GL_BGRA_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::textureFormatBGRA8888>, AlwaysSupported, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>); @@ -831,27 +832,27 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() AddRGBAFormat(&map, GL_BGR565_ANGLEX, true, 5, 6, 5, 1, 0, GL_BGRA_EXT, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_NORMALIZED, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); // Floating point formats - // | Internal format |sized| R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + // | Internal format |sized| R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend // It's not possible to have two entries per sized format. // E.g. for GL_RG16F, one with GL_HALF_FLOAT type and the other with GL_HALF_FLOAT_OES type. // So, GL_HALF_FLOAT type formats conditions are merged with GL_HALF_FLOAT_OES type conditions. - AddRGBAFormat(&map, GL_R16F, true, 16, 0, 0, 0, 0, GL_RED, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatRGSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGTextureAttachmentSupport, SizedHalfFloatRGRenderbufferSupport, SizedHalfFloatRGRenderbufferSupport); - AddRGBAFormat(&map, GL_RG16F, true, 16, 16, 0, 0, 0, GL_RG, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatRGSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGTextureAttachmentSupport, SizedHalfFloatRGRenderbufferSupport, SizedHalfFloatRGRenderbufferSupport); - AddRGBAFormat(&map, GL_RGB16F, true, 16, 16, 16, 0, 0, GL_RGB, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGBTextureAttachmentSupport, SizedHalfFloatRGBRenderbufferSupport, SizedHalfFloatRGBRenderbufferSupport); - AddRGBAFormat(&map, GL_RGBA16F, true, 16, 16, 16, 16, 0, GL_RGBA, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGBATextureAttachmentSupport, SizedHalfFloatRGBARenderbufferSupport, SizedHalfFloatRGBARenderbufferSupport); - AddRGBAFormat(&map, GL_R32F, true, 32, 0, 0, 0, 0, GL_RED, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>, Float32BlendableSupport); - AddRGBAFormat(&map, GL_RG32F, true, 32, 32, 0, 0, 0, GL_RG, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>, Float32BlendableSupport); - AddRGBAFormat(&map, GL_RGB32F, true, 32, 32, 32, 0, 0, GL_RGB, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloatRGB>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGBA32F, true, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBASupport, RequireExt<&Extensions::textureFloatLinear>, SizedFloatRGBARenderableSupport, SizedFloatRGBARenderableSupport, Float32BlendableSupport); + AddRGBAFormat(&map, GL_R16F, true, 16, 0, 0, 0, 0, GL_RED, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatRGSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGTextureAttachmentSupport, SizedHalfFloatRGRenderbufferSupport, SizedHalfFloatRGRenderbufferSupport); + AddRGBAFormat(&map, GL_RG16F, true, 16, 16, 0, 0, 0, GL_RG, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatRGSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGTextureAttachmentSupport, SizedHalfFloatRGRenderbufferSupport, SizedHalfFloatRGRenderbufferSupport); + AddRGBAFormat(&map, GL_RGB16F, true, 16, 16, 16, 0, 0, GL_RGB, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGBTextureAttachmentSupport, SizedHalfFloatRGBRenderbufferSupport, SizedHalfFloatRGBRenderbufferSupport); + AddRGBAFormat(&map, GL_RGBA16F, true, 16, 16, 16, 16, 0, GL_RGBA, GL_HALF_FLOAT, GL_FLOAT, false, SizedHalfFloatSupport, SizedHalfFloatFilterSupport, SizedHalfFloatRGBATextureAttachmentSupport, SizedHalfFloatRGBARenderbufferSupport, SizedHalfFloatRGBARenderbufferSupport); + AddRGBAFormat(&map, GL_R32F, true, 32, 0, 0, 0, 0, GL_RED, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinearOES>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>, Float32BlendableSupport); + AddRGBAFormat(&map, GL_RG32F, true, 32, 32, 0, 0, 0, GL_RG, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinearOES>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>, Float32BlendableSupport); + AddRGBAFormat(&map, GL_RGB32F, true, 32, 32, 32, 0, 0, GL_RGB, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBSupport, RequireExt<&Extensions::textureFloatLinearOES>, RequireExt<&Extensions::colorBufferFloatRGB>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGBA32F, true, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBASupport, RequireExt<&Extensions::textureFloatLinearOES>, SizedFloatRGBARenderableSupport, SizedFloatRGBARenderableSupport, Float32BlendableSupport); // ANGLE Depth stencil formats - // | Internal format |sized| D |S | X | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT16, true, 16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireES<1, 0>, RequireES<1, 0>, RequireES<1, 0>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT24, true, 24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depthTextureANGLE>, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depth24OES>, RequireESOrExt<3, 0, &Extensions::depth24OES>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32F, true, 32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depthTextureANGLE>, RequireES<3, 0>, RequireES<3, 0>, RequireES<3, 0>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32_OES, true, 32, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, AlwaysSupported, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES, &Extensions::depth32>, RequireExtOrExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES, &Extensions::depth32>); - AddDepthStencilFormat(&map, GL_DEPTH24_STENCIL8, true, 24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, 0, &Extensions::depthTextureANGLE>, AlwaysSupported, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::packedDepthStencil>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::packedDepthStencil>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::packedDepthStencil>); - AddDepthStencilFormat(&map, GL_DEPTH32F_STENCIL8, true, 32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireES<3, 0>, AlwaysSupported, RequireES<3, 0>, RequireES<3, 0>, RequireES<3, 0>); + // | Internal format |sized| D |S | X | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT16, true, 16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireES<1, 0>, RequireES<1, 0>, RequireES<1, 0>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT24, true, 24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depthTextureANGLE>, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depth24OES>, RequireESOrExt<3, 0, &Extensions::depth24OES>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32F, true, 32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depthTextureANGLE>, RequireES<3, 0>, RequireES<3, 0>, RequireES<3, 0>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32_OES, true, 32, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, AlwaysSupported, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES, &Extensions::depth32OES>, RequireExtOrExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES, &Extensions::depth32OES>); + AddDepthStencilFormat(&map, GL_DEPTH24_STENCIL8, true, 24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, 0, &Extensions::depthTextureANGLE>, AlwaysSupported, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::packedDepthStencilOES>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::packedDepthStencilOES>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextureANGLE, &Extensions::packedDepthStencilOES>); + AddDepthStencilFormat(&map, GL_DEPTH32F_STENCIL8, true, 32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireES<3, 0>, AlwaysSupported, RequireES<3, 0>, RequireES<3, 0>, RequireES<3, 0>); // STENCIL_INDEX8 is special-cased, see around the bottom of the list. // Luminance alpha formats @@ -862,36 +863,36 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() AddLUMAFormat(&map, GL_ALPHA16F_EXT, true, 0, 16, GL_ALPHA, GL_HALF_FLOAT_OES, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, NeverSupported, NeverSupported, NeverSupported); AddLUMAFormat(&map, GL_LUMINANCE16F_EXT, true, 16, 0, GL_LUMINANCE, GL_HALF_FLOAT_OES, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, NeverSupported, NeverSupported, NeverSupported); AddLUMAFormat(&map, GL_LUMINANCE_ALPHA16F_EXT, true, 16, 16, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddLUMAFormat(&map, GL_ALPHA32F_EXT, true, 0, 32, GL_ALPHA, GL_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddLUMAFormat(&map, GL_LUMINANCE32F_EXT, true, 32, 0, GL_LUMINANCE, GL_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddLUMAFormat(&map, GL_LUMINANCE_ALPHA32F_EXT, true, 32, 32, GL_LUMINANCE_ALPHA, GL_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); + AddLUMAFormat(&map, GL_ALPHA32F_EXT, true, 0, 32, GL_ALPHA, GL_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); + AddLUMAFormat(&map, GL_LUMINANCE32F_EXT, true, 32, 0, GL_LUMINANCE, GL_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); + AddLUMAFormat(&map, GL_LUMINANCE_ALPHA32F_EXT, true, 32, 32, GL_LUMINANCE_ALPHA, GL_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); // Compressed formats, From ES 3.0.1 spec, table 3.16 - // | Internal format |W |H |D | BS |CC| SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend - AddCompressedFormat(&map, GL_COMPRESSED_R11_EAC, 4, 4, 1, 64, 1, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACR11UnsignedTexture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_SIGNED_R11_EAC, 4, 4, 1, 64, 1, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACR11SignedTexture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_RG11_EAC, 4, 4, 1, 128, 2, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACRG11UnsignedTexture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_SIGNED_RG11_EAC, 4, 4, 1, 128, 2, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACRG11SignedTexture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_RGB8_ETC2, 4, 4, 1, 64, 3, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2RGB8Texture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_ETC2, 4, 4, 1, 64, 3, true, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2sRGB8Texture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, 4, 4, 1, 64, 3, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2PunchthroughARGB8Texture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, 4, 4, 1, 64, 3, true, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2PunchthroughAsRGB8AlphaTexture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_RGBA8_ETC2_EAC, 4, 4, 1, 128, 4, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2RGBA8Texture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 4, 4, 1, 128, 4, true, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2sRGB8Alpha8Texture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + // | Internal format |W |H |D | BS |CC| SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + AddCompressedFormat(&map, GL_COMPRESSED_R11_EAC, 4, 4, 1, 64, 1, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACR11UnsignedTextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_SIGNED_R11_EAC, 4, 4, 1, 64, 1, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACR11SignedTextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RG11_EAC, 4, 4, 1, 128, 2, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACRG11UnsignedTextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_SIGNED_RG11_EAC, 4, 4, 1, 128, 2, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedEACRG11SignedTextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RGB8_ETC2, 4, 4, 1, 64, 3, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2RGB8TextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_ETC2, 4, 4, 1, 64, 3, true, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2sRGB8TextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, 4, 4, 1, 64, 3, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2PunchthroughARGB8TextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, 4, 4, 1, 64, 3, true, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2PunchthroughAsRGB8AlphaTextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RGBA8_ETC2_EAC, 4, 4, 1, 128, 4, false, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2RGBA8TextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 4, 4, 1, 128, 4, true, RequireESOrExtOrExt<3, 0, &Extensions::compressedTextureETC, &Extensions::compressedETC2sRGB8Alpha8TextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); // From GL_EXT_texture_compression_dxt1 - // | Internal format |W |H |D | BS |CC| SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend - AddCompressedFormat(&map, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 1, 64, 3, false, RequireExt<&Extensions::textureCompressionDXT1>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); - AddCompressedFormat(&map, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 4, 4, 1, 64, 4, false, RequireExt<&Extensions::textureCompressionDXT1>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + // | Internal format |W |H |D | BS |CC| SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + AddCompressedFormat(&map, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 1, 64, 3, false, RequireExt<&Extensions::textureCompressionDXT1>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 4, 4, 1, 64, 4, false, RequireExt<&Extensions::textureCompressionDXT1>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); // From GL_ANGLE_texture_compression_dxt3 - AddCompressedFormat(&map, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, 4, 4, 1, 128, 4, false, RequireExt<&Extensions::textureCompressionDXT3>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, 4, 4, 1, 128, 4, false, RequireExt<&Extensions::textureCompressionDXT3>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); // From GL_ANGLE_texture_compression_dxt5 - AddCompressedFormat(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, 4, 4, 1, 128, 4, false, RequireExt<&Extensions::textureCompressionDXT5>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, 4, 4, 1, 128, 4, false, RequireExt<&Extensions::textureCompressionDXT5>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); // From GL_OES_compressed_ETC1_RGB8_texture - AddCompressedFormat(&map, GL_ETC1_RGB8_OES, 4, 4, 1, 64, 3, false, RequireExt<&Extensions::compressedETC1RGB8Texture>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); + AddCompressedFormat(&map, GL_ETC1_RGB8_OES, 4, 4, 1, 64, 3, false, RequireExt<&Extensions::compressedETC1RGB8TextureOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); // From GL_EXT_texture_compression_s3tc_srgb // | Internal format |W |H |D | BS |CC|SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend @@ -1056,21 +1057,21 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() AddRGBAFormat(&map, GL_RGBA_INTEGER, false, 10, 10, 10, 2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported, NeverSupported, NeverSupported); // Unsized floating point formats - // |Internal format |sized | R | G | B | A |S | Format | Type | Comp | SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend - AddRGBAFormat(&map, GL_RED, false, 16, 0, 0, 0, 0, GL_RED, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RG, false, 16, 16, 0, 0, 0, GL_RG, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB, false, 16, 16, 16, 0, 0, GL_RGB, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGBA, false, 16, 16, 16, 16, 0, GL_RGBA, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RED, false, 16, 0, 0, 0, 0, GL_RED, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureHalfFloat, &Extensions::textureRG>, RequireExt<&Extensions::textureHalfFloatLinear>, AlwaysSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RG, false, 16, 16, 0, 0, 0, GL_RG, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureHalfFloat, &Extensions::textureRG>, RequireExt<&Extensions::textureHalfFloatLinear>, AlwaysSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB, false, 16, 16, 16, 0, 0, GL_RGB, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, UnsizedHalfFloatOESRGBATextureAttachmentSupport, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGBA, false, 16, 16, 16, 16, 0, GL_RGBA, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, UnsizedHalfFloatOESRGBATextureAttachmentSupport, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RED, false, 32, 0, 0, 0, 0, GL_RED, GL_FLOAT, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureFloat, &Extensions::textureRG>, RequireExt<&Extensions::textureFloatLinear>, AlwaysSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RG, false, 32, 32, 0, 0, 0, GL_RG, GL_FLOAT, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureFloat, &Extensions::textureRG>, RequireExt<&Extensions::textureFloatLinear>, AlwaysSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB, false, 32, 32, 32, 0, 0, GL_RGB, GL_FLOAT, GL_FLOAT, false, RequireExt<&Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB, false, 9, 9, 9, 0, 5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB, false, 11, 11, 10, 0, 0, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGBA, false, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, RequireExt<&Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); + // |Internal format |sized | R | G | B | A |S | Format | Type | Comp | SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + AddRGBAFormat(&map, GL_RED, false, 16, 0, 0, 0, 0, GL_RED, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RG, false, 16, 16, 0, 0, 0, GL_RG, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB, false, 16, 16, 16, 0, 0, GL_RGB, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGBA, false, 16, 16, 16, 16, 0, GL_RGBA, GL_HALF_FLOAT, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RED, false, 16, 0, 0, 0, 0, GL_RED, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureHalfFloat, &Extensions::textureRG>, RequireExt<&Extensions::textureHalfFloatLinear>, AlwaysSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RG, false, 16, 16, 0, 0, 0, GL_RG, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureHalfFloat, &Extensions::textureRG>, RequireExt<&Extensions::textureHalfFloatLinear>, AlwaysSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB, false, 16, 16, 16, 0, 0, GL_RGB, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, UnsizedHalfFloatOESRGBATextureAttachmentSupport, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGBA, false, 16, 16, 16, 16, 0, GL_RGBA, GL_HALF_FLOAT_OES, GL_FLOAT, false, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, UnsizedHalfFloatOESRGBATextureAttachmentSupport, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RED, false, 32, 0, 0, 0, 0, GL_RED, GL_FLOAT, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureFloatOES, &Extensions::textureRG>, RequireExt<&Extensions::textureFloatLinearOES>, AlwaysSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RG, false, 32, 32, 0, 0, 0, GL_RG, GL_FLOAT, GL_FLOAT, false, RequireExtAndExt<&Extensions::textureFloatOES, &Extensions::textureRG>, RequireExt<&Extensions::textureFloatLinearOES>, AlwaysSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB, false, 32, 32, 32, 0, 0, GL_RGB, GL_FLOAT, GL_FLOAT, false, RequireExt<&Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB, false, 9, 9, 9, 0, 5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB, false, 11, 11, 10, 0, 0, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGBA, false, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, RequireExt<&Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); // Unsized luminance alpha formats // | Internal format |sized | L | A | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend @@ -1080,18 +1081,18 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() AddLUMAFormat(&map, GL_ALPHA, false, 0, 16, GL_ALPHA, GL_HALF_FLOAT_OES, GL_FLOAT, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, NeverSupported, NeverSupported, NeverSupported); AddLUMAFormat(&map, GL_LUMINANCE, false, 16, 0, GL_LUMINANCE, GL_HALF_FLOAT_OES, GL_FLOAT, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, NeverSupported, NeverSupported, NeverSupported); AddLUMAFormat(&map, GL_LUMINANCE_ALPHA, false, 16, 16, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES, GL_FLOAT, RequireExt<&Extensions::textureHalfFloat>, RequireExt<&Extensions::textureHalfFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddLUMAFormat(&map, GL_ALPHA, false, 0, 32, GL_ALPHA, GL_FLOAT, GL_FLOAT, RequireExt<&Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddLUMAFormat(&map, GL_LUMINANCE, false, 32, 0, GL_LUMINANCE, GL_FLOAT, GL_FLOAT, RequireExt<&Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); - AddLUMAFormat(&map, GL_LUMINANCE_ALPHA, false, 32, 32, GL_LUMINANCE_ALPHA, GL_FLOAT, GL_FLOAT, RequireExt<&Extensions::textureFloat>, RequireExt<&Extensions::textureFloatLinear>, NeverSupported, NeverSupported, NeverSupported); + AddLUMAFormat(&map, GL_ALPHA, false, 0, 32, GL_ALPHA, GL_FLOAT, GL_FLOAT, RequireExt<&Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); + AddLUMAFormat(&map, GL_LUMINANCE, false, 32, 0, GL_LUMINANCE, GL_FLOAT, GL_FLOAT, RequireExt<&Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); + AddLUMAFormat(&map, GL_LUMINANCE_ALPHA, false, 32, 32, GL_LUMINANCE_ALPHA, GL_FLOAT, GL_FLOAT, RequireExt<&Extensions::textureFloatOES>, RequireExt<&Extensions::textureFloatLinearOES>, NeverSupported, NeverSupported, NeverSupported); // Unsized depth stencil formats - // | Internal format |sized | D |S | X | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT, false, 16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, AlwaysSupported, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT, false, 24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, AlwaysSupported, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT, false, 32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<1, 0>, AlwaysSupported, RequireES<1, 0>, RequireES<1, 0>, RequireES<1, 0>); - AddDepthStencilFormat(&map, GL_DEPTH_STENCIL, false, 24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, 0, &Extensions::packedDepthStencil>, AlwaysSupported, RequireExtAndExt<&Extensions::packedDepthStencil, &Extensions::depthTextureANGLE>, RequireExtAndExt<&Extensions::packedDepthStencil, &Extensions::depthTextureANGLE>, RequireExtAndExt<&Extensions::packedDepthStencil, &Extensions::depthTextureANGLE>); - AddDepthStencilFormat(&map, GL_DEPTH_STENCIL, false, 32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireESOrExt<3, 0, &Extensions::packedDepthStencil>, AlwaysSupported, RequireExt<&Extensions::packedDepthStencil>, RequireExt<&Extensions::packedDepthStencil>, RequireExt<&Extensions::packedDepthStencil>); - AddDepthStencilFormat(&map, GL_STENCIL, false, 0, 8, 0, GL_STENCIL, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, NeverSupported , RequireES<1, 0>, RequireES<1, 0>, RequireES<1, 0>); + // | Internal format |sized | D |S | X | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT, false, 16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, AlwaysSupported, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT, false, 24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, AlwaysSupported, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>, RequireExtOrExt<&Extensions::depthTextureANGLE, &Extensions::depthTextureOES>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT, false, 32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<1, 0>, AlwaysSupported, RequireES<1, 0>, RequireES<1, 0>, RequireES<1, 0>); + AddDepthStencilFormat(&map, GL_DEPTH_STENCIL, false, 24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, 0, &Extensions::packedDepthStencilOES>, AlwaysSupported, RequireExtAndExt<&Extensions::packedDepthStencilOES, &Extensions::depthTextureANGLE>, RequireExtAndExt<&Extensions::packedDepthStencilOES, &Extensions::depthTextureANGLE>, RequireExtAndExt<&Extensions::packedDepthStencilOES, &Extensions::depthTextureANGLE>); + AddDepthStencilFormat(&map, GL_DEPTH_STENCIL, false, 32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireESOrExt<3, 0, &Extensions::packedDepthStencilOES>, AlwaysSupported, RequireExt<&Extensions::packedDepthStencilOES>, RequireExt<&Extensions::packedDepthStencilOES>, RequireExt<&Extensions::packedDepthStencilOES>); + AddDepthStencilFormat(&map, GL_STENCIL, false, 0, 8, 0, GL_STENCIL, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, RequireES<1, 0>, NeverSupported , RequireES<1, 0>, RequireES<1, 0>, RequireES<1, 0>); // clang-format on return map; diff --git a/src/libANGLE/queryutils.cpp b/src/libANGLE/queryutils.cpp index 6302a8280..2f6183ac6 100644 --- a/src/libANGLE/queryutils.cpp +++ b/src/libANGLE/queryutils.cpp @@ -3057,7 +3057,7 @@ bool GetQueryParameterInfo(const State &glState, *numParams = 1; return true; case GL_TEXTURE_BINDING_EXTERNAL_OES: - if (!extensions.eglStreamConsumerExternal && !extensions.eglImageExternal) + if (!extensions.eglStreamConsumerExternalNV && !extensions.eglImageExternalOES) { return false; } @@ -3202,7 +3202,7 @@ bool GetQueryParameterInfo(const State &glState, return true; case GL_NUM_PROGRAM_BINARY_FORMATS_OES: - if ((clientMajorVersion < 3) && !extensions.getProgramBinary) + if ((clientMajorVersion < 3) && !extensions.getProgramBinaryOES) { return false; } @@ -3211,7 +3211,7 @@ bool GetQueryParameterInfo(const State &glState, return true; case GL_PROGRAM_BINARY_FORMATS_OES: - if ((clientMajorVersion < 3) && !extensions.getProgramBinary) + if ((clientMajorVersion < 3) && !extensions.getProgramBinaryOES) { return false; } @@ -3240,7 +3240,7 @@ bool GetQueryParameterInfo(const State &glState, *numParams = 1; return true; case GL_VERTEX_ARRAY_BINDING: - if ((clientMajorVersion < 3) && !extensions.vertexArrayObject) + if ((clientMajorVersion < 3) && !extensions.vertexArrayObjectOES) { return false; } @@ -3249,7 +3249,7 @@ bool GetQueryParameterInfo(const State &glState, return true; case GL_PIXEL_PACK_BUFFER_BINDING: case GL_PIXEL_UNPACK_BUFFER_BINDING: - if ((clientMajorVersion < 3) && !extensions.pixelBufferObject) + if ((clientMajorVersion < 3) && !extensions.pixelBufferObjectNV) { return false; } @@ -3270,7 +3270,7 @@ bool GetQueryParameterInfo(const State &glState, return true; case GL_FRAGMENT_SHADER_DERIVATIVE_HINT: - if ((clientMajorVersion < 3) && !extensions.standardDerivatives) + if ((clientMajorVersion < 3) && !extensions.standardDerivativesOES) { return false; } diff --git a/src/libANGLE/renderer/d3d/DisplayD3D.cpp b/src/libANGLE/renderer/d3d/DisplayD3D.cpp index 3dc2f50a4..321761f36 100644 --- a/src/libANGLE/renderer/d3d/DisplayD3D.cpp +++ b/src/libANGLE/renderer/d3d/DisplayD3D.cpp @@ -349,7 +349,7 @@ void DisplayD3D::generateCaps(egl::Caps *outCaps) const // Display must be initialized to generate caps ASSERT(mRenderer != nullptr); - outCaps->textureNPOT = mRenderer->getNativeExtensions().textureNPOT; + outCaps->textureNPOT = mRenderer->getNativeExtensions().textureNPOTOES; } egl::Error DisplayD3D::waitClient(const gl::Context *context) diff --git a/src/libANGLE/renderer/d3d/TextureD3D.cpp b/src/libANGLE/renderer/d3d/TextureD3D.cpp index 208898627..252d97e05 100644 --- a/src/libANGLE/renderer/d3d/TextureD3D.cpp +++ b/src/libANGLE/renderer/d3d/TextureD3D.cpp @@ -396,7 +396,7 @@ angle::Result TextureD3D::fastUnpackPixels(const gl::Context *context, GLint TextureD3D::creationLevels(GLsizei width, GLsizei height, GLsizei depth) const { if ((gl::isPow2(width) && gl::isPow2(height) && gl::isPow2(depth)) || - mRenderer->getNativeExtensions().textureNPOT) + mRenderer->getNativeExtensions().textureNPOTOES) { // Maximum number of levels return gl::log2(std::max(std::max(width, height), depth)) + 1; diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp index 05840cb98..ca75282a5 100644 --- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp @@ -3037,7 +3037,7 @@ StreamProducerImpl *Renderer11::createStreamProducerD3DTexture( bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const { - ASSERT(getNativeExtensions().pixelBufferObject); + ASSERT(getNativeExtensions().pixelBufferObjectNV); const gl::InternalFormat &internalFormatInfo = gl::GetSizedInternalFormatInfo(internalFormat); const d3d11::Format &d3d11FormatInfo = diff --git a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp index 24cce3d8c..29a454458 100644 --- a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp @@ -1568,22 +1568,22 @@ void GenerateCaps(ID3D11Device *device, // Explicitly disable GL_OES_compressed_ETC1_RGB8_texture because it's emulated and never // becomes core. WebGL doesn't want to expose it unless there is native support. - extensions->compressedETC1RGB8Texture = false; + extensions->compressedETC1RGB8TextureOES = false; - extensions->elementIndexUint = true; - extensions->getProgramBinary = true; - extensions->rgb8rgba8 = true; + extensions->elementIndexUintOES = true; + extensions->getProgramBinaryOES = true; + extensions->rgb8rgba8OES = true; extensions->readFormatBGRA = true; - extensions->pixelBufferObject = true; - extensions->mapBuffer = true; + extensions->pixelBufferObjectNV = true; + extensions->mapBufferOES = true; extensions->mapBufferRange = true; - extensions->textureNPOT = GetNPOTTextureSupport(featureLevel); + extensions->textureNPOTOES = GetNPOTTextureSupport(featureLevel); extensions->drawBuffers = GetMaximumSimultaneousRenderTargets(featureLevel) > 1; extensions->textureStorage = true; extensions->textureFilterAnisotropic = true; extensions->maxTextureAnisotropy = GetMaximumAnisotropy(featureLevel); extensions->occlusionQueryBoolean = GetOcclusionQuerySupport(featureLevel); - extensions->fence = GetEventQuerySupport(featureLevel); + extensions->fenceNV = GetEventQuerySupport(featureLevel); extensions->disjointTimerQuery = true; extensions->queryCounterBitsTimeElapsed = 64; extensions->queryCounterBitsTimestamp = @@ -1601,7 +1601,7 @@ void GenerateCaps(ID3D11Device *device, extensions->instancedArraysANGLE = GetInstancingSupport(featureLevel); extensions->instancedArraysEXT = GetInstancingSupport(featureLevel); extensions->packReverseRowOrder = true; - extensions->standardDerivatives = GetDerivativeInstructionSupport(featureLevel); + extensions->standardDerivativesOES = GetDerivativeInstructionSupport(featureLevel); extensions->shaderTextureLOD = GetShaderTextureLODSupport(featureLevel); extensions->fragDepth = true; extensions->multiview = IsMultiviewSupported(featureLevel); @@ -1615,24 +1615,24 @@ void GenerateCaps(ID3D11Device *device, } extensions->textureUsage = true; // This could be false since it has no effect in D3D11 extensions->discardFramebuffer = true; - extensions->translatedShaderSource = true; - extensions->fboRenderMipmap = true; - extensions->debugMarker = true; - extensions->eglImage = true; - extensions->eglImageExternal = true; - extensions->eglImageExternalEssl3 = true; - extensions->eglStreamConsumerExternal = true; - extensions->unpackSubimage = true; - extensions->packSubimage = true; - extensions->lossyETCDecode = true; - extensions->syncQuery = GetEventQuerySupport(featureLevel); - extensions->copyTexture = true; - extensions->copyCompressedTexture = true; - extensions->textureStorageMultisample2DArray = true; + extensions->translatedShaderSource = true; + extensions->fboRenderMipmapOES = true; + extensions->debugMarker = true; + extensions->eglImageOES = true; + extensions->eglImageExternalOES = true; + extensions->eglImageExternalEssl3OES = true; + extensions->eglStreamConsumerExternalNV = true; + extensions->unpackSubimage = true; + extensions->packSubimage = true; + extensions->lossyETCDecode = true; + extensions->syncQuery = GetEventQuerySupport(featureLevel); + extensions->copyTexture = true; + extensions->copyCompressedTexture = true; + extensions->textureStorageMultisample2DArrayOES = true; extensions->multiviewMultisample = ((extensions->multiview || extensions->multiview2) && - extensions->textureStorageMultisample2DArray); + extensions->textureStorageMultisample2DArrayOES); extensions->copyTexture3d = true; - extensions->textureBorderClamp = true; + extensions->textureBorderClampOES = true; extensions->textureMultisample = true; extensions->provokingVertex = true; extensions->blendFuncExtended = true; diff --git a/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.cpp b/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.cpp index 14cdacced..e2dbf23e8 100644 --- a/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.cpp +++ b/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.cpp @@ -46,7 +46,7 @@ angle::Result IndexBuffer9::initialize(const gl::Context *context, } else if (indexType == gl::DrawElementsType::UnsignedInt) { - ASSERT(mRenderer->getNativeExtensions().elementIndexUint); + ASSERT(mRenderer->getNativeExtensions().elementIndexUintOES); format = D3DFMT_INDEX32; } else diff --git a/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp index 4d1c548d4..3d23ae6c4 100644 --- a/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp +++ b/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp @@ -1480,7 +1480,7 @@ angle::Result Renderer9::drawLineLoop(const gl::Context *context, unsigned int startIndex = 0; Context9 *context9 = GetImplAs(context); - if (getNativeExtensions().elementIndexUint) + if (getNativeExtensions().elementIndexUintOES) { if (!mLineLoopIB) { @@ -1692,7 +1692,7 @@ angle::Result Renderer9::getCountingIB(const gl::Context *context, ANGLE_TRY(mCountingIB->unmapBuffer(context)); } } - else if (getNativeExtensions().elementIndexUint) + else if (getNativeExtensions().elementIndexUintOES) { const unsigned int spaceNeeded = static_cast(count) * sizeof(unsigned int); diff --git a/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp b/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp index 85787ad7c..8464962e4 100644 --- a/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp +++ b/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp @@ -651,13 +651,13 @@ void GenerateCaps(IDirect3D9 *d3d9, // GL extension support extensions->setTextureExtensionSupport(*textureCapsMap); - extensions->elementIndexUint = deviceCaps.MaxVertexIndex >= (1 << 16); - extensions->getProgramBinary = true; - extensions->rgb8rgba8 = true; - extensions->readFormatBGRA = true; - extensions->pixelBufferObject = false; - extensions->mapBuffer = false; - extensions->mapBufferRange = false; + extensions->elementIndexUintOES = deviceCaps.MaxVertexIndex >= (1 << 16); + extensions->getProgramBinaryOES = true; + extensions->rgb8rgba8OES = true; + extensions->readFormatBGRA = true; + extensions->pixelBufferObjectNV = false; + extensions->mapBufferOES = false; + extensions->mapBufferRange = false; // D3D does not allow depth textures to have more than one mipmap level OES_depth_texture // allows for that so we can't implement full support with the D3D9 back end. @@ -670,10 +670,11 @@ void GenerateCaps(IDirect3D9 *d3d9, if (SUCCEEDED(d3d9->GetAdapterIdentifier(adapter, 0, &adapterId))) { // ATI cards on XP have problems with non-power-of-two textures. - extensions->textureNPOT = !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_POW2) && - !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2) && - !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) && - !(!isWindowsVistaOrGreater() && IsAMD(adapterId.VendorId)); + extensions->textureNPOTOES = + !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_POW2) && + !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2) && + !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) && + !(!isWindowsVistaOrGreater() && IsAMD(adapterId.VendorId)); // Disable depth texture support on AMD cards (See ANGLE issue 839) if (IsAMD(adapterId.VendorId)) @@ -684,7 +685,7 @@ void GenerateCaps(IDirect3D9 *d3d9, } else { - extensions->textureNPOT = false; + extensions->textureNPOTOES = false; } extensions->drawBuffers = false; @@ -704,7 +705,7 @@ void GenerateCaps(IDirect3D9 *d3d9, // Check event query support by trying to create one IDirect3DQuery9 *eventQuery = nullptr; - extensions->fence = + extensions->fenceNV = SUCCEEDED(device->CreateQuery(D3DQUERYTYPE_EVENT, &eventQuery)) && eventQuery; SafeRelease(eventQuery); @@ -728,25 +729,25 @@ void GenerateCaps(IDirect3D9 *d3d9, // extension extensions->instancedArraysEXT = false; extensions->packReverseRowOrder = true; - extensions->standardDerivatives = + extensions->standardDerivativesOES = (deviceCaps.PS20Caps.Caps & D3DPS20CAPS_GRADIENTINSTRUCTIONS) != 0; extensions->shaderTextureLOD = true; extensions->fragDepth = true; extensions->textureUsage = true; extensions->translatedShaderSource = true; - extensions->fboRenderMipmap = false; + extensions->fboRenderMipmapOES = false; extensions->discardFramebuffer = false; // It would be valid to set this to true, since // glDiscardFramebufferEXT is just a hint - extensions->colorBufferFloat = false; - extensions->debugMarker = true; - extensions->eglImage = true; - extensions->eglImageExternal = true; - extensions->unpackSubimage = true; - extensions->packSubimage = true; - extensions->syncQuery = extensions->fence; - extensions->copyTexture = true; - extensions->textureBorderClamp = true; - extensions->webglVideoTexture = true; + extensions->colorBufferFloat = false; + extensions->debugMarker = true; + extensions->eglImageOES = true; + extensions->eglImageExternalOES = true; + extensions->unpackSubimage = true; + extensions->packSubimage = true; + extensions->syncQuery = extensions->fenceNV; + extensions->copyTexture = true; + extensions->textureBorderClampOES = true; + extensions->webglVideoTexture = true; // D3D9 has no concept of separate masks and refs for front and back faces in the depth stencil // state. diff --git a/src/libANGLE/renderer/gl/renderergl_utils.cpp b/src/libANGLE/renderer/gl/renderergl_utils.cpp index 8aadc31b5..3ee2c5510 100644 --- a/src/libANGLE/renderer/gl/renderergl_utils.cpp +++ b/src/libANGLE/renderer/gl/renderergl_utils.cpp @@ -1106,29 +1106,29 @@ void GenerateCaps(const FunctionsGL *functions, extensions->textureCompressionASTCHDRKHR = extensions->textureCompressionASTCLDRKHR && functions->hasGLESExtension("GL_KHR_texture_compression_astc_hdr"); - extensions->elementIndexUint = functions->standard == STANDARD_GL_DESKTOP || - functions->isAtLeastGLES(gl::Version(3, 0)) || - functions->hasGLESExtension("GL_OES_element_index_uint"); - extensions->getProgramBinary = caps->programBinaryFormats.size() > 0; - extensions->readFormatBGRA = functions->isAtLeastGL(gl::Version(1, 2)) || + extensions->elementIndexUintOES = functions->standard == STANDARD_GL_DESKTOP || + functions->isAtLeastGLES(gl::Version(3, 0)) || + functions->hasGLESExtension("GL_OES_element_index_uint"); + extensions->getProgramBinaryOES = caps->programBinaryFormats.size() > 0; + extensions->readFormatBGRA = functions->isAtLeastGL(gl::Version(1, 2)) || functions->hasGLExtension("GL_EXT_bgra") || functions->hasGLESExtension("GL_EXT_read_format_bgra"); - extensions->pixelBufferObject = functions->isAtLeastGL(gl::Version(2, 1)) || - functions->isAtLeastGLES(gl::Version(3, 0)) || - functions->hasGLExtension("GL_ARB_pixel_buffer_object") || - functions->hasGLExtension("GL_EXT_pixel_buffer_object") || - functions->hasGLESExtension("GL_NV_pixel_buffer_object"); - extensions->glSync = nativegl::SupportsFenceSync(functions); - extensions->mapBuffer = functions->isAtLeastGL(gl::Version(1, 5)) || - functions->isAtLeastGLES(gl::Version(3, 0)) || - functions->hasGLESExtension("GL_OES_mapbuffer"); + extensions->pixelBufferObjectNV = functions->isAtLeastGL(gl::Version(2, 1)) || + functions->isAtLeastGLES(gl::Version(3, 0)) || + functions->hasGLExtension("GL_ARB_pixel_buffer_object") || + functions->hasGLExtension("GL_EXT_pixel_buffer_object") || + functions->hasGLESExtension("GL_NV_pixel_buffer_object"); + extensions->glSyncARB = nativegl::SupportsFenceSync(functions); + extensions->mapBufferOES = functions->isAtLeastGL(gl::Version(1, 5)) || + functions->isAtLeastGLES(gl::Version(3, 0)) || + functions->hasGLESExtension("GL_OES_mapbuffer"); extensions->mapBufferRange = functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_ARB_map_buffer_range") || functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_EXT_map_buffer_range"); - extensions->textureNPOT = functions->standard == STANDARD_GL_DESKTOP || - functions->isAtLeastGLES(gl::Version(3, 0)) || - functions->hasGLESExtension("GL_OES_texture_npot"); + extensions->textureNPOTOES = functions->standard == STANDARD_GL_DESKTOP || + functions->isAtLeastGLES(gl::Version(3, 0)) || + functions->hasGLESExtension("GL_OES_texture_npot"); // TODO(jmadill): Investigate emulating EXT_draw_buffers on ES 3.0's core functionality. extensions->drawBuffers = functions->isAtLeastGL(gl::Version(2, 0)) || functions->hasGLExtension("ARB_draw_buffers") || @@ -1143,16 +1143,16 @@ void GenerateCaps(const FunctionsGL *functions, extensions->textureFilterAnisotropic ? QuerySingleGLFloat(functions, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0.0f; - extensions->fence = FenceNVGL::Supported(functions) || FenceNVSyncGL::Supported(functions); + extensions->fenceNV = FenceNVGL::Supported(functions) || FenceNVSyncGL::Supported(functions); extensions->blendMinMax = functions->isAtLeastGL(gl::Version(1, 5)) || functions->hasGLExtension("GL_EXT_blend_minmax") || functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_EXT_blend_minmax"); extensions->framebufferBlit = (functions->blitFramebuffer != nullptr); extensions->framebufferMultisample = caps->maxSamples > 0; - extensions->standardDerivatives = functions->isAtLeastGL(gl::Version(2, 0)) || - functions->hasGLExtension("GL_ARB_fragment_shader") || - functions->hasGLESExtension("GL_OES_standard_derivatives"); + extensions->standardDerivativesOES = functions->isAtLeastGL(gl::Version(2, 0)) || + functions->hasGLExtension("GL_ARB_fragment_shader") || + functions->hasGLESExtension("GL_OES_standard_derivatives"); extensions->shaderTextureLOD = functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_ARB_shader_texture_lod") || functions->hasGLESExtension("GL_EXT_shader_texture_lod"); @@ -1178,14 +1178,15 @@ void GenerateCaps(const FunctionsGL *functions, *multiviewImplementationType = MultiviewImplementationTypeGL::NV_VIEWPORT_ARRAY2; } - extensions->fboRenderMipmap = functions->isAtLeastGL(gl::Version(3, 0)) || - functions->hasGLExtension("GL_EXT_framebuffer_object") || - functions->isAtLeastGLES(gl::Version(3, 0)) || - functions->hasGLESExtension("GL_OES_fbo_render_mipmap"); - extensions->textureBorderClamp = functions->standard == STANDARD_GL_DESKTOP || - functions->hasGLESExtension("GL_OES_texture_border_clamp") || - functions->hasGLESExtension("GL_EXT_texture_border_clamp") || - functions->hasGLESExtension("GL_NV_texture_border_clamp"); + extensions->fboRenderMipmapOES = functions->isAtLeastGL(gl::Version(3, 0)) || + functions->hasGLExtension("GL_EXT_framebuffer_object") || + functions->isAtLeastGLES(gl::Version(3, 0)) || + functions->hasGLESExtension("GL_OES_fbo_render_mipmap"); + extensions->textureBorderClampOES = + functions->standard == STANDARD_GL_DESKTOP || + functions->hasGLESExtension("GL_OES_texture_border_clamp") || + functions->hasGLESExtension("GL_EXT_texture_border_clamp") || + functions->hasGLESExtension("GL_NV_texture_border_clamp"); extensions->instancedArraysANGLE = functions->isAtLeastGL(gl::Version(3, 1)) || (functions->hasGLExtension("GL_ARB_instanced_arrays") && (functions->hasGLExtension("GL_ARB_draw_instanced") || @@ -1199,22 +1200,22 @@ void GenerateCaps(const FunctionsGL *functions, extensions->packSubimage = functions->standard == STANDARD_GL_DESKTOP || functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_NV_pack_subimage"); - extensions->vertexArrayObject = functions->isAtLeastGL(gl::Version(3, 0)) || - functions->hasGLExtension("GL_ARB_vertex_array_object") || - functions->isAtLeastGLES(gl::Version(3, 0)) || - functions->hasGLESExtension("GL_OES_vertex_array_object"); + extensions->vertexArrayObjectOES = functions->isAtLeastGL(gl::Version(3, 0)) || + functions->hasGLExtension("GL_ARB_vertex_array_object") || + functions->isAtLeastGLES(gl::Version(3, 0)) || + functions->hasGLESExtension("GL_OES_vertex_array_object"); extensions->debugMarker = functions->isAtLeastGL(gl::Version(4, 3)) || functions->hasGLExtension("GL_KHR_debug") || functions->hasGLExtension("GL_EXT_debug_marker") || functions->isAtLeastGLES(gl::Version(3, 2)) || functions->hasGLESExtension("GL_KHR_debug") || functions->hasGLESExtension("GL_EXT_debug_marker"); - extensions->eglImage = functions->hasGLESExtension("GL_OES_EGL_image"); - extensions->eglImageExternal = functions->hasGLESExtension("GL_OES_EGL_image_external"); - extensions->eglImageExternalEssl3 = + extensions->eglImageOES = functions->hasGLESExtension("GL_OES_EGL_image"); + extensions->eglImageExternalOES = functions->hasGLESExtension("GL_OES_EGL_image_external"); + extensions->eglImageExternalEssl3OES = functions->hasGLESExtension("GL_OES_EGL_image_external_essl3"); - extensions->eglSync = functions->hasGLESExtension("GL_OES_EGL_sync"); + extensions->eglSyncOES = functions->hasGLESExtension("GL_OES_EGL_sync"); if (functions->isAtLeastGL(gl::Version(3, 3)) || functions->hasGLExtension("GL_ARB_timer_query") || @@ -1260,10 +1261,10 @@ void GenerateCaps(const FunctionsGL *functions, // Note that OES_texture_storage_multisample_2d_array support could be extended down to GL 3.2 // if we emulated texStorage* API on top of texImage*. - extensions->textureStorageMultisample2DArray = + extensions->textureStorageMultisample2DArrayOES = functions->isAtLeastGL(gl::Version(4, 2)) || functions->isAtLeastGLES(gl::Version(3, 2)); - extensions->multiviewMultisample = extensions->textureStorageMultisample2DArray && + extensions->multiviewMultisample = extensions->textureStorageMultisample2DArrayOES && (extensions->multiview || extensions->multiview2); extensions->textureMultisample = functions->isAtLeastGL(gl::Version(3, 2)) || diff --git a/src/libANGLE/renderer/metal/DisplayMtl.mm b/src/libANGLE/renderer/metal/DisplayMtl.mm index 0fafd8ae4..8da9700ef 100644 --- a/src/libANGLE/renderer/metal/DisplayMtl.mm +++ b/src/libANGLE/renderer/metal/DisplayMtl.mm @@ -543,7 +543,7 @@ void DisplayMtl::initializeExtensions() const // Enable this for simple buffer readback testing, but some functionality is missing. // NOTE(hqle): Support full mapBufferRange extension. - mNativeExtensions.mapBuffer = true; + mNativeExtensions.mapBufferOES = true; mNativeExtensions.mapBufferRange = false; mNativeExtensions.textureStorage = true; mNativeExtensions.drawBuffers = false; @@ -554,17 +554,17 @@ void DisplayMtl::initializeExtensions() const mNativeExtensions.copyCompressedTexture = false; mNativeExtensions.debugMarker = false; mNativeExtensions.robustness = true; - mNativeExtensions.textureBorderClamp = false; // not implemented yet + mNativeExtensions.textureBorderClampOES = false; // not implemented yet mNativeExtensions.translatedShaderSource = true; mNativeExtensions.discardFramebuffer = true; // Enable EXT_blend_minmax mNativeExtensions.blendMinMax = true; - mNativeExtensions.eglImage = false; - mNativeExtensions.eglImageExternal = false; + mNativeExtensions.eglImageOES = false; + mNativeExtensions.eglImageExternalOES = false; // NOTE(hqle): Support GL_OES_EGL_image_external_essl3. - mNativeExtensions.eglImageExternalEssl3 = false; + mNativeExtensions.eglImageExternalEssl3OES = false; mNativeExtensions.memoryObject = false; mNativeExtensions.memoryObjectFd = false; @@ -577,7 +577,7 @@ void DisplayMtl::initializeExtensions() const mNativeExtensions.robustBufferAccessBehavior = false; - mNativeExtensions.eglSync = false; + mNativeExtensions.eglSyncOES = false; // NOTE(hqle): support occlusion query mNativeExtensions.occlusionQueryBoolean = false; @@ -590,13 +590,13 @@ void DisplayMtl::initializeExtensions() const mNativeExtensions.maxTextureAnisotropy = 16; // NOTE(hqle): Support true NPOT textures. - mNativeExtensions.textureNPOT = false; + mNativeExtensions.textureNPOTOES = false; mNativeExtensions.texture3DOES = false; - mNativeExtensions.standardDerivatives = true; + mNativeExtensions.standardDerivativesOES = true; - mNativeExtensions.elementIndexUint = true; + mNativeExtensions.elementIndexUintOES = true; } void DisplayMtl::initializeTextureCaps() const @@ -619,7 +619,6 @@ void DisplayMtl::initializeFeatures() mFeatures.hasTextureSwizzle.enabled = false; mFeatures.allowSeparatedDepthStencilBuffers.enabled = false; - #if TARGET_OS_OSX || TARGET_OS_MACCATALYST mFeatures.hasDepthTextureFiltering.enabled = true; diff --git a/src/libANGLE/renderer/metal/mtl_format_utils.mm b/src/libANGLE/renderer/metal/mtl_format_utils.mm index da8db54b1..c7f96b398 100644 --- a/src/libANGLE/renderer/metal/mtl_format_utils.mm +++ b/src/libANGLE/renderer/metal/mtl_format_utils.mm @@ -75,15 +75,15 @@ void GenerateTextureCapsMap(const FormatTable &formatTable, // Requires depth24Stencil8PixelFormatSupported=YES for these extensions bool packedDepthStencil24Support = display->getMetalDevice().depth24Stencil8PixelFormatSupported; - tmpTextureExtensions.packedDepthStencil = true; // We support this reguardless + tmpTextureExtensions.packedDepthStencilOES = true; // We support this reguardless tmpTextureExtensions.colorBufferHalfFloat = packedDepthStencil24Support; tmpTextureExtensions.colorBufferFloat = packedDepthStencil24Support; tmpTextureExtensions.colorBufferFloatRGB = packedDepthStencil24Support; tmpTextureExtensions.colorBufferFloatRGBA = packedDepthStencil24Support; tmpTextureExtensions.textureHalfFloat = packedDepthStencil24Support; - tmpTextureExtensions.textureFloat = packedDepthStencil24Support; + tmpTextureExtensions.textureFloatOES = packedDepthStencil24Support; tmpTextureExtensions.textureHalfFloatLinear = packedDepthStencil24Support; - tmpTextureExtensions.textureFloatLinear = packedDepthStencil24Support; + tmpTextureExtensions.textureFloatLinearOES = packedDepthStencil24Support; tmpTextureExtensions.textureRG = packedDepthStencil24Support; tmpTextureExtensions.textureFormatBGRA8888 = packedDepthStencil24Support; @@ -95,14 +95,14 @@ void GenerateTextureCapsMap(const FormatTable &formatTable, tmpTextureExtensions.textureCompressionS3TCsRGB = tmpTextureExtensions.textureCompressionDXT1; #else - tmpTextureExtensions.packedDepthStencil = true; // override to D32_FLOAT_S8X24_UINT + tmpTextureExtensions.packedDepthStencilOES = true; // override to D32_FLOAT_S8X24_UINT tmpTextureExtensions.colorBufferHalfFloat = true; tmpTextureExtensions.colorBufferFloat = true; tmpTextureExtensions.colorBufferFloatRGB = true; tmpTextureExtensions.colorBufferFloatRGBA = true; tmpTextureExtensions.textureHalfFloat = true; tmpTextureExtensions.textureHalfFloatLinear = true; - tmpTextureExtensions.textureFloat = true; + tmpTextureExtensions.textureFloatOES = true; tmpTextureExtensions.textureRG = true; tmpTextureExtensions.textureFormatBGRA8888 = true; if ([display->getMetalDevice() supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily1_v1]) @@ -121,9 +121,9 @@ void GenerateTextureCapsMap(const FormatTable &formatTable, } #endif tmpTextureExtensions.sRGB = true; - tmpTextureExtensions.depth32 = true; + tmpTextureExtensions.depth32OES = true; tmpTextureExtensions.depth24OES = true; - tmpTextureExtensions.rgb8rgba8 = true; + tmpTextureExtensions.rgb8rgba8OES = true; tmpTextureExtensions.textureStorage = true; tmpTextureExtensions.depthTextureOES = true; tmpTextureExtensions.depthTextureANGLE = true; diff --git a/src/libANGLE/renderer/null/ContextNULL.cpp b/src/libANGLE/renderer/null/ContextNULL.cpp index b68dce91f..7862656ba 100644 --- a/src/libANGLE/renderer/null/ContextNULL.cpp +++ b/src/libANGLE/renderer/null/ContextNULL.cpp @@ -68,23 +68,23 @@ ContextNULL::ContextNULL(const gl::State &state, ASSERT(mAllocationTracker != nullptr); mExtensions = gl::Extensions(); - mExtensions.fence = true; + mExtensions.fenceNV = true; mExtensions.framebufferBlit = true; mExtensions.instancedArraysANGLE = true; mExtensions.instancedArraysEXT = true; - mExtensions.pixelBufferObject = true; - mExtensions.mapBuffer = true; + mExtensions.pixelBufferObjectNV = true; + mExtensions.mapBufferOES = true; mExtensions.mapBufferRange = true; mExtensions.copyTexture = true; mExtensions.copyCompressedTexture = true; mExtensions.textureRectangle = true; mExtensions.textureUsage = true; - mExtensions.vertexArrayObject = true; + mExtensions.vertexArrayObjectOES = true; mExtensions.debugMarker = true; mExtensions.translatedShaderSource = true; mExtensions.textureStorage = true; - mExtensions.rgb8rgba8 = true; + mExtensions.rgb8rgba8OES = true; mExtensions.textureCompressionDXT1 = true; mExtensions.textureCompressionDXT3 = true; mExtensions.textureCompressionDXT5 = true; @@ -92,14 +92,14 @@ ContextNULL::ContextNULL(const gl::State &state, mExtensions.textureCompressionASTCHDRKHR = true; mExtensions.textureCompressionASTCLDRKHR = true; mExtensions.textureCompressionASTCOES = true; - mExtensions.compressedETC1RGB8Texture = true; + mExtensions.compressedETC1RGB8TextureOES = true; mExtensions.lossyETCDecode = true; mExtensions.geometryShader = true; - mExtensions.eglImage = true; - mExtensions.eglImageExternal = true; - mExtensions.eglImageExternalEssl3 = true; - mExtensions.eglStreamConsumerExternal = true; + mExtensions.eglImageOES = true; + mExtensions.eglImageExternalOES = true; + mExtensions.eglImageExternalEssl3OES = true; + mExtensions.eglStreamConsumerExternalNV = true; const gl::Version maxClientVersion(3, 1); mCaps = GenerateMinimumCaps(maxClientVersion, mExtensions); diff --git a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp index de2cead09..c85caed7d 100644 --- a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp +++ b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp @@ -53,7 +53,7 @@ void RendererVk::ensureCapsInitialized() const // Enable this for simple buffer readback testing, but some functionality is missing. // TODO(jmadill): Support full mapBufferRange extension. - mNativeExtensions.mapBuffer = true; + mNativeExtensions.mapBufferOES = true; mNativeExtensions.mapBufferRange = true; mNativeExtensions.textureStorage = true; mNativeExtensions.drawBuffers = true; @@ -64,7 +64,7 @@ void RendererVk::ensureCapsInitialized() const mNativeExtensions.copyCompressedTexture = true; mNativeExtensions.debugMarker = true; mNativeExtensions.robustness = true; - mNativeExtensions.textureBorderClamp = false; // not implemented yet + mNativeExtensions.textureBorderClampOES = false; // not implemented yet mNativeExtensions.translatedShaderSource = true; mNativeExtensions.discardFramebuffer = true; @@ -81,9 +81,9 @@ void RendererVk::ensureCapsInitialized() const // Enable EXT_blend_minmax mNativeExtensions.blendMinMax = true; - mNativeExtensions.eglImage = true; - mNativeExtensions.eglImageExternal = true; - mNativeExtensions.eglImageExternalEssl3 = true; + mNativeExtensions.eglImageOES = true; + mNativeExtensions.eglImageExternalOES = true; + mNativeExtensions.eglImageExternalEssl3OES = true; mNativeExtensions.memoryObject = true; mNativeExtensions.memoryObjectFd = getFeatures().supportsExternalMemoryFd.enabled; @@ -91,7 +91,7 @@ void RendererVk::ensureCapsInitialized() const mNativeExtensions.semaphore = true; mNativeExtensions.semaphoreFd = getFeatures().supportsExternalSemaphoreFd.enabled; - mNativeExtensions.vertexHalfFloat = true; + mNativeExtensions.vertexHalfFloatOES = true; // Enabled in HW if VK_EXT_vertex_attribute_divisor available, otherwise emulated mNativeExtensions.instancedArraysANGLE = true; @@ -101,9 +101,9 @@ void RendererVk::ensureCapsInitialized() const mNativeExtensions.robustBufferAccessBehavior = (mPhysicalDeviceFeatures.robustBufferAccess == VK_TRUE); - mNativeExtensions.eglSync = true; + mNativeExtensions.eglSyncOES = true; - mNativeExtensions.vertexAttribType1010102 = true; + mNativeExtensions.vertexAttribType1010102OES = true; // We use secondary command buffers almost everywhere and they require a feature to be // able to execute in the presence of queries. As a result, we won't support queries @@ -126,17 +126,17 @@ void RendererVk::ensureCapsInitialized() const mNativeExtensions.textureFilterAnisotropic ? limitsVk.maxSamplerAnisotropy : 0.0f; // Vulkan natively supports non power-of-two textures - mNativeExtensions.textureNPOT = true; + mNativeExtensions.textureNPOTOES = true; mNativeExtensions.texture3DOES = true; // Vulkan natively supports standard derivatives - mNativeExtensions.standardDerivatives = true; + mNativeExtensions.standardDerivativesOES = true; // Vulkan natively supports 32-bit indices, entry in kIndexTypeMap - mNativeExtensions.elementIndexUint = true; + mNativeExtensions.elementIndexUintOES = true; - mNativeExtensions.fboRenderMipmap = true; + mNativeExtensions.fboRenderMipmapOES = true; // We support getting image data for Textures and Renderbuffers. mNativeExtensions.getImageANGLE = true; @@ -455,11 +455,11 @@ void RendererVk::ensureCapsInitialized() const mNativeCaps.subPixelBits = limitsVk.subPixelPrecisionBits; // Enable Program Binary extension. - mNativeExtensions.getProgramBinary = true; + mNativeExtensions.getProgramBinaryOES = true; mNativeCaps.programBinaryFormats.push_back(GL_PROGRAM_BINARY_ANGLE); // Enable GL_NV_pixel_buffer_object extension. - mNativeExtensions.pixelBufferObject = true; + mNativeExtensions.pixelBufferObjectNV = true; // Geometry shader is optional. if (mPhysicalDeviceFeatures.geometryShader) diff --git a/src/libANGLE/validationEGL.cpp b/src/libANGLE/validationEGL.cpp index 6b54fa973..7bbe3f8be 100644 --- a/src/libANGLE/validationEGL.cpp +++ b/src/libANGLE/validationEGL.cpp @@ -2494,7 +2494,7 @@ Error ValidateCreateSyncBase(const Display *display, ANGLE_TRY(ValidateContext(currentDisplay, currentContext)); - if (!currentContext->getExtensions().eglSync) + if (!currentContext->getExtensions().eglSyncOES) { return EglBadMatch() << "EGL_SYNC_FENCE_KHR cannot be used without " "GL_OES_EGL_sync support."; @@ -2595,7 +2595,7 @@ Error ValidateWaitSync(const Display *display, return EglBadMatch() << "No context is current."; } - if (!context->getExtensions().eglSync) + if (!context->getExtensions().eglSyncOES) { return EglBadMatch() << "Server-side waits cannot be performed without " "GL_OES_EGL_sync support."; @@ -2731,7 +2731,7 @@ Error ValidateStreamConsumerGLTextureExternalKHR(const Display *display, return EglBadAccess() << "Stream consumer extension not active"; } - if (!context->getExtensions().eglStreamConsumerExternal) + if (!context->getExtensions().eglStreamConsumerExternalNV) { return EglBadAccess() << "EGL stream consumer external GL extension not enabled"; } @@ -2863,7 +2863,7 @@ Error ValidateStreamConsumerGLTextureExternalAttribsNV(const Display *display, // Although technically not a requirement in spec, the context needs to be checked for support // for external textures or future logic will cause assertations. This extension is also // effectively useless without external textures. - if (!context->getExtensions().eglStreamConsumerExternal) + if (!context->getExtensions().eglStreamConsumerExternalNV) { return EglBadAccess() << "EGL stream consumer external GL extension not enabled"; } diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp index 5296da084..a161fd77e 100644 --- a/src/libANGLE/validationES.cpp +++ b/src/libANGLE/validationES.cpp @@ -110,7 +110,8 @@ bool ValidReadPixelsTypeEnum(Context *context, GLenum type) return context->getClientVersion() >= ES_3_0; case GL_FLOAT: - return context->getClientVersion() >= ES_3_0 || context->getExtensions().textureFloat || + return context->getClientVersion() >= ES_3_0 || + context->getExtensions().textureFloatOES || context->getExtensions().colorBufferHalfFloat; case GL_HALF_FLOAT: @@ -203,7 +204,7 @@ bool ValidateTextureWrapModeValue(Context *context, break; case GL_CLAMP_TO_BORDER: - if (!context->getExtensions().textureBorderClamp) + if (!context->getExtensions().textureBorderClampOES) { context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled); return false; @@ -516,7 +517,7 @@ bool ValidTextureTarget(const Context *context, TextureType type) return (context->getClientVersion() >= Version(3, 1) || context->getExtensions().textureMultisample); case TextureType::_2DMultisampleArray: - return context->getExtensions().textureStorageMultisample2DArray; + return context->getExtensions().textureStorageMultisample2DArrayOES; case TextureType::VideoImage: return context->getExtensions().webglVideoTexture; @@ -560,8 +561,8 @@ bool ValidTexture3DTarget(const Context *context, TextureType target) bool ValidTextureExternalTarget(const Context *context, TextureType target) { return (target == TextureType::External) && - (context->getExtensions().eglImageExternal || - context->getExtensions().eglStreamConsumerExternal); + (context->getExtensions().eglImageExternalOES || + context->getExtensions().eglStreamConsumerExternalNV); } bool ValidTextureExternalTarget(const Context *context, TextureTarget target) @@ -741,7 +742,7 @@ bool ValidTexLevelDestinationTarget(const Context *context, TextureType type) case TextureType::Rectangle: return context->getExtensions().textureRectangle; case TextureType::_2DMultisampleArray: - return context->getExtensions().textureStorageMultisample2DArray; + return context->getExtensions().textureStorageMultisample2DArrayOES; default: return false; } @@ -819,7 +820,7 @@ bool ValidImageSizeParameters(Context *context, // TexSubImage parameters can be NPOT without textureNPOT extension, // as long as the destination texture is POT. bool hasNPOTSupport = - context->getExtensions().textureNPOT || context->getClientVersion() >= Version(3, 0); + context->getExtensions().textureNPOTOES || context->getClientVersion() >= Version(3, 0); if (!isSubImage && !hasNPOTSupport && (level != 0 && (!isPow2(width) || !isPow2(height) || !isPow2(depth)))) { @@ -2272,7 +2273,7 @@ bool ValidateStateQuery(Context *context, GLenum pname, GLenum *nativeType, unsi case GL_TEXTURE_BINDING_2D_MULTISAMPLE: break; case GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY: - if (!context->getExtensions().textureStorageMultisample2DArray) + if (!context->getExtensions().textureStorageMultisample2DArrayOES) { context->validationError(GL_INVALID_ENUM, kMultisampleArrayExtensionRequired); return false; @@ -2286,8 +2287,8 @@ bool ValidateStateQuery(Context *context, GLenum pname, GLenum *nativeType, unsi } break; case GL_TEXTURE_BINDING_EXTERNAL_OES: - if (!context->getExtensions().eglStreamConsumerExternal && - !context->getExtensions().eglImageExternal) + if (!context->getExtensions().eglStreamConsumerExternalNV && + !context->getExtensions().eglImageExternalOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -3409,7 +3410,7 @@ bool ValidatePushGroupMarkerEXT(Context *context, GLsizei length, const char *ma bool ValidateEGLImageTargetTexture2DOES(Context *context, TextureType type, GLeglImageOES image) { - if (!context->getExtensions().eglImage && !context->getExtensions().eglImageExternal) + if (!context->getExtensions().eglImageOES && !context->getExtensions().eglImageExternalOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -3418,14 +3419,14 @@ bool ValidateEGLImageTargetTexture2DOES(Context *context, TextureType type, GLeg switch (type) { case TextureType::_2D: - if (!context->getExtensions().eglImage) + if (!context->getExtensions().eglImageOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); } break; case TextureType::External: - if (!context->getExtensions().eglImageExternal) + if (!context->getExtensions().eglImageExternalOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); } @@ -3464,7 +3465,7 @@ bool ValidateEGLImageTargetRenderbufferStorageOES(Context *context, GLenum target, GLeglImageOES image) { - if (!context->getExtensions().eglImage) + if (!context->getExtensions().eglImageOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -4287,7 +4288,8 @@ bool ValidateGetProgramivBase(Context *context, break; case GL_PROGRAM_BINARY_LENGTH: - if (context->getClientMajorVersion() < 3 && !context->getExtensions().getProgramBinary) + if (context->getClientMajorVersion() < 3 && + !context->getExtensions().getProgramBinaryOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -5004,7 +5006,7 @@ bool ValidateGetBufferParameterBase(Context *context, break; case GL_BUFFER_ACCESS_OES: - if (!extensions.mapBuffer) + if (!extensions.mapBufferOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -5013,7 +5015,7 @@ bool ValidateGetBufferParameterBase(Context *context, case GL_BUFFER_MAPPED: static_assert(GL_BUFFER_MAPPED == GL_BUFFER_MAPPED_OES, "GL enums should be equal."); - if (context->getClientMajorVersion() < 3 && !extensions.mapBuffer && + if (context->getClientMajorVersion() < 3 && !extensions.mapBufferOES && !extensions.mapBufferRange) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); @@ -5318,7 +5320,7 @@ bool ValidateGetTexParameterBase(Context *context, break; case GL_TEXTURE_BORDER_COLOR: - if (!context->getExtensions().textureBorderClamp) + if (!context->getExtensions().textureBorderClampOES) { context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled); return false; @@ -5752,7 +5754,8 @@ bool ValidateTexParameterBase(Context *context, context->validationError(GL_INVALID_ENUM, kES3Required); return false; } - if (target == TextureType::External && !context->getExtensions().eglImageExternalEssl3) + if (target == TextureType::External && + !context->getExtensions().eglImageExternalEssl3OES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -5977,7 +5980,7 @@ bool ValidateTexParameterBase(Context *context, break; case GL_TEXTURE_BORDER_COLOR: - if (!context->getExtensions().textureBorderClamp) + if (!context->getExtensions().textureBorderClampOES) { context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled); return false; @@ -6178,7 +6181,7 @@ bool ValidateSamplerParameterBase(Context *context, break; case GL_TEXTURE_BORDER_COLOR: - if (!context->getExtensions().textureBorderClamp) + if (!context->getExtensions().textureBorderClampOES) { context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled); return false; @@ -6268,7 +6271,7 @@ bool ValidateGetSamplerParameterBase(Context *context, break; case GL_TEXTURE_BORDER_COLOR: - if (!context->getExtensions().textureBorderClamp) + if (!context->getExtensions().textureBorderClampOES) { context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled); return false; @@ -6327,7 +6330,7 @@ bool ValidateGetInternalFormativBase(Context *context, } break; case GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES: - if (!context->getExtensions().textureStorageMultisample2DArray) + if (!context->getExtensions().textureStorageMultisample2DArrayOES) { context->validationError(GL_INVALID_ENUM, kMultisampleArrayExtensionRequired); return false; diff --git a/src/libANGLE/validationES1.cpp b/src/libANGLE/validationES1.cpp index 2599c1988..594fa3083 100644 --- a/src/libANGLE/validationES1.cpp +++ b/src/libANGLE/validationES1.cpp @@ -60,7 +60,7 @@ bool ValidateClientStateCommon(Context *context, ClientVertexArrayType arrayType case ClientVertexArrayType::TextureCoord: return true; case ClientVertexArrayType::PointSize: - if (!context->getExtensions().pointSizeArray) + if (!context->getExtensions().pointSizeArrayOES) { context->validationError(GL_INVALID_ENUM, kPointSizeArrayExtensionNotEnabled); return false; @@ -106,7 +106,7 @@ bool ValidateBuiltinVertexAttributeCommon(Context *context, maxSize = 4; break; case ClientVertexArrayType::PointSize: - if (!context->getExtensions().pointSizeArray) + if (!context->getExtensions().pointSizeArrayOES) { context->validationError(GL_INVALID_ENUM, kPointSizeArrayExtensionNotEnabled); return false; @@ -519,7 +519,7 @@ bool ValidateTexEnvCommon(Context *context, } break; case TextureEnvTarget::PointSprite: - if (!context->getExtensions().pointSprite) + if (!context->getExtensions().pointSpriteOES) { context->validationError(GL_INVALID_ENUM, kInvalidTextureEnvTarget); return false; diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp index 30ab3403f..3c6240600 100644 --- a/src/libANGLE/validationES2.cpp +++ b/src/libANGLE/validationES2.cpp @@ -347,7 +347,7 @@ bool IsValidCopyTextureSourceTarget(Context *context, TextureType type) case TextureType::Rectangle: return context->getExtensions().textureRectangle; case TextureType::External: - return context->getExtensions().eglImageExternal; + return context->getExtensions().eglImageExternalOES; case TextureType::VideoImage: return context->getExtensions().webglVideoTexture; default: @@ -593,7 +593,7 @@ bool ValidateES2CopyTexImageParameters(Context *context, return false; } - if (formatInfo.type == GL_FLOAT && !context->getExtensions().textureFloat) + if (formatInfo.type == GL_FLOAT && !context->getExtensions().textureFloatOES) { context->validationError(GL_INVALID_OPERATION, kInvalidFormat); return false; @@ -702,7 +702,7 @@ bool ValidateES2CopyTexImageParameters(Context *context, } break; case GL_ETC1_RGB8_OES: - if (context->getExtensions().compressedETC1RGB8Texture) + if (context->getExtensions().compressedETC1RGB8TextureOES) { context->validationError(GL_INVALID_OPERATION, kInvalidFormat); return false; @@ -776,7 +776,7 @@ bool ValidateES2CopyTexImageParameters(Context *context, case GL_DEPTH_STENCIL_OES: case GL_DEPTH24_STENCIL8_OES: if (context->getExtensions().depthTextureAny() || - context->getExtensions().packedDepthStencil) + context->getExtensions().packedDepthStencilOES) { context->validationError(GL_INVALID_OPERATION, kInvalidFormat); return false; @@ -872,13 +872,13 @@ bool ValidCap(const Context *context, GLenum cap, bool queryOnly) return context->getClientVersion() < Version(2, 0); case GL_POINT_SIZE_ARRAY_OES: return context->getClientVersion() < Version(2, 0) && - context->getExtensions().pointSizeArray; + context->getExtensions().pointSizeArrayOES; case GL_TEXTURE_CUBE_MAP: return context->getClientVersion() < Version(2, 0) && - context->getExtensions().textureCubeMap; + context->getExtensions().textureCubeMapOES; case GL_POINT_SPRITE_OES: return context->getClientVersion() < Version(2, 0) && - context->getExtensions().pointSprite; + context->getExtensions().pointSpriteOES; case GL_TEXTURE_RECTANGLE_ANGLE: return context->getExtensions().webglCompatibility; default: @@ -1427,7 +1427,7 @@ bool ValidateES2TexImageParametersBase(Context *context, break; case GL_FLOAT: case GL_HALF_FLOAT_OES: - if (!context->getExtensions().textureFloat) + if (!context->getExtensions().textureFloatOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -1596,7 +1596,7 @@ bool ValidateES2TexImageParametersBase(Context *context, } break; case GL_ETC1_RGB8_OES: - if (context->getExtensions().compressedETC1RGB8Texture) + if (context->getExtensions().compressedETC1RGB8TextureOES) { context->validationError(GL_INVALID_OPERATION, kInvalidFormat); return false; @@ -1656,7 +1656,7 @@ bool ValidateES2TexImageParametersBase(Context *context, case GL_DEPTH_COMPONENT: case GL_DEPTH_STENCIL_OES: if (!context->getExtensions().depthTextureANGLE && - !(context->getExtensions().packedDepthStencil && + !(context->getExtensions().packedDepthStencilOES && context->getExtensions().depthTextureOES)) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); @@ -1759,7 +1759,7 @@ bool ValidateES2TexImageParametersBase(Context *context, case GL_DEPTH_STENCIL: if (!(context->getExtensions().depthTextureANGLE || - context->getExtensions().packedDepthStencil)) + context->getExtensions().packedDepthStencilOES)) { context->validationError(GL_INVALID_ENUM, kInvalidFormat); return false; @@ -1832,7 +1832,7 @@ bool ValidateES2TexImageParametersBase(Context *context, if (type == GL_FLOAT) { - if (!context->getExtensions().textureFloat) + if (!context->getExtensions().textureFloatOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -1992,7 +1992,7 @@ bool ValidateES2TexStorageParameters(Context *context, return false; } - if (levels != 1 && !context->getExtensions().textureNPOT) + if (levels != 1 && !context->getExtensions().textureNPOTOES) { if (!gl::isPow2(width) || !gl::isPow2(height)) { @@ -2026,7 +2026,7 @@ bool ValidateES2TexStorageParameters(Context *context, } break; case GL_ETC1_RGB8_OES: - if (!context->getExtensions().compressedETC1RGB8Texture) + if (!context->getExtensions().compressedETC1RGB8TextureOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -2068,7 +2068,7 @@ bool ValidateES2TexStorageParameters(Context *context, case GL_ALPHA32F_EXT: case GL_LUMINANCE32F_EXT: case GL_LUMINANCE_ALPHA32F_EXT: - if (!context->getExtensions().textureFloat) + if (!context->getExtensions().textureFloatOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -2103,7 +2103,7 @@ bool ValidateES2TexStorageParameters(Context *context, break; case GL_R32F_EXT: case GL_RG32F_EXT: - if (!context->getExtensions().textureRG || !context->getExtensions().textureFloat) + if (!context->getExtensions().textureRG || !context->getExtensions().textureFloatOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -2133,7 +2133,7 @@ bool ValidateES2TexStorageParameters(Context *context, break; case GL_DEPTH24_STENCIL8_OES: if (!(context->getExtensions().depthTextureANGLE || - (context->getExtensions().packedDepthStencil && + (context->getExtensions().packedDepthStencilOES && context->getExtensions().textureStorage))) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); @@ -2144,7 +2144,7 @@ bool ValidateES2TexStorageParameters(Context *context, context->validationError(GL_INVALID_OPERATION, kInvalidTextureTarget); return false; } - if (!context->getExtensions().packedDepthStencil) + if (!context->getExtensions().packedDepthStencilOES) { // ANGLE_depth_texture only supports 1-level textures if (levels != 1) @@ -2205,7 +2205,7 @@ bool ValidateDiscardFramebufferEXT(Context *context, bool ValidateBindVertexArrayOES(Context *context, VertexArrayID array) { - if (!context->getExtensions().vertexArrayObject) + if (!context->getExtensions().vertexArrayObjectOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -2216,7 +2216,7 @@ bool ValidateBindVertexArrayOES(Context *context, VertexArrayID array) bool ValidateDeleteVertexArraysOES(Context *context, GLsizei n, const VertexArrayID *arrays) { - if (!context->getExtensions().vertexArrayObject) + if (!context->getExtensions().vertexArrayObjectOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -2227,7 +2227,7 @@ bool ValidateDeleteVertexArraysOES(Context *context, GLsizei n, const VertexArra bool ValidateGenVertexArraysOES(Context *context, GLsizei n, VertexArrayID *arrays) { - if (!context->getExtensions().vertexArrayObject) + if (!context->getExtensions().vertexArrayObjectOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -2238,7 +2238,7 @@ bool ValidateGenVertexArraysOES(Context *context, GLsizei n, VertexArrayID *arra bool ValidateIsVertexArrayOES(Context *context, VertexArrayID array) { - if (!context->getExtensions().vertexArrayObject) + if (!context->getExtensions().vertexArrayObjectOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -2253,7 +2253,7 @@ bool ValidateProgramBinaryOES(Context *context, const void *binary, GLint length) { - if (!context->getExtensions().getProgramBinary) + if (!context->getExtensions().getProgramBinaryOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -2269,7 +2269,7 @@ bool ValidateGetProgramBinaryOES(Context *context, GLenum *binaryFormat, void *binary) { - if (!context->getExtensions().getProgramBinary) + if (!context->getExtensions().getProgramBinaryOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -3276,7 +3276,7 @@ bool ValidateGetBufferPointervOES(Context *context, GLenum pname, void **params) { - if (!context->getExtensions().mapBuffer) + if (!context->getExtensions().mapBufferOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -3287,7 +3287,7 @@ bool ValidateGetBufferPointervOES(Context *context, bool ValidateMapBufferOES(Context *context, BufferBinding target, GLenum access) { - if (!context->getExtensions().mapBuffer) + if (!context->getExtensions().mapBufferOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -3324,7 +3324,7 @@ bool ValidateMapBufferOES(Context *context, BufferBinding target, GLenum access) bool ValidateUnmapBufferOES(Context *context, BufferBinding target) { - if (!context->getExtensions().mapBuffer) + if (!context->getExtensions().mapBufferOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -5859,7 +5859,7 @@ bool ValidateHint(Context *context, GLenum target, GLenum mode) case GL_FRAGMENT_SHADER_DERIVATIVE_HINT: if (context->getClientVersion() < ES_3_0 && - !context->getExtensions().standardDerivatives) + !context->getExtensions().standardDerivativesOES) { context->validationError(GL_INVALID_ENUM, kEnumNotSupported); return false; @@ -6483,7 +6483,7 @@ bool ValidateFramebufferTexture2D(Context *context, { // Attachments are required to be bound to level 0 without ES3 or the GL_OES_fbo_render_mipmap // extension - if (context->getClientMajorVersion() < 3 && !context->getExtensions().fboRenderMipmap && + if (context->getClientMajorVersion() < 3 && !context->getExtensions().fboRenderMipmapOES && level != 0) { context->validationError(GL_INVALID_VALUE, kInvalidFramebufferTextureLevel); @@ -6605,7 +6605,7 @@ bool ValidateFramebufferTexture3DOES(Context *context, // Attachments are required to be bound to level 0 without ES3 or the // GL_OES_fbo_render_mipmap extension - if (context->getClientMajorVersion() < 3 && !context->getExtensions().fboRenderMipmap && + if (context->getClientMajorVersion() < 3 && !context->getExtensions().fboRenderMipmapOES && level != 0) { context->validationError(GL_INVALID_VALUE, kInvalidFramebufferTextureLevel); @@ -6740,7 +6740,7 @@ bool ValidateGenerateMipmap(Context *context, TextureType target) } // Non-power of 2 ES2 check - if (context->getClientVersion() < Version(3, 0) && !context->getExtensions().textureNPOT && + if (context->getClientVersion() < Version(3, 0) && !context->getExtensions().textureNPOTOES && (!isPow2(static_cast(texture->getWidth(baseTarget, 0))) || !isPow2(static_cast(texture->getHeight(baseTarget, 0))))) { @@ -6981,7 +6981,7 @@ bool ValidateUseProgram(Context *context, ShaderProgramID program) bool ValidateDeleteFencesNV(Context *context, GLsizei n, const FenceNVID *fences) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -6998,7 +6998,7 @@ bool ValidateDeleteFencesNV(Context *context, GLsizei n, const FenceNVID *fences bool ValidateFinishFenceNV(Context *context, FenceNVID fence) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -7023,7 +7023,7 @@ bool ValidateFinishFenceNV(Context *context, FenceNVID fence) bool ValidateGenFencesNV(Context *context, GLsizei n, FenceNVID *fences) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -7040,7 +7040,7 @@ bool ValidateGenFencesNV(Context *context, GLsizei n, FenceNVID *fences) bool ValidateGetFenceivNV(Context *context, FenceNVID fence, GLenum pname, GLint *params) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -7116,7 +7116,7 @@ bool ValidateGetTranslatedShaderSourceANGLE(Context *context, bool ValidateIsFenceNV(Context *context, FenceNVID fence) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -7127,7 +7127,7 @@ bool ValidateIsFenceNV(Context *context, FenceNVID fence) bool ValidateSetFenceNV(Context *context, FenceNVID fence, GLenum condition) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -7152,7 +7152,7 @@ bool ValidateSetFenceNV(Context *context, FenceNVID fence, GLenum condition) bool ValidateTestFenceNV(Context *context, FenceNVID fence) { - if (!context->getExtensions().fence) + if (!context->getExtensions().fenceNV) { context->validationError(GL_INVALID_OPERATION, kNVFenceNotSupported); return false; @@ -7535,13 +7535,13 @@ void RecordBindTextureTypeError(Context *context, TextureType target) break; case TextureType::_2DMultisampleArray: - ASSERT(!context->getExtensions().textureStorageMultisample2DArray); + ASSERT(!context->getExtensions().textureStorageMultisample2DArrayOES); context->validationError(GL_INVALID_ENUM, kMultisampleArrayExtensionRequired); break; case TextureType::External: - ASSERT(!context->getExtensions().eglImageExternal && - !context->getExtensions().eglStreamConsumerExternal); + ASSERT(!context->getExtensions().eglImageExternalOES && + !context->getExtensions().eglStreamConsumerExternalNV); context->validationError(GL_INVALID_ENUM, kExternalTextureNotSupported); break; diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp index ea077ae60..e8622a337 100644 --- a/src/libANGLE/validationES3.cpp +++ b/src/libANGLE/validationES3.cpp @@ -2550,7 +2550,7 @@ bool ValidateGetBufferPointervRobustANGLE(Context *context, GLsizei numParams = 0; - if (context->getClientMajorVersion() < 3 && !context->getExtensions().mapBuffer) + if (context->getClientMajorVersion() < 3 && !context->getExtensions().mapBufferOES) { context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); return false; @@ -3090,7 +3090,7 @@ bool ValidateGetSynciv(Context *context, GLsizei *length, GLint *values) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; @@ -3977,7 +3977,7 @@ bool ValidateDrawArraysInstanced(Context *context, bool ValidateFenceSync(Context *context, GLenum condition, GLbitfield flags) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; @@ -4000,7 +4000,7 @@ bool ValidateFenceSync(Context *context, GLenum condition, GLbitfield flags) bool ValidateIsSync(Context *context, GLsync sync) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; @@ -4011,7 +4011,7 @@ bool ValidateIsSync(Context *context, GLsync sync) bool ValidateDeleteSync(Context *context, GLsync sync) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; @@ -4028,7 +4028,7 @@ bool ValidateDeleteSync(Context *context, GLsync sync) bool ValidateClientWaitSync(Context *context, GLsync sync, GLbitfield flags, GLuint64 timeout) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; @@ -4052,7 +4052,7 @@ bool ValidateClientWaitSync(Context *context, GLsync sync, GLbitfield flags, GLu bool ValidateWaitSync(Context *context, GLsync sync, GLbitfield flags, GLuint64 timeout) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; @@ -4082,7 +4082,7 @@ bool ValidateWaitSync(Context *context, GLsync sync, GLbitfield flags, GLuint64 bool ValidateGetInteger64v(Context *context, GLenum pname, GLint64 *params) { - if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSync) + if ((context->getClientMajorVersion() < 3) && !context->getExtensions().glSyncARB) { context->validationError(GL_INVALID_OPERATION, kES3Required); return false; diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp index 5100f97ca..bbf836107 100644 --- a/src/libANGLE/validationES31.cpp +++ b/src/libANGLE/validationES31.cpp @@ -1875,7 +1875,7 @@ bool ValidateTexStorage3DMultisampleOES(Context *context, GLsizei depth, GLboolean fixedsamplelocations) { - if (!context->getExtensions().textureStorageMultisample2DArray) + if (!context->getExtensions().textureStorageMultisample2DArrayOES) { context->validationError(GL_INVALID_ENUM, kMultisampleArrayExtensionRequired); return false;