This fixes an illegal command buffer on the host seen with
piglit arb_internalformat_query2-max-dimensions
Signed-off-by: Dave Airlie <airlied@redhat.com>
unsigned hash = res->res_handle & (sizeof(cbuf->is_handle_added)-1);
if (cbuf->cres > cbuf->nres) {
- fprintf(stderr,"failure to add relocation\n");
- return;
+ cbuf->nres += 256;
+ cbuf->res_bo = realloc(cbuf->res_bo, cbuf->nres * sizeof(struct virgl_hw_buf*));
+ if (!cbuf->res_bo) {
+ fprintf(stderr,"failure to add relocation %d, %d\n", cbuf->cres, cbuf->nres);
+ return;
+ }
}
cbuf->res_bo[cbuf->cres] = NULL;
unsigned hash = res->res_handle & (sizeof(cbuf->is_handle_added)-1);
if (cbuf->cres > cbuf->nres) {
- fprintf(stderr,"failure to add relocation\n");
- return;
+ cbuf->nres += 256;
+ cbuf->res_bo = realloc(cbuf->res_bo, cbuf->nres * sizeof(struct virgl_hw_buf*));
+ if (!cbuf->res_bo) {
+ fprintf(stderr,"failure to add relocation %d, %d\n", cbuf->cres, cbuf->nres);
+ return;
+ }
}
cbuf->res_bo[cbuf->cres] = NULL;