Changeset 45132 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Mar 21, 2013 4:11:28 PM (12 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoTools.h
r43334 r45132 348 348 } 349 349 350 DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const PVBOXWDDM_DIRTYREGIONpInfo2)350 DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const VBOXWDDM_DIRTYREGION *pInfo2) 351 351 { 352 352 if (pInfo2->fFlags & VBOXWDDM_DIRTYREGION_F_VALID) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp
r44529 r45132 157 157 { 158 158 DWORD fFlags; 159 PVBOXWDDMDISP_ALLOCATIONpAlloc;159 const VBOXWDDMDISP_ALLOCATION *pAlloc; 160 160 IDirect3DResource9 *pD3DRc; 161 RECT *pRect;161 const RECT *pRect; 162 162 } VBOXVDBG_DUMP_INFO, *PVBOXVDBG_DUMP_INFO; 163 163 … … 167 167 static VOID vboxVDbgDoDumpSummary(const char * pPrefix, PVBOXVDBG_DUMP_INFO pInfo, const char * pSuffix) 168 168 { 169 PVBOXWDDMDISP_ALLOCATIONpAlloc = pInfo->pAlloc;169 const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc; 170 170 IDirect3DResource9 *pD3DRc = pInfo->pD3DRc; 171 171 char rectBuf[24]; … … 220 220 static DECLCALLBACK(void) vboxVDbgAllocRectContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper) 221 221 { 222 PVBOXWDDMDISP_ALLOCATIONpAlloc = pInfo->pAlloc;222 const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc; 223 223 const RECT *pRect = pInfo->pRect; 224 224 … … 275 275 static DECLCALLBACK(void) vboxVDbgRcRectContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper) 276 276 { 277 PVBOXWDDMDISP_ALLOCATIONpAlloc = pInfo->pAlloc;277 const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc; 278 278 IDirect3DResource9 *pD3DRc = pInfo->pD3DRc; 279 279 const RECT *pRect = pInfo->pRect; … … 418 418 static DECLCALLBACK(void) vboxVDbgLockUnlockSurfTexContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper) 419 419 { 420 PVBOXWDDMDISP_ALLOCATIONpAlloc = pInfo->pAlloc;421 PRECTpRect = pInfo->pRect;420 const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc; 421 const RECT *pRect = pInfo->pRect; 422 422 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 423 423 uint32_t width, height, pitch; … … 452 452 } 453 453 454 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATIONpAlloc, const char * pSuffix, DWORD fFlags)454 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const VBOXWDDMDISP_ALLOCATION *pAlloc, const char * pSuffix, DWORD fFlags) 455 455 { 456 456 Assert(!pAlloc->hSharedHandle); 457 457 458 RECT Rect, *pRect; 458 RECT Rect; 459 const RECT *pRect; 459 460 Assert(!pAlloc->LockInfo.fFlags.RangeValid); 460 461 Assert(!pAlloc->LockInfo.fFlags.BoxValid); … … 482 483 VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags) 483 484 { 484 const PVBOXWDDMDISP_RESOURCE pRc = (const PVBOXWDDMDISP_RESOURCE)pData->hResource; 485 const PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->SubResourceIndex]; 486 pAlloc->LockInfo.pvData = pData->pSurfData; 485 const VBOXWDDMDISP_RESOURCE *pRc = (const VBOXWDDMDISP_RESOURCE*)pData->hResource; 486 const VBOXWDDMDISP_ALLOCATION *pAlloc = &pRc->aAllocations[pData->SubResourceIndex]; 487 #ifdef VBOXWDDMDISP_DEBUG 488 VBOXWDDMDISP_ALLOCATION *pUnconstpAlloc = (VBOXWDDMDISP_ALLOCATION *)pAlloc; 489 pUnconstpAlloc->LockInfo.pvData = pData->pSurfData; 490 #endif 487 491 vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, fFlags); 488 492 } … … 490 494 VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags) 491 495 { 492 const PVBOXWDDMDISP_RESOURCE pRc = (const PVBOXWDDMDISP_RESOURCE)pData->hResource;493 const PVBOXWDDMDISP_ALLOCATIONpAlloc = &pRc->aAllocations[pData->SubResourceIndex];496 const VBOXWDDMDISP_RESOURCE *pRc = (const VBOXWDDMDISP_RESOURCE*)pData->hResource; 497 const VBOXWDDMDISP_ALLOCATION *pAlloc = &pRc->aAllocations[pData->SubResourceIndex]; 494 498 vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, fFlags); 495 499 } … … 529 533 } 530 534 531 BOOL vboxVDbgDoCheckRectsMatch(const PVBOXWDDMDISP_RESOURCEpDstRc, uint32_t iDstAlloc,532 const PVBOXWDDMDISP_RESOURCEpSrcRc, uint32_t iSrcAlloc,535 BOOL vboxVDbgDoCheckRectsMatch(const VBOXWDDMDISP_RESOURCE *pDstRc, uint32_t iDstAlloc, 536 const VBOXWDDMDISP_RESOURCE *pSrcRc, uint32_t iSrcAlloc, 533 537 const RECT *pDstRect, 534 538 const RECT *pSrcRect, … … 593 597 594 598 D3DLOCKED_RECT SrcLRect, DstLRect; 595 HRESULT hr = VBoxD3DIfLockRect( pDstRc, iDstAlloc, &DstLRect, pDstRect, D3DLOCK_READONLY);599 HRESULT hr = VBoxD3DIfLockRect((VBOXWDDMDISP_RESOURCE *)pDstRc, iDstAlloc, &DstLRect, pDstRect, D3DLOCK_READONLY); 596 600 if (FAILED(hr)) 597 601 { … … 600 604 } 601 605 602 hr = VBoxD3DIfLockRect( pSrcRc, iSrcAlloc, &SrcLRect, pSrcRect, D3DLOCK_READONLY);606 hr = VBoxD3DIfLockRect((VBOXWDDMDISP_RESOURCE *)pSrcRc, iSrcAlloc, &SrcLRect, pSrcRect, D3DLOCK_READONLY); 603 607 if (FAILED(hr)) 604 608 { 605 609 WARN(("VBoxD3DIfLockRect failed, hr(0x%x)", hr)); 606 hr = VBoxD3DIfUnlockRect( pDstRc, iDstAlloc);610 hr = VBoxD3DIfUnlockRect((VBOXWDDMDISP_RESOURCE *)pDstRc, iDstAlloc); 607 611 return FALSE; 608 612 } … … 610 614 fMatch = vboxVDbgDoCheckLRects(&DstLRect, pDstRect, &SrcLRect, pSrcRect, bpp, fBreakOnMismatch); 611 615 612 hr = VBoxD3DIfUnlockRect( pDstRc, iDstAlloc);616 hr = VBoxD3DIfUnlockRect((VBOXWDDMDISP_RESOURCE *)pDstRc, iDstAlloc); 613 617 Assert(hr == S_OK); 614 618 615 hr = VBoxD3DIfUnlockRect( pSrcRc, iSrcAlloc);619 hr = VBoxD3DIfUnlockRect((VBOXWDDMDISP_RESOURCE *)pSrcRc, iSrcAlloc); 616 620 Assert(hr == S_OK); 617 621 … … 619 623 } 620 624 621 void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCEpRc, uint32_t iAlloc, const char * pSuffix)625 void vboxVDbgDoPrintAlloc(const char * pPrefix, const VBOXWDDMDISP_RESOURCE *pRc, uint32_t iAlloc, const char * pSuffix) 622 626 { 623 627 Assert(pRc->cAllocations > iAlloc); 624 const PVBOXWDDMDISP_ALLOCATIONpAlloc = &pRc->aAllocations[iAlloc];628 const VBOXWDDMDISP_ALLOCATION *pAlloc = &pRc->aAllocations[iAlloc]; 625 629 BOOL bPrimary = pRc->RcDesc.fFlags.Primary; 626 630 BOOL bFrontBuf = FALSE; 627 631 if (bPrimary) 628 632 { 629 PVBOXWDDMDISP_SWAPCHAIN pSwapchain = vboxWddmSwapchainForAlloc( pAlloc);633 PVBOXWDDMDISP_SWAPCHAIN pSwapchain = vboxWddmSwapchainForAlloc((VBOXWDDMDISP_ALLOCATION *)pAlloc); 630 634 Assert(pSwapchain); 631 635 bFrontBuf = (vboxWddmSwapchainGetFb(pSwapchain)->pAlloc == pAlloc); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h
r44529 r45132 234 234 VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, RECT *pRect, const char* pSuffix, DWORD fFlags); 235 235 VOID vboxVDbgDoDumpRcRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DResource9 *pD3DRc, RECT *pRect, const char * pSuffix, DWORD fFlags); 236 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATIONpAlloc, const char * pSuffix, DWORD fFlags);236 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const VBOXWDDMDISP_ALLOCATION *pAlloc, const char * pSuffix, DWORD fFlags); 237 237 VOID vboxVDbgDoDumpRt(const char * pPrefix, struct VBOXWDDMDISP_DEVICE *pDevice, const char * pSuffix, DWORD fFlags); 238 238 VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix, DWORD fFlags); … … 241 241 242 242 void vboxVDbgDoPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix); 243 void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCEpRc, uint32_t iAlloc, const char * pSuffix);243 void vboxVDbgDoPrintAlloc(const char * pPrefix, const VBOXWDDMDISP_RESOURCE *pRc, uint32_t iAlloc, const char * pSuffix); 244 244 245 245 VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags); 246 246 VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags); 247 247 248 BOOL vboxVDbgDoCheckRectsMatch(const PVBOXWDDMDISP_RESOURCEpDstRc, uint32_t iDstAlloc,249 const PVBOXWDDMDISP_RESOURCEpSrcRc, uint32_t iSrcAlloc,248 BOOL vboxVDbgDoCheckRectsMatch(const VBOXWDDMDISP_RESOURCE *pDstRc, uint32_t iDstAlloc, 249 const VBOXWDDMDISP_RESOURCE *pSrcRc, uint32_t iSrcAlloc, 250 250 const RECT *pDstRect, 251 251 const RECT *pSrcRect, -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r44529 r45132 1689 1689 } 1690 1690 1691 typedef DECLCALLBACK(int) FNVBOXWDDMVR_CB_COMPARATOR(const PVBOXWDDMVR_REG pReg1, const PVBOXWDDMVR_REGpReg2);1691 typedef DECLCALLBACK(int) FNVBOXWDDMVR_CB_COMPARATOR(const VBOXWDDMVR_REG *pReg1, const VBOXWDDMVR_REG *pReg2); 1692 1692 typedef FNVBOXWDDMVR_CB_COMPARATOR *PFNVBOXWDDMVR_CB_COMPARATOR; 1693 1693 … … 2080 2080 } 2081 2081 2082 static NTSTATUS vboxWddmVrListSubstNoJoin(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECTaRects, BOOLEAN *pfChanged)2082 static NTSTATUS vboxWddmVrListSubstNoJoin(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged) 2083 2083 { 2084 2084 if (VBoxWddmVrListIsEmpty(pList)) … … 2103 2103 2104 2104 #if 0 2105 static const PRECT vboxWddmVrRectsOrder(UINT cRects, const PRECTaRects)2105 static const RECT* vboxWddmVrRectsOrder(UINT cRects, const RECT *aRects) 2106 2106 { 2107 2107 #ifdef DEBUG … … 2174 2174 } 2175 2175 2176 NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECTaRects, BOOLEAN *pfChanged)2176 NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged) 2177 2177 { 2178 2178 #if 0 2179 const PRECTpRects = vboxWddmVrRectsOrder(cRects, aRects);2179 const RECT *pRects = vboxWddmVrRectsOrder(cRects, aRects); 2180 2180 if (!pRects) 2181 2181 { … … 2205 2205 } 2206 2206 2207 NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECTaRects, BOOLEAN *pfChanged)2207 NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged) 2208 2208 { 2209 2209 UINT cCovered = 0; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h
r44529 r45132 191 191 void VBoxWddmVrListTranslate(PVBOXWDDMVR_LIST pList, LONG x, LONG y); 192 192 193 NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECTaRects, BOOLEAN *pfChanged);194 NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECTaRects, BOOLEAN *pfChanged);193 NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged); 194 NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged); 195 195 NTSTATUS VBoxWddmVrListRectsGet(PVBOXWDDMVR_LIST pList, UINT cRects, PRECT aRects); 196 196 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp
r44529 r45132 312 312 } 313 313 314 DECLINLINE(void) vboxVdmaDirtyRectsCalcIntersection(const RECT *pArea, const PVBOXWDDM_RECTS_INFOpRects, PVBOXWDDM_RECTS_INFO pResult)314 DECLINLINE(void) vboxVdmaDirtyRectsCalcIntersection(const RECT *pArea, const VBOXWDDM_RECTS_INFO *pRects, PVBOXWDDM_RECTS_INFO pResult) 315 315 { 316 316 uint32_t cRects = 0; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r45037 r45132 138 138 } 139 139 140 NTSTATUS vboxWddmGhDisplayPostInfoScreenBySDesc (PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_SURFACE_DESCpDesc, const POINT * pVScreenPos, uint16_t fFlags)140 NTSTATUS vboxWddmGhDisplayPostInfoScreenBySDesc (PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_SURFACE_DESC *pDesc, const POINT * pVScreenPos, uint16_t fFlags) 141 141 { 142 142 void *p = VBoxHGSMIBufferAlloc (&VBoxCommonFromDeviceExt(pDevExt)->guestCtx, … … 168 168 } 169 169 170 NTSTATUS vboxWddmGhDisplayPostInfoScreen(PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_ALLOC_DATApAllocData, const POINT * pVScreenPos)170 NTSTATUS vboxWddmGhDisplayPostInfoScreen(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos) 171 171 { 172 172 NTSTATUS Status = vboxWddmGhDisplayPostInfoScreenBySDesc(pDevExt, &pAllocData->SurfDesc, pVScreenPos, VBVA_SCREEN_F_ACTIVE); … … 187 187 } 188 188 189 NTSTATUS vboxWddmGhDisplayPostInfoView(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_ALLOC_DATApAllocData)189 NTSTATUS vboxWddmGhDisplayPostInfoView(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData) 190 190 { 191 191 VBOXVIDEOOFFSET offVram = pAllocData->Addr.offVram; … … 220 220 } 221 221 222 NTSTATUS vboxWddmGhDisplaySetMode(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_ALLOC_DATApAllocData)222 NTSTATUS vboxWddmGhDisplaySetMode(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData) 223 223 { 224 224 // PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pPrimaryInfo = VBOXWDDM_ALLOCATION_BODY(pAllocation, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE); … … 270 270 } 271 271 272 NTSTATUS vboxWddmGhDisplaySetInfo(PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_ALLOC_DATApAllocData, const POINT * pVScreenPos)272 NTSTATUS vboxWddmGhDisplaySetInfo(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos) 273 273 { 274 274 NTSTATUS Status = vboxWddmGhDisplaySetMode(pDevExt, pAllocData);
Note:
See TracChangeset
for help on using the changeset viewer.