Example #1
0
static void
nv50_screen_destroy(struct pipe_screen *pscreen)
{
	struct nv50_screen *screen = nv50_screen(pscreen);
	unsigned i;

	for (i = 0; i < 3; i++) {
		if (screen->constbuf_parm[i])
			nouveau_bo_ref(NULL, &screen->constbuf_parm[i]);
	}

	if (screen->constbuf_misc[0])
		nouveau_bo_ref(NULL, &screen->constbuf_misc[0]);
	if (screen->tic)
		nouveau_bo_ref(NULL, &screen->tic);
	if (screen->tsc)
		nouveau_bo_ref(NULL, &screen->tsc);
	if (screen->static_init)
		so_ref(NULL, &screen->static_init);

	nouveau_notifier_free(&screen->sync);
	nouveau_grobj_free(&screen->tesla);
	nouveau_grobj_free(&screen->eng2d);
	nouveau_grobj_free(&screen->m2mf);
	nouveau_resource_destroy(&screen->immd_heap[0]);
	nouveau_resource_destroy(&screen->parm_heap[0]);
	nouveau_resource_destroy(&screen->parm_heap[1]);
	nouveau_screen_fini(&screen->base);
	FREE(screen);
}
Example #2
0
static void
nvfx_screen_destroy(struct pipe_screen *pscreen)
{
    struct nvfx_screen *screen = nvfx_screen(pscreen);

    nouveau_resource_destroy(&screen->vp_exec_heap);
    nouveau_resource_destroy(&screen->vp_data_heap);
    nouveau_resource_destroy(&screen->query_heap);
    nouveau_notifier_free(&screen->query);
    nouveau_notifier_free(&screen->sync);
    nouveau_grobj_free(&screen->eng3d);
    nvfx_screen_surface_takedown(pscreen);

    nouveau_screen_fini(&screen->base);

    FREE(pscreen);
}
Example #3
0
static void
nv30_screen_destroy(struct pipe_screen *pscreen)
{
	struct nv30_screen *screen = nv30_screen(pscreen);
	unsigned i;

	for (i = 0; i < NV30_STATE_MAX; i++) {
		if (screen->state[i])
			so_ref(NULL, &screen->state[i]);
	}

	nouveau_resource_destroy(&screen->vp_exec_heap);
	nouveau_resource_destroy(&screen->vp_data_heap);
	nouveau_resource_destroy(&screen->query_heap);
	nouveau_notifier_free(&screen->query);
	nouveau_notifier_free(&screen->sync);
	nouveau_grobj_free(&screen->rankine);
	nv04_surface_2d_takedown(&screen->eng2d);

	nouveau_screen_fini(&screen->base);

	FREE(pscreen);
}