nv50,nvc0: make sure to pushbuf_refn before putting bo into pushbuf_data
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 21 Jun 2015 23:03:35 +0000 (19:03 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 23 Jun 2015 16:08:34 +0000 (12:08 -0400)
commit78d58e642549fbf340fdb4fca06720d2891216a8
tree4cc534ee8f3d53fe683467f54890d3931a8f7740
parent9fcbf515b431a92e0289f234ab77a796cf2a5612
nv50,nvc0: make sure to pushbuf_refn before putting bo into pushbuf_data

Without first running the bo through pushbuf_refn, the nouveau drm
library will have uninitialized structures regarding this bo, and will
insert incorrect data.

This fixes supertuxkart 0.9 crash on start (where it ends up doing a lot
of indirect draws).

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