Changeset 41265 in vbox for trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
- Timestamp:
- May 14, 2012 7:50:32 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r41264 r41265 316 316 { 317 317 int rc = _crVBoxHGSMIClientInit(pClient, pHgsmi); 318 AssertRC(rc);319 318 if (RT_SUCCESS(rc)) 320 319 return (HVBOXCRHGSMI_CLIENT)pClient; 320 else 321 crWarning("_crVBoxHGSMIClientCreate: _crVBoxHGSMIClientInit failed rc %d", rc); 321 322 322 323 crFree(pCLient); … … 348 349 { 349 350 int rc = _crVBoxHGSMIClientInit(&conn->HgsmiClient, pHgsmi); 350 AssertRC(rc);351 351 if (RT_SUCCESS(rc)) 352 352 { … … 354 354 return &conn->HgsmiClient; 355 355 } 356 else 357 crWarning("_crVBoxHGSMIClientGet: _crVBoxHGSMIClientInit failed rc %d", rc); 356 358 VBoxCrHgsmiDestroy(pHgsmi); 357 359 } … … 393 395 pBuf = pHdr->pBuffer; 394 396 rc = pBuf->pfnUnlock(pBuf); 395 AssertRC(rc);396 397 if (RT_FAILURE(rc)) 397 398 { 399 crWarning("_crVBoxHGSMIBufFromHdr: pfnUnlock failed rc %d", rc); 398 400 return NULL; 399 401 } … … 424 426 fFlags.bDiscard = 1; 425 427 rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr); 426 AssertRC(rc);427 428 if (RT_SUCCESS(rc)) 428 429 return pHdr; 430 else 431 crWarning("_crVBoxHGSMICmdBufferLock: pfnLock failed rc %d", rc); 429 432 430 433 crWarning("Failed to Lock the command buffer of size(%d), rc(%d)\n", cbBuffer, rc); … … 444 447 * 3. guest must wait for command completion in the same order as it submits them 445 448 * in case we can not satisfy any of the above, we should introduce multiple command buffers */ 446 CRVBOXHGSMIHDR * pHdr ;449 CRVBOXHGSMIHDR * pHdr = NULL; 447 450 VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags; 448 451 int rc; … … 450 453 fFlags.bReadOnly = 1; 451 454 rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr); 452 AssertRC(rc);453 455 if (RT_FAILURE(rc)) 454 456 crWarning("Failed to Lock the command buffer of size(%d), rc(%d)\n", cbBuffer, rc); … … 459 461 { 460 462 int rc = pClient->pCmdBuffer->pfnUnlock(pClient->pCmdBuffer); 461 AssertRC(rc);462 463 if (RT_FAILURE(rc)) 463 cr Warning("Failed to Unlock the command buffer rc(%d)\n", rc);464 crError("Failed to Unlock the command buffer rc(%d)\n", rc); 464 465 } 465 466 … … 473 474 fFlags.bReadOnly = 1; 474 475 rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, sizeof (*pHdr), fFlags, (void**)&pHdr); 475 AssertRC(rc);476 476 if (RT_FAILURE(rc)) 477 477 { … … 508 508 fFlags.Value = 0; 509 509 rc = pClient->pHGBuffer->pfnLock(pClient->pHGBuffer, 0, cbBuffer, fFlags, &pClient->pvHGBuffer); 510 AssertRC(rc);511 510 if (RT_SUCCESS(rc)) 512 {513 511 return pClient->pvHGBuffer; 514 } 512 else 513 crWarning("_crVBoxHGSMIRecvBufData: pfnLock failed rc %d", rc); 514 515 515 return NULL; 516 516 } … … 1439 1439 if (g_crvboxhgcm.hGuestDrv == INVALID_HANDLE_VALUE) 1440 1440 { 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()); 1443 1442 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); 1444 1443 return FALSE; … … 1836 1835 1837 1836 rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2); 1838 AssertRC(rc);1839 1837 if (RT_FAILURE(rc)) 1840 1838 { … … 1924 1922 fFlags.bWriteOnly = 1; 1925 1923 rc = pBuf->pfnLock(pBuf, 0, len, fFlags, &pvBuf); 1926 AssertRC(rc);1927 1924 if (RT_SUCCESS(rc)) 1928 1925 { 1929 1926 memcpy(pvBuf, buf, len); 1930 1927 rc = pBuf->pfnUnlock(pBuf); 1931 AssertRC(rc);1932 1928 CRASSERT(RT_SUCCESS(rc)); 1933 1929 } 1934 1930 else 1935 1931 { 1932 crWarning("_crVBoxHGSMIWriteReadExact: pfnUnlock failed rc %d", rc); 1936 1933 _crVBoxHGSMIBufFree(pClient, pBuf); 1937 1934 /* fallback */ … … 1968 1965 1969 1966 rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 3); 1970 AssertRC(rc);1971 1967 if (RT_FAILURE(rc)) 1972 1968 { … … 2077 2073 2078 2074 rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2); 2079 AssertRC(rc);2080 2075 if (RT_SUCCESS(rc)) 2081 2076 { … … 2110 2105 2111 2106 rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2); 2112 AssertRC(rc);2113 2107 if (RT_SUCCESS(rc)) 2114 2108 {
Note:
See TracChangeset
for help on using the changeset viewer.