diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index 3ad9e41fdbb..42a8f45c5bc 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -1426,7 +1426,7 @@ nv50_set_global_bindings(struct pipe_context *pipe, unsigned i; const unsigned end = start + nr; - if (nv50->global_residents.size <= (end * sizeof(struct pipe_resource *))) { + if (nv50->global_residents.size < (end * sizeof(struct pipe_resource *))) { const unsigned old_size = nv50->global_residents.size; if (util_dynarray_resize(&nv50->global_residents, struct pipe_resource *, end)) { memset((uint8_t *)nv50->global_residents.data + old_size, 0, diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index 13c4fc6a27b..08d2336589f 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -1419,7 +1419,7 @@ nvc0_set_global_bindings(struct pipe_context *pipe, if (!nr) return; - if (nvc0->global_residents.size <= (end * sizeof(struct pipe_resource *))) { + 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)) { memset((uint8_t *)nvc0->global_residents.data + old_size, 0,