Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
void
NineSwapChain9_dtor( struct NineSwapChain9 *This )
{
    unsigned i;

    DBG("This=%p\n", This);

    if (This->buffers) {
        for (i = 0; i < This->params.BackBufferCount; i++)
            NineUnknown_Destroy(NineUnknown(This->buffers[i]));
        FREE(This->buffers);
    }
    if (This->zsbuf)
        NineUnknown_Destroy(NineUnknown(This->zsbuf));

    if (This->present)
        ID3DPresent_Release(This->present);

    NineUnknown_dtor(&This->base);
}