Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2241593003: [Command buffer] CopyTexSubImage3D: emulate unsized format in desktop core profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed zmo@'s feedback Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index fe989b84063e61c99f06e0d44e9079a89a4d3450..baa34130daaa44969f27536f49519f6c7b16685d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -13009,9 +13009,9 @@ void GLES2DecoderImpl::DoCopyTexImage2D(
GLint destX = dx;
GLint destY = dy;
if (requires_luma_blit) {
- copy_tex_image_blit_->DoCopyTexSubImage2DToLUMACompatibilityTexture(
+ copy_tex_image_blit_->DoCopyTexSubImageToLUMACompatibilityTexture(
this, texture->service_id(), texture->target(), target, format,
- type, level, destX, destY, copyX, copyY, copyWidth, copyHeight,
+ type, level, destX, destY, 0, copyX, copyY, copyWidth, copyHeight,
GetBoundReadFrameBufferServiceId(),
GetBoundReadFrameBufferInternalFormat());
} else {
@@ -13183,9 +13183,10 @@ void GLES2DecoderImpl::DoCopyTexSubImage2D(
if (!InitializeCopyTexImageBlitter("glCopyTexSubImage2D")) {
return;
}
- copy_tex_image_blit_->DoCopyTexSubImage2DToLUMACompatibilityTexture(
+ copy_tex_image_blit_->DoCopyTexSubImageToLUMACompatibilityTexture(
this, texture->service_id(), texture->target(), target,
- internal_format, type, level, xoffset, yoffset, x, y, width, height,
+ internal_format, type, level, destX, destY, 0,
+ copyX, copyY, copyWidth, copyHeight,
GetBoundReadFrameBufferServiceId(),
GetBoundReadFrameBufferInternalFormat());
} else {
@@ -13272,12 +13273,22 @@ void GLES2DecoderImpl::DoCopyTexSubImage3D(
DCHECK(texture->IsLevelCleared(target, level));
}
- // TODO(yunchao): Follow-up CLs are necessary. For instance:
- // 1. emulation of unsized formats in core profile
-
if (copyHeight > 0 && copyWidth > 0) {
- glCopyTexSubImage3D(target, level, destX, destY, zoffset,
- copyX, copyY, copyWidth, copyHeight);
+ if (CopyTexImageResourceManager::CopyTexImageRequiresBlit(
+ feature_info_.get(), internal_format)) {
+ if (!InitializeCopyTexImageBlitter(func_name)) {
+ return;
+ }
+ copy_tex_image_blit_->DoCopyTexSubImageToLUMACompatibilityTexture(
+ this, texture->service_id(), texture->target(), target,
+ internal_format, type, level, destX, destY, zoffset,
+ copyX, copyY, copyWidth, copyHeight,
+ GetBoundReadFrameBufferServiceId(),
+ GetBoundReadFrameBufferInternalFormat());
+ } else {
+ glCopyTexSubImage3D(target, level, destX, destY, zoffset,
+ copyX, copyY, copyWidth, copyHeight);
+ }
}
// This may be a slow command. Exit command processing to allow for
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698