intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.
authorEric Anholt <eric@anholt.net>
Tue, 4 Jan 2011 17:57:21 +0000 (09:57 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 4 Jan 2011 18:04:15 +0000 (10:04 -0800)
commit0ea49380e20bdf76cd0e434d3d431ca9f526f1f1
treed2a50a6a3b00bc170033be3517375e9a3ed9350f
parentcd1cf788280a1eb10d54e1a2b8b069ed7b89c724
intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.

The _ColorDrawBuffers is a piece of computed state that gets for the
current draw/read buffers at _mesa_update_state time.  However, this
function actually gets used for non-current draw/read buffers when
checking if an FBO is complete from the driver's perspective.  So,
instead of trying to just look at the attachment points that are
currently referenced by glDrawBuffers, look at all attachment points
to see if they're driver-supported formats.  This appears to actually
be more in line with the intent of the spec, too.

Fixes a segfault in my upcoming fbo-clear-formats piglit test, and
hopefully bug #30278
src/mesa/drivers/dri/intel/intel_fbo.c