fd_bo_del(rsc->bo);
rsc->bo = fd_bo_new(screen->dev, size, flags);
+ rsc->seqno = p_atomic_inc_return(&screen->rsc_seqno);
util_range_set_empty(&rsc->valid_buffer_range);
fd_bc_invalidate_resource(rsc, true);
}
/* TODO valid_buffer_range?? */
swap(rsc->bo, shadow->bo);
swap(rsc->write_batch, shadow->write_batch);
+ rsc->seqno = p_atomic_inc_return(&ctx->screen->rsc_seqno);
/* at this point, the newly created shadow buffer is not referenced
* by any batches, but the existing rsc (probably) is. We need to
void
fd_texture_init(struct pipe_context *pctx)
{
- pctx->delete_sampler_state = fd_sampler_state_delete;
-
- pctx->sampler_view_destroy = fd_sampler_view_destroy;
+ if (!pctx->delete_sampler_state)
+ pctx->delete_sampler_state = fd_sampler_state_delete;
+ if (!pctx->sampler_view_destroy)
+ pctx->sampler_view_destroy = fd_sampler_view_destroy;
}
/* helper for setting up border-color buffer for a3xx/a4xx: */