struct iris_const_buffer *cbuf = &shs->constbuf[range->block];
struct iris_resource *res = (void *) cbuf->resource;
- iris_use_pinned_bo(batch, res->bo, false);
+ if (res)
+ iris_use_pinned_bo(batch, res->bo, false);
+ else
+ iris_use_pinned_bo(batch, batch->screen->workaround_bo, false);
}
}
pkt.ConstantBody.ReadLength[n] = range->length;
pkt.ConstantBody.Buffer[n] =
- ro_bo(res->bo, range->start * 32 + cbuf->offset);
+ res ? ro_bo(res->bo, range->start * 32 + cbuf->offset)
+ : ro_bo(batch->screen->workaround_bo, 0);
n--;
}
}