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

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

Issue 448223002: Only switch draw buffers if the extension is supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 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 | « no previous file | 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 8d3358757aa7a50c07391d23edb6e9a6cfd70b7a..b226c922e421a5c0b920117643e3e455d999bd16 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -5085,7 +5085,8 @@ void GLES2DecoderImpl::ClearUnclearedAttachments(
1.0f);
state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
clear_bits |= GL_COLOR_BUFFER_BIT;
- framebuffer->PrepareDrawBuffersForClear();
+ if (feature_info_->feature_flags().ext_draw_buffers)
+ framebuffer->PrepareDrawBuffersForClear();
}
if (framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT) ||
@@ -5106,7 +5107,8 @@ void GLES2DecoderImpl::ClearUnclearedAttachments(
state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
glClear(clear_bits);
- if ((clear_bits | GL_COLOR_BUFFER_BIT) != 0)
+ if ((clear_bits | GL_COLOR_BUFFER_BIT) != 0 &&
+ feature_info_->feature_flags().ext_draw_buffers)
framebuffer->RestoreDrawBuffersAfterClear();
framebuffer_manager()->MarkAttachmentsAsCleared(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698