From 3f2277869057d588919cfe4122967e701894db5b Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Thu, 10 Jul 2014 19:50:51 +0000 Subject: Revert 282393 "Do not call glDrawBuffersARB when the extension i..." Broke gpu_unittests FramebufferInfoTest.DrawBuffers: [ RUN ] FramebufferInfoTest.DrawBuffers ../../gpu/command_buffer/service/framebuffer_manager_unittest.cc:653: Failure Actual function call count doesn't match EXPECT_CALL(*gl_, DrawBuffersARB(kMaxDrawBuffers, _))... Expected: to be called once Actual: never called - unsatisfied and active ../../gpu/command_buffer/service/framebuffer_manager_unittest.cc:657: Failure Actual function call count doesn't match EXPECT_CALL(*gl_, DrawBuffersARB(kMaxDrawBuffers, _))... Expected: to be called once Actual: never called - unsatisfied and active [ FAILED ] FramebufferInfoTest.DrawBuffers (1 ms) > Do not call glDrawBuffersARB when the extension is absent > > The function Framebuffer::ChangeDrawBuffersHelper was assuming > that binding of an FBO with no GL_COLOR_ATTACHMENT0 was > accompanied by setting the first draw buffer to GL_NONE with > glDrawBuffersARB in the fix introduced in: > https://codereview.chromium.org/315283002 > > When the extension is not present, it can be assumed that the > glDrawBuffersARB state need not be set and restored. > > BUG=(wrangling) > NOTRY=True > > Review URL: https://codereview.chromium.org/375413003 TBR=ccameron@chromium.org Review URL: https://codereview.chromium.org/382003004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282402 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/service/framebuffer_manager.cc | 5 ----- gpu/command_buffer/service/gles2_cmd_decoder.cc | 1 - 2 files changed, 6 deletions(-) (limited to 'gpu') diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc index e1426c7..4022b3d 100644 --- a/gpu/command_buffer/service/framebuffer_manager.cc +++ b/gpu/command_buffer/service/framebuffer_manager.cc @@ -374,11 +374,6 @@ bool Framebuffer::HasUnclearedColorAttachments() const { } void Framebuffer::ChangeDrawBuffersHelper(bool recover) const { - // There will always be only one buffer, GL_COLOR_ATTACHMENT0, if - // GL_ARB_draw_buffers is not present, even if this FBO has no attachment. - if (!gfx::g_driver_gl.ext.b_GL_ARB_draw_buffers) - return; - scoped_ptr buffers(new GLenum[manager_->max_draw_buffers_]); for (uint32 i = 0; i < manager_->max_draw_buffers_; ++i) buffers[i] = GL_NONE; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 89a9de8..cbbbe3f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -3122,7 +3122,6 @@ bool GLES2DecoderImpl::CheckFramebufferValid( bool reset_draw_buffer = false; if ((backbuffer_needs_clear_bits_ | GL_COLOR_BUFFER_BIT) != 0 && group_->draw_buffer() == GL_NONE) { - DCHECK(gfx::g_driver_gl.ext.b_GL_ARB_draw_buffers); reset_draw_buffer = true; GLenum buf = GL_BACK; if (GetBackbufferServiceId() != 0) // emulated backbuffer -- cgit v1.1