softpipe: Grab a ref when the fb is set.
authorBrian Paul <brianp@vmware.com>
Tue, 29 Sep 2009 14:21:54 +0000 (08:21 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 29 Sep 2009 14:21:54 +0000 (08:21 -0600)
commitfbddc75aa2f6542117783b8024f9ebd2f0309e1f
tree9682fbc7cd213fbc17011498defe0007e22d2b46
parent6829ef74607fa6af602fa1539b1f084a8c0d356c
softpipe: Grab a ref when the fb is set.

Nasty bug when the surface is freed and another is allocated right on
top of it. The next time we set the fb state SP thinks it's the same
surface and doesn't flush, and when the flush eventually happens the
surface belongs to a completely different texture.

(cherry picked from commit a77226071f6814a53358a5d6caff685889d0e4ec)

Conflicts:
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_state_surface.c