Commit 1ca0c2a9 by Kenneth Russell Committed by Commit Bot

Populate LevelInfoGL's format/internalFormat in eglBindTexImage.

Previously GL_NONE were being used, causing nativegl::SupportsNativeRendering to think the bound texture wasn't renderable, and TextureGL::copySubTextureHelper (called via CopyTexSubImageCHROMIUM) to use CPU readback. This affected the WebGL DrawingBuffer's premultiplyAlpha:false code path. Thanks to geofflang@ for the patch. Bug: chromium:1136613 Change-Id: Iee650156983f880fa802b3a17d3989f5a9322e91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2472535Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent 1e435d07
......@@ -1338,9 +1338,10 @@ angle::Result TextureGL::bindTexImage(const gl::Context *context, egl::Surface *
SurfaceGL *surfaceGL = GetImplAs<SurfaceGL>(surface);
const gl::Format &surfaceFormat = surface->getBindTexImageFormat();
setLevelInfo(context, getType(), 0, 1,
LevelInfoGL(GL_NONE, GL_NONE, false, LUMAWorkaroundGL(),
surfaceGL->hasEmulatedAlphaChannel()));
LevelInfoGL(surfaceFormat.info->format, surfaceFormat.info->internalFormat, false,
LUMAWorkaroundGL(), surfaceGL->hasEmulatedAlphaChannel()));
return angle::Result::Continue;
}
......
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