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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2496813002: [Command buffer] workaround the framebuffer completeness bug for Intel Mac (Closed)
Patch Set: apply the workaround to all Mac vendors, not only Mac Intel Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 7524 matching lines...) Expand 10 before | Expand all | Expand 10 after
7535 GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) { 7535 GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) {
7536 Framebuffer* framebuffer = 7536 Framebuffer* framebuffer =
7537 GetFramebufferInfoForTarget(target); 7537 GetFramebufferInfoForTarget(target);
7538 if (!framebuffer) { 7538 if (!framebuffer) {
7539 return GL_FRAMEBUFFER_COMPLETE; 7539 return GL_FRAMEBUFFER_COMPLETE;
7540 } 7540 }
7541 GLenum completeness = framebuffer->IsPossiblyComplete(feature_info_.get()); 7541 GLenum completeness = framebuffer->IsPossiblyComplete(feature_info_.get());
7542 if (completeness != GL_FRAMEBUFFER_COMPLETE) { 7542 if (completeness != GL_FRAMEBUFFER_COMPLETE) {
7543 return completeness; 7543 return completeness;
7544 } 7544 }
7545
7546 if (workarounds().adjust_framebuffer_complete_status &&
7547 SupportsDrawBuffers()) {
7548 switch (target) {
7549 case GL_READ_FRAMEBUFFER:
7550 if (framebuffer->ReadBufferHasNoImage() &&
7551 framebuffer->ColorBuffersHaveImage()) {
7552 return GL_FRAMEBUFFER_COMPLETE;
7553 }
7554 break;
7555 case GL_DRAW_FRAMEBUFFER:
7556 case GL_FRAMEBUFFER:
7557 if (framebuffer->DrawBuffersHaveNoImage() &&
7558 framebuffer->ColorBuffersHaveImage()) {
7559 return GL_FRAMEBUFFER_COMPLETE;
7560 }
7561 break;
7562 default:
7563 NOTREACHED();
7564 break;
7565 }
7566 }
7567
7545 return framebuffer->GetStatus(texture_manager(), target); 7568 return framebuffer->GetStatus(texture_manager(), target);
7546 } 7569 }
7547 7570
7548 void GLES2DecoderImpl::DoFramebufferTexture2D( 7571 void GLES2DecoderImpl::DoFramebufferTexture2D(
7549 GLenum target, GLenum attachment, GLenum textarget, 7572 GLenum target, GLenum attachment, GLenum textarget,
7550 GLuint client_texture_id, GLint level) { 7573 GLuint client_texture_id, GLint level) {
7551 DoFramebufferTexture2DCommon( 7574 DoFramebufferTexture2DCommon(
7552 "glFramebufferTexture2D", target, attachment, 7575 "glFramebufferTexture2D", target, attachment,
7553 textarget, client_texture_id, level, 0); 7576 textarget, client_texture_id, level, 0);
7554 } 7577 }
(...skipping 11290 matching lines...) Expand 10 before | Expand all | Expand 10 after
18845 } 18868 }
18846 18869
18847 // Include the auto-generated part of this file. We split this because it means 18870 // Include the auto-generated part of this file. We split this because it means
18848 // we can easily edit the non-auto generated parts right here in this file 18871 // we can easily edit the non-auto generated parts right here in this file
18849 // instead of having to edit some template or the code generator. 18872 // instead of having to edit some template or the code generator.
18850 #include "base/macros.h" 18873 #include "base/macros.h"
18851 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18874 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18852 18875
18853 } // namespace gles2 18876 } // namespace gles2
18854 } // namespace gpu 18877 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698