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

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: suppress webgl 2 expectation, 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 06457f1914c7132c1d3504c6b7905cb6b7dd2081..dce5dc1fbfa8a7093eec3caedb8a9009f6421277 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8010,12 +8010,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;
}
@@ -8052,6 +8054,8 @@ void GLES2DecoderImpl::DoBlitFramebufferCHROMIUM(
}
}
}
+ if (draw_framebuffer && !draw_buffer_has_image)
Zhenyao Mo 2016/12/16 23:50:31 You can't return early here. DEPTH and STENCIL mi
yunchao 2016/12/19 03:20:08 You are correct. I made a mistake here. The code h
+ return;
}
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