nv50,nvc0: make sure there's pushbuf space and that we ref the bo early
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 1 Jan 2016 01:33:15 +0000 (20:33 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 2 Jan 2016 00:52:41 +0000 (19:52 -0500)
commitc1d14c6817e3fa9a1c04f9b6c51b4ca601637843
tree68ed3f22186d577a49e97e4dbf031bb84579bca0
parent33a415310b2d958319a4391f6b6d325d9c7292cc
nv50,nvc0: make sure there's pushbuf space and that we ref the bo early

First off, we can't flush in the middle of a command. Secondly
requesting the extra push space might cause a flush to happen. If that
flush happens, we'd have to do the PUSH_REFN again. So instead do
PUSH_REFN after the push space request. This helps avoid rare crashes
with supertuxkart in libdrm due to assertion failures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nv50/nv50_vbo.c
src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c