diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc index 9d0d0e3780442..056fccec70145 100644 --- a/gpu/command_buffer/service/framebuffer_manager.cc +++ b/gpu/command_buffer/service/framebuffer_manager.cc @@ -467,6 +467,21 @@ void Framebuffer::ClearUnclearedIntRenderbufferAttachments( DCHECK_GT(GL_COLOR_ATTACHMENT0 + manager_->max_draw_buffers_, attaching_point); GLint drawbuffer = it->first - GL_COLOR_ATTACHMENT0; + // POC INSTRUMENTATION: log the actual DRAW_BUFFERi state so we can + // observe whether glClearBuffer*iv targets a NONE draw buffer (no-op). + { + GLint cur_draw_buf = -1; + glGetIntegerv(GL_DRAW_BUFFER0 + drawbuffer, &cur_draw_buf); + LOG(ERROR) << "[POC] ClearUnclearedIntRenderbufferAttachments: " + << "attachment=COLOR_ATTACHMENT" << drawbuffer + << " glClearBuffer*iv(GL_COLOR, " << drawbuffer << ", 0)" + << " DRAW_BUFFER" << drawbuffer << "=0x" << std::hex + << cur_draw_buf << std::dec + << (cur_draw_buf == GL_NONE + ? " (GL_NONE -> CLEAR IS NO-OP, but SetCleared(true)" + " runs => UNINITIALIZED DATA DISCLOSURE)" + : ""); + } if (GLES2Util::IsUnsignedIntegerFormat(internal_format)) { const GLuint kZero[] = { 0u, 0u, 0u, 0u }; glClearBufferuiv(GL_COLOR, drawbuffer, kZero);