VirtualBox

Ignore:
Timestamp:
May 14, 2012 7:50:32 AM (13 years ago)
Author:
vboxsync
Message:

crOpenGL: more vboxhgcm connection cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r41264 r41265  
    316316    {
    317317        int rc = _crVBoxHGSMIClientInit(pClient, pHgsmi);
    318         AssertRC(rc);
    319318        if (RT_SUCCESS(rc))
    320319            return (HVBOXCRHGSMI_CLIENT)pClient;
     320        else
     321            crWarning("_crVBoxHGSMIClientCreate: _crVBoxHGSMIClientInit failed rc %d", rc);
    321322
    322323        crFree(pCLient);
     
    348349        {
    349350            int rc = _crVBoxHGSMIClientInit(&conn->HgsmiClient, pHgsmi);
    350             AssertRC(rc);
    351351            if (RT_SUCCESS(rc))
    352352            {
     
    354354                return &conn->HgsmiClient;
    355355            }
     356            else
     357                crWarning("_crVBoxHGSMIClientGet: _crVBoxHGSMIClientInit failed rc %d", rc);
    356358            VBoxCrHgsmiDestroy(pHgsmi);
    357359        }
     
    393395    pBuf = pHdr->pBuffer;
    394396    rc = pBuf->pfnUnlock(pBuf);
    395     AssertRC(rc);
    396397    if (RT_FAILURE(rc))
    397398    {
     399        crWarning("_crVBoxHGSMIBufFromHdr: pfnUnlock failed rc %d", rc);
    398400        return NULL;
    399401    }
     
    424426    fFlags.bDiscard = 1;
    425427    rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr);
    426     AssertRC(rc);
    427428    if (RT_SUCCESS(rc))
    428429        return pHdr;
     430    else
     431        crWarning("_crVBoxHGSMICmdBufferLock: pfnLock failed rc %d", rc);
    429432
    430433    crWarning("Failed to Lock the command buffer of size(%d), rc(%d)\n", cbBuffer, rc);
     
    444447     * 3. guest must wait for command completion in the same order as it submits them
    445448     * in case we can not satisfy any of the above, we should introduce multiple command buffers */
    446     CRVBOXHGSMIHDR * pHdr;
     449    CRVBOXHGSMIHDR * pHdr = NULL;
    447450    VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags;
    448451    int rc;
     
    450453    fFlags.bReadOnly = 1;
    451454    rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr);
    452     AssertRC(rc);
    453455    if (RT_FAILURE(rc))
    454456        crWarning("Failed to Lock the command buffer of size(%d), rc(%d)\n", cbBuffer, rc);
     
    459461{
    460462    int rc = pClient->pCmdBuffer->pfnUnlock(pClient->pCmdBuffer);
    461     AssertRC(rc);
    462463    if (RT_FAILURE(rc))
    463         crWarning("Failed to Unlock the command buffer rc(%d)\n", rc);
     464        crError("Failed to Unlock the command buffer rc(%d)\n", rc);
    464465}
    465466
     
    473474    fFlags.bReadOnly = 1;
    474475    rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, sizeof (*pHdr), fFlags, (void**)&pHdr);
    475     AssertRC(rc);
    476476    if (RT_FAILURE(rc))
    477477    {
     
    508508    fFlags.Value = 0;
    509509    rc = pClient->pHGBuffer->pfnLock(pClient->pHGBuffer, 0, cbBuffer, fFlags, &pClient->pvHGBuffer);
    510     AssertRC(rc);
    511510    if (RT_SUCCESS(rc))
    512     {
    513511        return pClient->pvHGBuffer;
    514     }
     512    else
     513        crWarning("_crVBoxHGSMIRecvBufData: pfnLock failed rc %d", rc);
     514
    515515    return NULL;
    516516}
     
    14391439        if (g_crvboxhgcm.hGuestDrv == INVALID_HANDLE_VALUE)
    14401440        {
    1441             crDebug("could not open VBox Guest Additions driver! rc = %d\n", GetLastError());
    1442             CRASSERT(0);
     1441            crWarning("could not open VBox Guest Additions driver! rc = %d\n", GetLastError());
    14431442            VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    14441443            return FALSE;
     
    18361835
    18371836    rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
    1838     AssertRC(rc);
    18391837    if (RT_FAILURE(rc))
    18401838    {
     
    19241922        fFlags.bWriteOnly = 1;
    19251923        rc = pBuf->pfnLock(pBuf, 0, len, fFlags, &pvBuf);
    1926         AssertRC(rc);
    19271924        if (RT_SUCCESS(rc))
    19281925        {
    19291926            memcpy(pvBuf, buf, len);
    19301927            rc = pBuf->pfnUnlock(pBuf);
    1931             AssertRC(rc);
    19321928            CRASSERT(RT_SUCCESS(rc));
    19331929        }
    19341930        else
    19351931        {
     1932            crWarning("_crVBoxHGSMIWriteReadExact: pfnUnlock failed rc %d", rc);
    19361933            _crVBoxHGSMIBufFree(pClient, pBuf);
    19371934            /* fallback */
     
    19681965
    19691966        rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 3);
    1970         AssertRC(rc);
    19711967        if (RT_FAILURE(rc))
    19721968        {
     
    20772073
    20782074        rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
    2079         AssertRC(rc);
    20802075        if (RT_SUCCESS(rc))
    20812076        {
     
    21102105
    21112106        rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
    2112         AssertRC(rc);
    21132107        if (RT_SUCCESS(rc))
    21142108        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette