Commit ad55bdbe by Alexey Knyazev Committed by Commit Bot

GL: Align emulated ETC1 handling with other backends

Use emulatedEtc1 limitation to hide it from WebGL. Bug: chromium:1048244 Change-Id: Id2fd6b5d934f3caeb455e8f0fc198445e8c00084 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2803136Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
parent b5a71140
...@@ -349,7 +349,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() ...@@ -349,7 +349,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, ExtAndVersionOrExt("GL_EXT_texture_compression_s3tc", 2, 1, "GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(), NeverSupported() ); InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, ExtAndVersionOrExt("GL_EXT_texture_compression_s3tc", 2, 1, "GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(), NeverSupported() );
// From GL_OES_compressed_ETC1_RGB8_texture // From GL_OES_compressed_ETC1_RGB8_texture
InsertFormatMapping(&map, GL_ETC1_RGB8_OES, NeverSupported(), NeverSupported(), NeverSupported(), VersionOrExts(3, 0, "GL_OES_compressed_ETC1_RGB8_texture"), AlwaysSupported(), NeverSupported(), NeverSupported() ); InsertFormatMapping(&map, GL_ETC1_RGB8_OES, VersionOrExts(4, 3, "GL_ARB_ES3_compatibility"), AlwaysSupported(), NeverSupported(), VersionOrExts(3, 0, "GL_OES_compressed_ETC1_RGB8_texture"), AlwaysSupported(), NeverSupported(), NeverSupported() );
// From GL_OES_texture_compression_astc // From GL_OES_texture_compression_astc
// | Format | OpenGL texture | Filter | Render | OpenGL ES texture support | Filter | ES attachment | ES renderbuffer | // | Format | OpenGL texture | Filter | Render | OpenGL ES texture support | Filter | ES attachment | ES renderbuffer |
......
...@@ -1679,6 +1679,11 @@ void GenerateCaps(const FunctionsGL *functions, ...@@ -1679,6 +1679,11 @@ void GenerateCaps(const FunctionsGL *functions,
(features.allowEtcFormats.enabled || functions->standard == STANDARD_GL_ES) && (features.allowEtcFormats.enabled || functions->standard == STANDARD_GL_ES) &&
gl::DetermineCompressedTextureETCSupport(*textureCapsMap); gl::DetermineCompressedTextureETCSupport(*textureCapsMap);
// When running on top of desktop OpenGL drivers and allow_etc_formats feature is not enabled,
// mark ETC1 as emulated to hide it from WebGL clients.
limitations->emulatedEtc1 =
!features.allowEtcFormats.enabled && functions->standard == STANDARD_GL_DESKTOP;
// To work around broken unsized sRGB textures, sized sRGB textures are used. Disable EXT_sRGB // To work around broken unsized sRGB textures, sized sRGB textures are used. Disable EXT_sRGB
// if those formats are not available. // if those formats are not available.
if (features.unsizedsRGBReadPixelsDoesntTransform.enabled && if (features.unsizedsRGBReadPixelsDoesntTransform.enabled &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment