Commit 60a396a8 by Jonah Ryan-Davis Committed by Commit Bot

Reset texture swizzle state to default after LUMA workaround

The copySubImage LUMA workaround sets special TEXTURE_SWIZZLE_RGBA values to work. However, it must reset this parameter back to the default state after the workaround completes. Bug: 1022080 Change-Id: I84870f1264311c106ebece1e6a37d5f92a1da28c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904627Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
parent 50919254
...@@ -1048,6 +1048,9 @@ angle::Result BlitGL::orphanScratchTextures(const gl::Context *context) ...@@ -1048,6 +1048,9 @@ angle::Result BlitGL::orphanScratchTextures(const gl::Context *context)
gl::PixelUnpackState unpack; gl::PixelUnpackState unpack;
mStateManager->setPixelUnpackState(unpack); mStateManager->setPixelUnpackState(unpack);
mStateManager->setPixelUnpackBuffer(nullptr); mStateManager->setPixelUnpackBuffer(nullptr);
GLint swizzle[4] = {GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA};
ANGLE_GL_TRY(context,
mFunctions->texParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle));
ANGLE_GL_TRY(context, mFunctions->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA, ANGLE_GL_TRY(context, mFunctions->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA,
GL_UNSIGNED_BYTE, nullptr)); GL_UNSIGNED_BYTE, nullptr));
} }
......
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