nvc0: take extra pushbuf space into account for pushbuf_space calls
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 3 Mar 2017 01:18:24 +0000 (20:18 -0500)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 4 Mar 2017 16:48:27 +0000 (17:48 +0100)
commit8e6d67685e10b001e07f92a7a6aaff4fe987b6f2
tree989044448fbfd7378345f247cac54aa9c01a73fb
parent32dd8d59b6d1b6828e16e854d589d0f04536da14
nvc0: take extra pushbuf space into account for pushbuf_space calls

See detailed explanation of why this is needed in commit eb60a89bc3a.
This spot was missed/overlooked. Basically as a result of the fact
that BEGIN_* ends up calling PUSH_SPACE, which in turn adds an extra 8
to the requested amount, we have to be mindful of that when doing bare
nouveau_pushbuf_space calls.

Reportedly this fixes some crashes when replaying a hitman trace taken
on radeonsi.

Fixes: eb60a89bc3a ("nouveau: take extra push space into account for pushbuf_space calls")
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Reported-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/nvc0/nve4_compute.c