static void r600_buffer_destroy(struct pipe_screen *screen,
				struct pipe_resource *buf)
{
	struct r600_resource *rbuffer = r600_resource(buf);

	util_range_destroy(&rbuffer->valid_buffer_range);
	pb_reference(&rbuffer->buf, NULL);
	FREE(rbuffer);
}
Esempio n. 2
0
static void virgl_buffer_destroy(struct pipe_screen *screen,
                                 struct pipe_resource *buf)
{
   struct virgl_screen *vs = virgl_screen(screen);
   struct virgl_buffer *vbuf = virgl_buffer(buf);

   util_range_destroy(&vbuf->valid_buffer_range);
   vs->vws->resource_unref(vs->vws, vbuf->base.hw_res);
   FREE(vbuf);
}
Esempio n. 3
0
static void
fd_resource_destroy(struct pipe_screen *pscreen,
		struct pipe_resource *prsc)
{
	struct fd_resource *rsc = fd_resource(prsc);
	if (rsc->bo)
		fd_bo_del(rsc->bo);
	list_delinit(&rsc->list);
	util_range_destroy(&rsc->valid_buffer_range);
	FREE(rsc);
}
Esempio n. 4
0
static void
nouveau_buffer_destroy(struct pipe_screen *pscreen,
                       struct pipe_resource *presource)
{
   struct nv04_resource *res = nv04_resource(presource);

   nouveau_buffer_release_gpu_storage(res);

   if (res->data && !(res->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY))
      align_free(res->data);

   nouveau_fence_ref(NULL, &res->fence);
   nouveau_fence_ref(NULL, &res->fence_wr);

   util_range_destroy(&res->valid_buffer_range);

   FREE(res);

   NOUVEAU_DRV_STAT(nouveau_screen(pscreen), buf_obj_current_count, -1);
}