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

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

Issue 2581973002: [Command buffer]: Don't blit color buffer if draw buffers have no image during blitting (Closed)
Patch Set: code rebase Created 4 years 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 | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('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 a9e5d3cca66e2cf94e7a502e326aa5882db161bf..e0cf57f0fa4745d92672dc63aafa542f7047e06e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8015,12 +8015,14 @@ void GLES2DecoderImpl::DoBlitFramebufferCHROMIUM(
const Framebuffer::Attachment* read_buffer =
is_feedback_loop == FeedbackLoopUnknown ?
read_framebuffer->GetReadBufferAttachment() : nullptr;
+ bool draw_buffer_has_image = false;
for (uint32_t ii = 0; ii < group_->max_draw_buffers(); ++ii) {
GLenum dst_format = GetBoundColorDrawBufferInternalFormat(
static_cast<GLint>(ii));
GLenum dst_type = GetBoundColorDrawBufferType(static_cast<GLint>(ii));
if (dst_format == 0)
continue;
+ draw_buffer_has_image = true;
if (!src_internal_format) {
read_framebuffer_miss_image = true;
}
@@ -8057,6 +8059,8 @@ void GLES2DecoderImpl::DoBlitFramebufferCHROMIUM(
}
}
}
+ if (draw_framebuffer && !draw_buffer_has_image)
+ mask_blit &= ~GL_COLOR_BUFFER_BIT;
}
if (is_feedback_loop == FeedbackLoopTrue) {
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name,
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698