swr: make sure that all rendering is finished on shader destroy
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 12 Nov 2016 19:20:53 +0000 (14:20 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 16 Nov 2016 01:25:48 +0000 (20:25 -0500)
commita2c1d58ddbd77692a1c07a3e7606f6472722a93c
treea8e4651c8c7ef24afb5bba171e3a3eacfe4db501
parent7caed50ff4224b0966bae7628cf99f8163cac4dc
swr: make sure that all rendering is finished on shader destroy

Rendering could still be ongoing (or have yet to start) when the shader
is deleted. There's no refcounting on the shader text, so insert a
pipeline stall unconditionally when this happens.

[Note, we should instead introduce a way to attach work to
fences, so that the freeing can be done in the current fence.]

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_state.cpp