void NineSwapChain9_dtor( struct NineSwapChain9 *This ) { unsigned i; DBG("This=%p\n", This); if (This->pool) _mesa_threadpool_destroy(This, This->pool); for (i = 0; i < This->num_back_buffers; i++) { if (This->buffers[i]) NineUnknown_Detach(NineUnknown(This->buffers[i])); if (This->present_handles[i]) ID3DPresent_DestroyD3DWindowBuffer(This->present, This->present_handles[i]); if (This->present_buffers[i]) pipe_resource_reference(&(This->present_buffers[i]), NULL); } if (This->zsbuf) NineUnknown_Unbind(NineUnknown(This->zsbuf)); if (This->present) ID3DPresent_Release(This->present); swap_fences_unref(This); NineUnknown_dtor(&This->base); }
void dri_destroy_buffer(__DRIdrawable * dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); int i; pipe_surface_reference(&drawable->drisw_surface, NULL); for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&drawable->textures[i], NULL); for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&drawable->msaa_textures[i], NULL); swap_fences_unref(drawable); FREE(drawable); }
void dri_destroy_buffer(__DRIdrawable * dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); struct dri_screen *screen = drawable->screen; struct st_api *stapi = screen->st_api; int i; pipe_surface_reference(&drawable->drisw_surface, NULL); for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&drawable->textures[i], NULL); for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&drawable->msaa_textures[i], NULL); swap_fences_unref(drawable); /* Notify the st manager that this drawable is no longer valid */ stapi->destroy_drawable(stapi, &drawable->base); FREE(drawable); }