| Index: gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc b/gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc
|
| index aa3adba67e7b71a11b3ece250506d2d52e037fdd..b26d3353aaefac554784cbe5772ed6170c8dba29 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc
|
| @@ -162,13 +162,13 @@ void CopyTexImageResourceManager::DoCopyTexImage2DToLUMACompatibilityTexture(
|
| feature_info_.get(), internal_format);
|
| glTexImage2D(dest_target, level, adjusted_internal_format, width, height, 0,
|
| adjusted_format, luma_type, nullptr);
|
| - DoCopyTexSubImage2DToLUMACompatibilityTexture(
|
| + DoCopyTexSubImageToLUMACompatibilityTexture(
|
| decoder, dest_texture, dest_texture_target, dest_target, luma_format,
|
| - luma_type, level, 0, 0, x, y, width, height, source_framebuffer,
|
| + luma_type, level, 0, 0, 0, x, y, width, height, source_framebuffer,
|
| source_framebuffer_internal_format);
|
| }
|
|
|
| -void CopyTexImageResourceManager::DoCopyTexSubImage2DToLUMACompatibilityTexture(
|
| +void CopyTexImageResourceManager::DoCopyTexSubImageToLUMACompatibilityTexture(
|
| const gles2::GLES2Decoder* decoder,
|
| GLuint dest_texture,
|
| GLenum dest_texture_target,
|
| @@ -178,6 +178,7 @@ void CopyTexImageResourceManager::DoCopyTexSubImage2DToLUMACompatibilityTexture(
|
| GLint level,
|
| GLint xoffset,
|
| GLint yoffset,
|
| + GLint zoffset,
|
| GLint x,
|
| GLint y,
|
| GLsizei width,
|
| @@ -241,8 +242,13 @@ void CopyTexImageResourceManager::DoCopyTexSubImage2DToLUMACompatibilityTexture(
|
|
|
| // Finally, copy the swizzled texture to the destination texture
|
| glBindTexture(dest_texture_target, dest_texture);
|
| - glCopyTexSubImage2D(dest_target, level, xoffset, yoffset, 0, 0, width,
|
| - height);
|
| + if (dest_target == GL_TEXTURE_3D || dest_target == GL_TEXTURE_2D_ARRAY) {
|
| + glCopyTexSubImage3D(dest_target, level, xoffset, yoffset, zoffset,
|
| + 0, 0, width, height);
|
| + } else {
|
| + glCopyTexSubImage2D(dest_target, level, xoffset, yoffset,
|
| + 0, 0, width, height);
|
| + }
|
|
|
| // Restore state
|
| decoder->RestoreAllAttributes();
|
|
|