[Mesa-dev] FBO read / draw completeness.

Henri Verbeet hverbeet at gmail.com
Fri Apr 22 05:19:04 PDT 2011


Hi,

A while ago we talked on IRC about the FBO completeness rules for read
/ draw FBOs.

The specific bug that triggered that was that Mesa only applies
ReadBuffer() calls to the read FBO and DrawBuffers() to the draw FBO.
This means that if you're trying to do a depth blit using
BlitFramebuffer() (and set both the read and draw buffers to NONE),
you're going to get an incomplete draw buffer on the read fbo, and an
incomplete read buffer on the draw FBO, because both of those are
still set to the default COLOR_ATTACHMENT0.

The other, somewhat more hypothetical example was doing a
BlitFrambuffer() from a read FBO with just a COLOR0 attachment to the
second attachment of a draw FBO with both COLOR0 and COLOR1
attachments. This would currently work, but more by accident than
anything else.

I think the things that came out of that conversation were the following:
  - ARB_ES2_compatibility / GL4.1 will make all of this just go away
by ignoring read / draw buffers for FBO completeness.
  - Just applying ReadBuffer() and DrawBuffers() to both FBOs will fix
the first case, but break the second.
  - The behaviour we'd like would be to ignore the read buffer for
draw FBO completeness, and ignore the draw buffers for read FBO
completeness.

What I'm unsure about is if you thought the spec currently agrees with
what we want (where?), or if this would require a fix to the spec.


More information about the mesa-dev mailing list