nv50: add appropriate space check before adding new pushbuffer
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 21 Mar 2021 08:03:54 +0000 (04:03 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 22 Mar 2021 15:20:45 +0000 (15:20 +0000)
commitee3920b215a4802cdc1045655ea6d95fcbccb8be
tree4ce061fa97a254a97aecbf335741c8cfaa864ac6
parent3e39d059dff033653364267908e5c9fad1244638
nv50: add appropriate space check before adding new pushbuffer

nouveau_pushbuf_data does not check that there are available pushes in
the current batch. So add a space check for this. Avoids crashes with
the HUD and glxspheres.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740>
src/gallium/drivers/nouveau/nv50/nv50_compute.c