nvc0: handle nr being 0 in nvc0_set_global_bindings
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
This commit is contained in:
@@ -1379,6 +1379,9 @@ nvc0_set_global_bindings(struct pipe_context *pipe,
|
||||
unsigned i;
|
||||
const unsigned end = start + nr;
|
||||
|
||||
if (!nr)
|
||||
return;
|
||||
|
||||
if (nvc0->global_residents.size <= (end * sizeof(struct pipe_resource *))) {
|
||||
const unsigned old_size = nvc0->global_residents.size;
|
||||
if (util_dynarray_resize(&nvc0->global_residents, struct pipe_resource *, end)) {
|
||||
|
Reference in New Issue
Block a user