third_party/virtualbox/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
/**
 * Destroy backend specific surface bits (part of SVGA_3D_CMD_SURFACE_DESTROY).
 *
 * @param   pState              The VMSVGA3d state.
 * @param   pSurface            The surface being destroyed.
 */
Destroy backend specific surface bits (part of SVGA_3D_CMD_SURFACE_DESTROY).
@param   pState              The VMSVGA3d state.
@param   pSurface            The surface being destroyed.
Destroy backend specific surface bits ( part of SVGA_3D_CMD_SURFACE_DESTROY ) . @param pState The VMSVGA3d state . @param pSurface The surface being destroyed .
void vmsvga3dBackSurfaceDestroy(PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface)
{
    RT_NOREF(pState);
    RTAvlU32Destroy(&pSurface->pSharedObjectTree, vmsvga3dSharedSurfaceDestroyTree, pSurface);
    Assert(pSurface->pSharedObjectTree == NULL);
    switch (pSurface->enmD3DResType)
    {
    case VMSVGA3D_D3DRESTYPE_SURFACE:
        D3D_RELEASE(pSurface->u.pSurface);
        break;
    case VMSVGA3D_D3DRESTYPE_TEXTURE:
        D3D_RELEASE(pSurface->u.pTexture);
        D3D_RELEASE(pSurface->bounce.pTexture);
        break;
    case VMSVGA3D_D3DRESTYPE_CUBE_TEXTURE:
        D3D_RELEASE(pSurface->u.pCubeTexture);
        D3D_RELEASE(pSurface->bounce.pCubeTexture);
        break;
    case VMSVGA3D_D3DRESTYPE_VOLUME_TEXTURE:
        D3D_RELEASE(pSurface->u.pVolumeTexture);
        D3D_RELEASE(pSurface->bounce.pVolumeTexture);
        break;
    case VMSVGA3D_D3DRESTYPE_VERTEX_BUFFER:
        D3D_RELEASE(pSurface->u.pVertexBuffer);
        break;
    case VMSVGA3D_D3DRESTYPE_INDEX_BUFFER:
        D3D_RELEASE(pSurface->u.pIndexBuffer);
        break;
    default:
        AssertMsg(!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface),
                  ("surfaceFlags=0x%x\n", (pSurface->surfaceFlags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK)));
        break;
    }
    D3D_RELEASE(pSurface->pQuery);
}
void vmsvga3dBackSurfaceDestroy ( PVMSVGA3DSTATE pState , PVMSVGA3DSURFACE pSurface ) { RT_NOREF ( pState ) ; RTAvlU32Destroy ( & pSurface -> pSharedObjectTree , vmsvga3dSharedSurfaceDestroyTree , pSurface ) ; Assert ( pSurface -> pSharedObjectTree == NULL ) ; switch ( pSurface -> enmD3DResType ) { case VMSVGA3D_D3DRESTYPE_SURFACE : D3D_RELEASE ( pSurface -> u . pSurface ) ; break ; case VMSVGA3D_D3DRESTYPE_TEXTURE : D3D_RELEASE ( pSurface -> u . pTexture ) ; D3D_RELEASE ( pSurface -> bounce . pTexture ) ; break ; case VMSVGA3D_D3DRESTYPE_CUBE_TEXTURE : D3D_RELEASE ( pSurface -> u . pCubeTexture ) ; D3D_RELEASE ( pSurface -> bounce . pCubeTexture ) ; break ; case VMSVGA3D_D3DRESTYPE_VOLUME_TEXTURE : D3D_RELEASE ( pSurface -> u . pVolumeTexture ) ; D3D_RELEASE ( pSurface -> bounce . pVolumeTexture ) ; break ; case VMSVGA3D_D3DRESTYPE_VERTEX_BUFFER : D3D_RELEASE ( pSurface -> u . pVertexBuffer ) ; break ; case VMSVGA3D_D3DRESTYPE_INDEX_BUFFER : D3D_RELEASE ( pSurface -> u . pIndexBuffer ) ; break ; default : AssertMsg ( ! VMSVGA3DSURFACE_HAS_HW_SURFACE ( pSurface ) , ( " \n " , ( pSurface -> surfaceFlags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK ) ) ) ; break ; } D3D_RELEASE ( pSurface -> pQuery ) ; }
Destroy backend specific surface bits (part of SVGA_3D_CMD_SURFACE_DESTROY).
Destroy backend specific surface bits ( part of SVGA_3D_CMD_SURFACE_DESTROY ) .