Signed-off-by: Rob Clark <robclark@freedesktop.org>
uint32_t stride = 0;
uint32_t base = 0;
- if (i < nr_bufs) {
+ if ((i < nr_bufs) && bufs[i]) {
struct pipe_surface *psurf = bufs[i];
rsc = fd_resource(psurf->texture);
ctx->gmem_reason |= FD_GMEM_LOGICOP_ENABLED;
for (i = 0; i < pfb->nr_cbufs; i++) {
- struct pipe_resource *surf = pfb->cbufs[i]->texture;
+ struct pipe_resource *surf;
+
+ if (!pfb->cbufs[i])
+ continue;
+
+ surf = pfb->cbufs[i]->texture;
fd_resource(surf)->dirty = true;
buffers |= FD_BUFFER_COLOR;