st/xa: Bind destination before setting new state
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 7 Apr 2014 09:37:39 +0000 (02:37 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 8 Apr 2014 05:34:10 +0000 (22:34 -0700)
commite5d2c5b89944007d69347fd419789312be573d0c
treec715960e38e90f30a16e3a5a23e466aeed52d5d7
parent34f15903d6f5807b34a4c9be6d8daaedbbdd64bc
st/xa: Bind destination before setting new state

Binding a new destination may cause the svga driver to emit draw calls
while propagating the surface. Make sure this doesn't happen in the middle
of sampler state setup where state may be incosistent.

In practice, surface propagation should never happen here and even if it did,
it wouldn't be a valid reason for the svga driver to emit partially set up
state, but to avoid future uncertainties, make sure this doesn't happen
anyway.

Found while auditing the state tracker for inconsistent sampler state /
sampler view setup.

Cc: "10.1" <mesa-stable@freedesktop.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
src/gallium/state_trackers/xa/xa_renderer.c