vc4: Don't try to do stores to buffers that aren't bound.
authorEric Anholt <eric@anholt.net>
Mon, 29 Sep 2014 22:58:15 +0000 (15:58 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 30 Sep 2014 00:44:15 +0000 (17:44 -0700)
commit4ceaad14fffed769e04a697afd24f6660b0980b2
treef175bcf98dbd70f624ec66f8a4fc3bb8c5c42643
parent1d42aa83580df270f53ab3a4e6b78e172107ee5f
vc4: Don't try to do stores to buffers that aren't bound.

The code was kind of mixed up what buffers were getting stored in the case
that a resolve bit was unset (which are set based on the GL state at draw
time) and the buffer wasn't actually bound.  In particular, depth-only
rendering would store the color buffer contents, which happen to be
pointing at the depth buffer.

Thanks to clearing out the resolve bits for things we really can't
resolve, now I can drop the safety checks for buffer presence around the
actual stores.

Fixes 42 piglit tests.
src/gallium/drivers/vc4/vc4_context.c