GL: Work around Qualcomm sRGB ReadPixels driver bug.
When calling glReadPixels on unsized sRGB textures, the data returned is
not linearized. Using sized sRGB formats works around this problem.
Fix SRGBTextureTest assuming that unsized SRGB formats work in ES3.
BUG=angleproject:2977
Change-Id: I413c888ca0c3564ecdc364f3ea693e75ed4f8d6d
Reviewed-on: https://chromium-review.googlesource.com/c/1343138
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 3e7acb9..2dba883 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -3231,6 +3231,12 @@
supportedExtensions.maxViews = 1u;
supportedExtensions.copyTexture3d = false;
supportedExtensions.textureMultisample = false;
+
+ // Don't expose GL_EXT_texture_sRGB_decode without sRGB texture support
+ if (!supportedExtensions.sRGB)
+ {
+ supportedExtensions.textureSRGBDecode = false;
+ }
}
if (getClientVersion() < ES_3_1)