Commit 8db211bc by Jonah Ryan-Davis Committed by Commit Bot

Fix CopyTexture to support GL_LUMINANCE/ALPHA/LUMINANCE_ALPHA

A few WebGL tests were failing on Linux/NVIDIA/passthrough because the luminance workaround doesn't handle the case where the destination texture is a luminance texture. For now, fallback to CPU readback in this case. Bug: chromium:773861 Change-Id: I1b85edccc2e257a5fa19cd496d86443ba96e07ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695922 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent fba3e64e
...@@ -815,7 +815,11 @@ angle::Result TextureGL::copySubTextureHelper(const gl::Context *context, ...@@ -815,7 +815,11 @@ angle::Result TextureGL::copySubTextureHelper(const gl::Context *context,
// Check if the destination is renderable and copy on the GPU // Check if the destination is renderable and copy on the GPU
const LevelInfoGL &destLevelInfo = getLevelInfo(target, level); const LevelInfoGL &destLevelInfo = getLevelInfo(target, level);
if (!destSRGB && // todo(jonahr): http://crbug.com/773861
// Behavior for now is to fallback to CPU readback implementation if the destination texture
// is a luminance format. The correct solution is to handle both source and destination in the
// luma workaround.
if (!destSRGB && !destLevelInfo.lumaWorkaround.enabled &&
nativegl::SupportsNativeRendering(functions, getType(), destLevelInfo.nativeInternalFormat)) nativegl::SupportsNativeRendering(functions, getType(), destLevelInfo.nativeInternalFormat))
{ {
bool copySucceeded = false; bool copySucceeded = false;
......
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