Changeset 62932 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Aug 3, 2016 4:50:15 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r62618 r62932 1160 1160 AssertRCReturn(rc, rc); 1161 1161 } 1162 # ifdef LOG_ENABLED 1162 1163 Log(("configured=%d busy=%d\n", pThis->svga.fConfigured, pThis->svga.pFIFOR3[SVGA_FIFO_BUSY])); 1163 1164 uint32_t *pFIFO = pThis->svga.pFIFOR3; 1164 1165 Log(("next %x stop %x\n", pFIFO[SVGA_FIFO_NEXT_CMD], pFIFO[SVGA_FIFO_STOP])); 1166 # endif 1165 1167 1166 1168 /* Disable or enable dirty page tracking according to the current fTraces value. */ … … 2631 2633 uint32_t cbPayload = 0; 2632 2634 uint32_t u32IrqStatus = 0; 2633 bool fTriggerIrq = false;2634 2635 2635 2636 Assert(offCurrentCmd < offFifoMax && offCurrentCmd >= offFifoMin); … … 2781 2782 switch (cmd) 2782 2783 { 2783 case SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: 2784 { 2785 SVGAEscapeVideoSetRegs *pVideoCmd = (SVGAEscapeVideoSetRegs *)(pEscape + 1); 2786 AssertBreak(pEscape->size >= sizeof(pVideoCmd->header)); 2787 uint32_t cRegs = (pEscape->size - sizeof(pVideoCmd->header)) / sizeof(pVideoCmd->items[0]); 2788 2789 Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: stream %x\n", pVideoCmd->header.streamId)); 2790 for (uint32_t iReg = 0; iReg < cRegs; iReg++) 2784 case SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: 2791 2785 { 2792 Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: reg %x val %x\n", pVideoCmd->items[iReg].registerId, pVideoCmd->items[iReg].value)); 2786 SVGAEscapeVideoSetRegs *pVideoCmd = (SVGAEscapeVideoSetRegs *)(pEscape + 1); 2787 AssertBreak(pEscape->size >= sizeof(pVideoCmd->header)); 2788 uint32_t cRegs = (pEscape->size - sizeof(pVideoCmd->header)) / sizeof(pVideoCmd->items[0]); 2789 2790 Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: stream %x\n", pVideoCmd->header.streamId)); 2791 for (uint32_t iReg = 0; iReg < cRegs; iReg++) 2792 Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: reg %x val %x\n", pVideoCmd->items[iReg].registerId, pVideoCmd->items[iReg].value)); 2793 2794 RT_NOREF_PV(pVideoCmd); 2795 break; 2796 2793 2797 } 2794 break; 2795 } 2796 2797 case SVGA_ESCAPE_VMWARE_VIDEO_FLUSH: 2798 SVGAEscapeVideoFlush *pVideoCmd = (SVGAEscapeVideoFlush *)(pEscape + 1); 2799 AssertBreak(pEscape->size >= sizeof(*pVideoCmd)); 2800 Log(("SVGA_ESCAPE_VMWARE_VIDEO_FLUSH: stream %x\n", pVideoCmd->streamId)); 2801 break; 2798 2799 case SVGA_ESCAPE_VMWARE_VIDEO_FLUSH: 2800 { 2801 SVGAEscapeVideoFlush *pVideoCmd = (SVGAEscapeVideoFlush *)(pEscape + 1); 2802 AssertBreak(pEscape->size >= sizeof(*pVideoCmd)); 2803 Log(("SVGA_ESCAPE_VMWARE_VIDEO_FLUSH: stream %x\n", pVideoCmd->streamId)); 2804 RT_NOREF_PV(pVideoCmd); 2805 break; 2806 } 2802 2807 } 2803 2808 } … … 2902 2907 uint32_t iDescriptor = 0; 2903 2908 RTGCPHYS GCPhys; 2904 PVMSVGAGMRDESCRIPTOR paDescOld = NULL;2905 2909 bool fGCPhys64 = !!(pCmd->flags & SVGA_REMAP_GMR2_PPN64); 2906 2910 … … 3694 3698 static DECLCALLBACK(int) vmsvgaFIFOLoopWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pThread) 3695 3699 { 3700 RT_NOREF(pDevIns); 3696 3701 PVGASTATE pThis = (PVGASTATE)pThread->pvUser; 3697 3702 Log(("vmsvgaFIFOLoopWakeUp\n")); … … 3925 3930 static DECLCALLBACK(void) vmsvgaR3Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 3926 3931 { 3932 RT_NOREF(pszArgs); 3927 3933 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 3928 3934 PVMSVGAR3STATE pSVGAState = pThis->svga.pSvgaR3State; -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
r62514 r62932 814 814 uint32_t cchMaxX, uint32_t cchMaxY) 815 815 { 816 RT_NOREF(cbImage); 817 816 818 /* 817 819 * Skip stuff we can't or won't need to handle. -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
r62679 r62932 137 137 { \ 138 138 BOOL fMakeCurrentRc = wglMakeCurrent((pContext)->hdc, (pContext)->hglrc); \ 139 Assert(fMakeCurrentRc == TRUE); \139 Assert(fMakeCurrentRc == TRUE); RT_NOREF_PV(fMakeCurrentRc); \ 140 140 LogFlowFunc(("Changing context: %#x -> %#x\n", (pState)->idActiveContext, (pContext)->id)); \ 141 141 (pState)->idActiveContext = (pContext)->id; \ … … 161 161 (pContext)->window, \ 162 162 (pContext)->glxContext); \ 163 Assert(fMakeCurrentRc == True); \163 Assert(fMakeCurrentRc == True); RT_NOREF_PV(fMakeCurrentRc); \ 164 164 LogFlowFunc(("Changing context: %#x -> %#x\n", (pState)->idActiveContext, (pContext)->id)); \ 165 165 (pState)->idActiveContext = (pContext)->id; \ … … 1041 1041 1042 1042 /* DevVGA-SVGA3d-shared.cpp: */ 1043 uint32_t vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype,1044 1043 int vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, 1044 uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4); 1045 1045 1046 1046 -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp
r62514 r62932 149 149 int vmsvga3dLoadExec(PVGASTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 150 150 { 151 RT_NOREF(uVersion, uPass); 151 152 PVMSVGA3DSTATE pState = pThis->svga.p3dState; 152 153 AssertReturn(pState, VERR_NO_MEMORY); … … 427 428 static int vmsvga3dSaveContext(PVGASTATE pThis, PSSMHANDLE pSSM, PVMSVGA3DCONTEXT pContext) 428 429 { 430 RT_NOREF(pThis); 429 431 uint32_t cid = pContext->id; 430 432 … … 846 848 } 847 849 848 uint32_t vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4) 850 int vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, 851 uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4) 849 852 { 850 853 /* Choose a sane upper limit. */ -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
r62514 r62932 78 78 * 79 79 * @returns VBox status code. 80 * @param pDevIns The VGA device instance.81 * @param p Thread The send thread.80 * @param hThreadSelf This thread. 81 * @param pvUser Request sempahore handle. 82 82 */ 83 DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser) 84 { 83 DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD hThreadSelf, void *pvUser) 84 { 85 RT_NOREF(hThreadSelf); 85 86 RTSEMEVENT WndRequestSem = (RTSEMEVENT)pvUser; 86 87 WNDCLASSEX wc; … … 170 171 if (msg.message == WM_VMSVGA3D_DESTROYWINDOW) 171 172 { 172 BOOL ret= DestroyWindow((HWND)msg.wParam);173 Assert( ret);173 BOOL fRc = DestroyWindow((HWND)msg.wParam); 174 Assert(fRc); NOREF(fRc); 174 175 /* Signal to the caller that we're done. */ 175 176 RTSemEventSignal(WndRequestSem); … … 192 193 pCS->cy = rectClient.bottom - rectClient.top; 193 194 #endif 194 BOOL ret= SetWindowPos(hwnd, 0, pCS->x, pCS->y, pCS->cx, pCS->cy, SWP_NOZORDER | SWP_NOMOVE);195 Assert( ret);195 BOOL fRc = SetWindowPos(hwnd, 0, pCS->x, pCS->y, pCS->cx, pCS->cy, SWP_NOZORDER | SWP_NOMOVE); 196 Assert(fRc); NOREF(fRc); 196 197 197 198 /* Signal to the caller that we're done. */ -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r62514 r62932 91 91 #define VBOXHGSMI_STATE_FIFOSTOP_MAGIC 0x1fedcba9 92 92 93 #define VBOXHGSMI_SAVE_START(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_START_MAGIC); AssertRC(rc2);}while(0)94 #define VBOXHGSMI_SAVE_STOP(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_STOP_MAGIC); AssertRC(rc2);}while(0)95 #define VBOXHGSMI_SAVE_FIFOSTART(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTART_MAGIC); AssertRC(rc2);}while(0)96 #define VBOXHGSMI_SAVE_FIFOSTOP(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTOP_MAGIC); AssertRC(rc2);}while(0)93 #define VBOXHGSMI_SAVE_START(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_START_MAGIC); AssertRC(rc2); }while(0) 94 #define VBOXHGSMI_SAVE_STOP(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_STOP_MAGIC); AssertRC(rc2); }while(0) 95 #define VBOXHGSMI_SAVE_FIFOSTART(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTART_MAGIC); AssertRC(rc2); }while(0) 96 #define VBOXHGSMI_SAVE_FIFOSTOP(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTOP_MAGIC); AssertRC(rc2); }while(0) 97 97 98 98 #define VBOXHGSMI_LOAD_CHECK(_pSSM, _v) \ … … 304 304 if (RTListIsEmpty(&pIns->guestCmdCompleted)) 305 305 { 306 if(pIns->pHGFlags) 307 { 306 if (pIns->pHGFlags) 308 307 ASMAtomicAndU32(&pIns->pHGFlags->u32HostFlags, ~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED); 309 }310 308 } 311 309 … … 355 353 356 354 int rc = hgsmiFIFOLock(pIns); 357 if (RT_SUCCESS(rc))355 if (RT_SUCCESS(rc)) 358 356 { 359 357 /* Search the Read list for the given buffer offset. */ … … 392 390 393 391 hgsmiFIFOUnlock(pIns); 394 if (!bCompleteFirst)392 if (!bCompleteFirst) 395 393 LogRel(("HGSMI[%s]: ignored invalid write to the host FIFO: 0x%08X!!!\n", pIns->pszName, offBuffer)); 396 394 } … … 420 418 VM_ASSERT_EMT(pIns->pVM); 421 419 422 AssertPtrReturn(pIns->pHGFlags, VERR_WRONG_ORDER);420 AssertPtrReturn(pIns->pHGFlags, HGSMIOFFSET_VOID); 423 421 int rc = hgsmiFIFOLock(pIns); 424 422 AssertRC(rc); 425 if (RT_SUCCESS(rc))423 if (RT_SUCCESS(rc)) 426 424 { 427 425 /* Get the host FIFO head entry. */ … … 454 452 return pEntry->offBuffer; 455 453 } 454 456 455 hgsmiFIFOUnlock(pIns); 457 456 } … … 723 722 HGSMIINSTANCE *pIns = pEntry->pIns; 724 723 int rc = hgsmiFIFOLock (pIns); 725 if (RT_SUCCESS(rc))724 if (RT_SUCCESS(rc)) 726 725 { 727 726 RTListNodeRemove(&pEntry->nodeEntry); … … 731 730 732 731 rc = hgsmiHostHeapLock (pIns); 733 if (RT_SUCCESS(rc))732 if (RT_SUCCESS(rc)) 734 733 { 735 734 /* Deallocate the host heap memory. */ … … 1292 1291 hgsmiHostHeapHandleLocationOffset(&pIns->hostHeap); 1293 1292 rc = SSMR3PutU32 (pSSM, off); 1294 if (off != HGSMIOFFSET_VOID)1293 if (off != HGSMIOFFSET_VOID) 1295 1294 { 1296 1295 SSMR3PutU32 (pSSM, hgsmiHostHeapOffset(&pIns->hostHeap)); … … 1299 1298 SSMR3PutU64 (pSSM, (uint64_t)(uintptr_t)pIns->area.pu8Base); 1300 1299 rc = hgsmiFIFOLock (pIns); 1301 if (RT_SUCCESS(rc))1300 if (RT_SUCCESS(rc)) 1302 1301 { 1303 1302 rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFO, pSSM); AssertRC(rc); … … 1327 1326 int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version) 1328 1327 { 1329 if (u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)1328 if (u32Version < VGA_SAVEDSTATE_VERSION_HGSMI) 1330 1329 return VINF_SUCCESS; 1331 1330 … … 1346 1345 pIns->pHGFlags = (off != HGSMIOFFSET_VOID) ? (HGSMIHOSTFLAGS*)HGSMIOffsetToPointer (&pIns->area, off) : NULL; 1347 1346 1348 HGSMIHOSTHEAP hHeap = pIns->hostHeap;1349 1347 rc = SSMR3GetU32(pSSM, &off); 1350 1348 AssertLogRelRCReturn(rc, rc); 1351 if (off != HGSMIOFFSET_VOID)1349 if (off != HGSMIOFFSET_VOID) 1352 1350 { 1353 1351 /* There is a saved heap. */ … … 1370 1368 { 1371 1369 rc = hgsmiFIFOLock (pIns); 1372 if (RT_SUCCESS(rc))1370 if (RT_SUCCESS(rc)) 1373 1371 { 1374 1372 rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFO, pSSM); … … 1440 1438 */ 1441 1439 1442 static int hgsmiChannelMapCreate (PHGSMIINSTANCE pIns, 1443 const char *pszChannel, 1444 uint8_t *pu8Channel) 1445 { 1446 /* @todo later */ 1440 static int hgsmiChannelMapCreate(PHGSMIINSTANCE pIns, const char *pszChannel, uint8_t *pu8Channel) 1441 { 1442 RT_NOREF(pIns, pszChannel, pu8Channel); 1443 /** @todo later */ 1447 1444 return VERR_NOT_SUPPORTED; 1448 1445 } … … 1478 1475 /* Register a new HGSMI channel by name. 1479 1476 */ 1480 int HGSMIChannelRegisterName 1481 1482 1483 1484 1477 int HGSMIChannelRegisterName(PHGSMIINSTANCE pIns, 1478 const char *pszChannel, 1479 PFNHGSMICHANNELHANDLER pfnChannelHandler, 1480 void *pvChannelHandler, 1481 uint8_t *pu8Channel) 1485 1482 { 1486 1483 LogFlowFunc(("pIns %p, pszChannel %s, pfnChannelHandler %p, pvChannelHandler %p, pu8Channel %p\n", … … 1591 1588 1592 1589 HGSMIBUFFERLOCATION *pLoc = (HGSMIBUFFERLOCATION *)pvBuffer; 1593 if (pLoc->cbLocation != sizeof(HGSMIHOSTFLAGS))1590 if (pLoc->cbLocation != sizeof(HGSMIHOSTFLAGS)) 1594 1591 { 1595 1592 rc = VERR_INVALID_PARAMETER; … … 1705 1702 { 1706 1703 uint32_t flags = 0; 1707 if (pIns->pHGFlags)1704 if (pIns->pHGFlags) 1708 1705 { 1709 1706 /* treat the abandoned commands as read.. */ 1710 while(HGSMIHostRead (pIns) != HGSMIOFFSET_VOID) {} 1707 while (HGSMIHostRead(pIns) != HGSMIOFFSET_VOID) 1708 {} 1711 1709 flags = pIns->pHGFlags->u32HostFlags; 1712 1710 pIns->pHGFlags->u32HostFlags = 0; … … 1714 1712 1715 1713 /* .. and complete them */ 1716 while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {} 1714 while (hgsmiProcessHostCmdCompletion(pIns, 0, true)) 1715 {} 1717 1716 1718 1717 #ifdef VBOX_WITH_WDDM 1719 while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID) {} 1718 while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID) 1719 {} 1720 1720 #endif 1721 1721 … … 1794 1794 if (RT_SUCCESS (rc)) 1795 1795 { 1796 if (bDoIrq)1796 if (bDoIrq) 1797 1797 { 1798 1798 /* Now guest can read the FIFO, the notification is informational. */
Note:
See TracChangeset
for help on using the changeset viewer.