Commit ec9ff8ce by Geoff Lang Committed by Commit Bot

Fix checks for GL_ETC1_RGB8_OES, disable it on D3D11.

The GL backend was checking the wrong extension for GL_ETC1_RGB8_OES. WebGL doesn't want to expose compressed formats that are emulated, disable this format in D3D11 where it is always emulated. BUG=98314 Change-Id: I1ba8418ad1578c070891828b87e49cf894dabc29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700574Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent c4c48b65
...@@ -1585,6 +1585,11 @@ void GenerateCaps(ID3D11Device *device, ...@@ -1585,6 +1585,11 @@ void GenerateCaps(ID3D11Device *device,
// GL extension support // GL extension support
extensions->setTextureExtensionSupport(*textureCapsMap); extensions->setTextureExtensionSupport(*textureCapsMap);
// 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->elementIndexUint = true; extensions->elementIndexUint = true;
extensions->getProgramBinary = true; extensions->getProgramBinary = true;
extensions->rgb8rgba8 = true; extensions->rgb8rgba8 = true;
......
...@@ -306,9 +306,9 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() ...@@ -306,9 +306,9 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
// From GL_ANGLE_texture_compression_dxt5 // From GL_ANGLE_texture_compression_dxt5
InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, ExtsOnly("GL_EXT_texture_compression_s3tc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_ANGLE_texture_compression_dxt5"), AlwaysSupported(), NeverSupported(), NeverSupported() ); InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, ExtsOnly("GL_EXT_texture_compression_s3tc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_ANGLE_texture_compression_dxt5"), AlwaysSupported(), NeverSupported(), NeverSupported() );
// From GL_ETC1_RGB8_OES // From GL_OES_compressed_ETC1_RGB8_texture
InsertFormatMapping(&map, GL_ETC1_RGB8_OES, VersionOrExts(4, 3, "GL_ARB_ES3_compatibility"), AlwaysSupported(), NeverSupported(), VersionOrExts(3, 0, "GL_ETC1_RGB8_OES"), 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 |
InsertFormatMapping(&map, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, NeverSupported(), NeverSupported(), NeverSupported(), ExtsOnly("GL_KHR_texture_compression_astc_ldr"), AlwaysSupported(), NeverSupported(), NeverSupported()); InsertFormatMapping(&map, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, NeverSupported(), NeverSupported(), NeverSupported(), ExtsOnly("GL_KHR_texture_compression_astc_ldr"), AlwaysSupported(), NeverSupported(), NeverSupported());
......
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