Commit dd9e6396 by Corentin Wallez Committed by Commit Bot

BlitGL: handle copyTexImage3D for the luma workaround

BUG=angleproject:1492 Change-Id: Ica9a7c72f0e463850dd93f4a15d9b572fb10a1f6 Reviewed-on: https://chromium-review.googlesource.com/412054Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 555009ce
...@@ -199,8 +199,17 @@ gl::Error BlitGL::copySubImageToLUMAWorkaroundTexture(GLuint texture, ...@@ -199,8 +199,17 @@ gl::Error BlitGL::copySubImageToLUMAWorkaroundTexture(GLuint texture,
// Copy the swizzled texture to the destination texture // Copy the swizzled texture to the destination texture
mStateManager->bindTexture(textureType, texture); mStateManager->bindTexture(textureType, texture);
mFunctions->copyTexSubImage2D(target, static_cast<GLint>(level), destOffset.x, destOffset.y, 0,
0, sourceArea.width, sourceArea.height); if (target == GL_TEXTURE_3D || target == GL_TEXTURE_2D_ARRAY)
{
mFunctions->copyTexSubImage3D(target, static_cast<GLint>(level), destOffset.x, destOffset.y,
destOffset.z, 0, 0, sourceArea.width, sourceArea.height);
}
else
{
mFunctions->copyTexSubImage2D(target, static_cast<GLint>(level), destOffset.x, destOffset.y,
0, 0, sourceArea.width, sourceArea.height);
}
// Finally orphan the scratch textures so they can be GCed by the driver. // Finally orphan the scratch textures so they can be GCed by the driver.
orphanScratchTextures(); orphanScratchTextures();
......
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