nv50,nvc0: guard against zero-size blits
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 7 Oct 2018 21:43:57 +0000 (17:43 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 9 Oct 2018 14:33:11 +0000 (10:33 -0400)
commit9bf0614116cdfdbfca9952c6547331731a462dcc
tree5aef3414808f25bb4d1b7aa525b547aebf2a4516
parent78d3640e49918cbd7a9fd4d0220e47c81902f455
nv50,nvc0: guard against zero-size blits

The current state tracker can generate these sometimes. Fixing this is
more involved, and due to some integer math we can generate
divisions-by-zero.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c