nvc0: avoid negatives in PUSH_SPACE argument
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 5 Feb 2016 05:47:03 +0000 (00:47 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 5 Feb 2016 05:49:51 +0000 (00:49 -0500)
commit2065e380b2edafd6e38aa5bb0ff222dc1f6f5ad8
tree4c7c5cffd46181ad47307bd0c38fbf296560f5ef
parent03b3eb90d7e0ca90a75eda97eefa8c99aacdf4d9
nvc0: avoid negatives in PUSH_SPACE argument

Fixup to commit 03b3eb90d - the number of buffers could be larger than
the number of elements, in which case we'd pass a negative argument to
PUSH_SPACE, which would be bad. While we're at it, merge it with the
other PUSH_SPACE at the top of the function.

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