VirtualBox

Changeset 45132 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Mar 21, 2013 4:11:28 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: seamles mode support impl; bugfizes & cleanup

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  
    348348}
    349349
    350 DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const PVBOXWDDM_DIRTYREGION pInfo2)
     350DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const VBOXWDDM_DIRTYREGION *pInfo2)
    351351{
    352352    if (pInfo2->fFlags & VBOXWDDM_DIRTYREGION_F_VALID)
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp

    r44529 r45132  
    157157{
    158158    DWORD fFlags;
    159     PVBOXWDDMDISP_ALLOCATION pAlloc;
     159    const VBOXWDDMDISP_ALLOCATION *pAlloc;
    160160    IDirect3DResource9 *pD3DRc;
    161     RECT *pRect;
     161    const RECT *pRect;
    162162} VBOXVDBG_DUMP_INFO, *PVBOXVDBG_DUMP_INFO;
    163163
     
    167167static VOID vboxVDbgDoDumpSummary(const char * pPrefix, PVBOXVDBG_DUMP_INFO pInfo, const char * pSuffix)
    168168{
    169     PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc;
     169    const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc;
    170170    IDirect3DResource9 *pD3DRc = pInfo->pD3DRc;
    171171    char rectBuf[24];
     
    220220static DECLCALLBACK(void) vboxVDbgAllocRectContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper)
    221221{
    222     PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc;
     222    const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc;
    223223    const RECT *pRect = pInfo->pRect;
    224224
     
    275275static DECLCALLBACK(void) vboxVDbgRcRectContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper)
    276276{
    277     PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc;
     277    const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc;
    278278    IDirect3DResource9 *pD3DRc = pInfo->pD3DRc;
    279279    const RECT *pRect = pInfo->pRect;
     
    418418static DECLCALLBACK(void) vboxVDbgLockUnlockSurfTexContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper)
    419419{
    420     PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc;
    421     PRECT pRect = pInfo->pRect;
     420    const VBOXWDDMDISP_ALLOCATION *pAlloc = pInfo->pAlloc;
     421    const RECT *pRect = pInfo->pRect;
    422422    UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format);
    423423    uint32_t width, height, pitch;
     
    452452}
    453453
    454 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, const char * pSuffix, DWORD fFlags)
     454VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const VBOXWDDMDISP_ALLOCATION *pAlloc, const char * pSuffix, DWORD fFlags)
    455455{
    456456    Assert(!pAlloc->hSharedHandle);
    457457
    458     RECT Rect, *pRect;
     458    RECT Rect;
     459    const RECT *pRect;
    459460    Assert(!pAlloc->LockInfo.fFlags.RangeValid);
    460461    Assert(!pAlloc->LockInfo.fFlags.BoxValid);
     
    482483VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags)
    483484{
    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
    487491    vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, fFlags);
    488492}
     
    490494VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags)
    491495{
    492     const PVBOXWDDMDISP_RESOURCE pRc = (const PVBOXWDDMDISP_RESOURCE)pData->hResource;
    493     const PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->SubResourceIndex];
     496    const VBOXWDDMDISP_RESOURCE *pRc = (const VBOXWDDMDISP_RESOURCE*)pData->hResource;
     497    const VBOXWDDMDISP_ALLOCATION *pAlloc = &pRc->aAllocations[pData->SubResourceIndex];
    494498    vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, fFlags);
    495499}
     
    529533}
    530534
    531 BOOL vboxVDbgDoCheckRectsMatch(const PVBOXWDDMDISP_RESOURCE pDstRc, uint32_t iDstAlloc,
    532                             const PVBOXWDDMDISP_RESOURCE pSrcRc, uint32_t iSrcAlloc,
     535BOOL vboxVDbgDoCheckRectsMatch(const VBOXWDDMDISP_RESOURCE *pDstRc, uint32_t iDstAlloc,
     536                            const VBOXWDDMDISP_RESOURCE *pSrcRc, uint32_t iSrcAlloc,
    533537                            const RECT *pDstRect,
    534538                            const RECT *pSrcRect,
     
    593597
    594598    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);
    596600    if (FAILED(hr))
    597601    {
     
    600604    }
    601605
    602     hr = VBoxD3DIfLockRect(pSrcRc, iSrcAlloc, &SrcLRect, pSrcRect, D3DLOCK_READONLY);
     606    hr = VBoxD3DIfLockRect((VBOXWDDMDISP_RESOURCE *)pSrcRc, iSrcAlloc, &SrcLRect, pSrcRect, D3DLOCK_READONLY);
    603607    if (FAILED(hr))
    604608    {
    605609        WARN(("VBoxD3DIfLockRect failed, hr(0x%x)", hr));
    606         hr = VBoxD3DIfUnlockRect(pDstRc, iDstAlloc);
     610        hr = VBoxD3DIfUnlockRect((VBOXWDDMDISP_RESOURCE *)pDstRc, iDstAlloc);
    607611        return FALSE;
    608612    }
     
    610614    fMatch = vboxVDbgDoCheckLRects(&DstLRect, pDstRect, &SrcLRect, pSrcRect, bpp, fBreakOnMismatch);
    611615
    612     hr = VBoxD3DIfUnlockRect(pDstRc, iDstAlloc);
     616    hr = VBoxD3DIfUnlockRect((VBOXWDDMDISP_RESOURCE *)pDstRc, iDstAlloc);
    613617    Assert(hr == S_OK);
    614618
    615     hr = VBoxD3DIfUnlockRect(pSrcRc, iSrcAlloc);
     619    hr = VBoxD3DIfUnlockRect((VBOXWDDMDISP_RESOURCE *)pSrcRc, iSrcAlloc);
    616620    Assert(hr == S_OK);
    617621
     
    619623}
    620624
    621 void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix)
     625void vboxVDbgDoPrintAlloc(const char * pPrefix, const VBOXWDDMDISP_RESOURCE *pRc, uint32_t iAlloc, const char * pSuffix)
    622626{
    623627    Assert(pRc->cAllocations > iAlloc);
    624     const PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[iAlloc];
     628    const VBOXWDDMDISP_ALLOCATION *pAlloc = &pRc->aAllocations[iAlloc];
    625629    BOOL bPrimary = pRc->RcDesc.fFlags.Primary;
    626630    BOOL bFrontBuf = FALSE;
    627631    if (bPrimary)
    628632    {
    629         PVBOXWDDMDISP_SWAPCHAIN pSwapchain = vboxWddmSwapchainForAlloc(pAlloc);
     633        PVBOXWDDMDISP_SWAPCHAIN pSwapchain = vboxWddmSwapchainForAlloc((VBOXWDDMDISP_ALLOCATION *)pAlloc);
    630634        Assert(pSwapchain);
    631635        bFrontBuf = (vboxWddmSwapchainGetFb(pSwapchain)->pAlloc == pAlloc);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h

    r44529 r45132  
    234234VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, RECT *pRect, const char* pSuffix, DWORD fFlags);
    235235VOID vboxVDbgDoDumpRcRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DResource9 *pD3DRc, RECT *pRect, const char * pSuffix, DWORD fFlags);
    236 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, const char * pSuffix, DWORD fFlags);
     236VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const VBOXWDDMDISP_ALLOCATION *pAlloc, const char * pSuffix, DWORD fFlags);
    237237VOID vboxVDbgDoDumpRt(const char * pPrefix, struct VBOXWDDMDISP_DEVICE *pDevice, const char * pSuffix, DWORD fFlags);
    238238VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix, DWORD fFlags);
     
    241241
    242242void vboxVDbgDoPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix);
    243 void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix);
     243void vboxVDbgDoPrintAlloc(const char * pPrefix, const VBOXWDDMDISP_RESOURCE *pRc, uint32_t iAlloc, const char * pSuffix);
    244244
    245245VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags);
    246246VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags);
    247247
    248 BOOL vboxVDbgDoCheckRectsMatch(const PVBOXWDDMDISP_RESOURCE pDstRc, uint32_t iDstAlloc,
    249                             const PVBOXWDDMDISP_RESOURCE pSrcRc, uint32_t iSrcAlloc,
     248BOOL vboxVDbgDoCheckRectsMatch(const VBOXWDDMDISP_RESOURCE *pDstRc, uint32_t iDstAlloc,
     249                            const VBOXWDDMDISP_RESOURCE *pSrcRc, uint32_t iSrcAlloc,
    250250                            const RECT *pDstRect,
    251251                            const RECT *pSrcRect,
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp

    r44529 r45132  
    16891689}
    16901690
    1691 typedef DECLCALLBACK(int) FNVBOXWDDMVR_CB_COMPARATOR(const PVBOXWDDMVR_REG pReg1, const PVBOXWDDMVR_REG pReg2);
     1691typedef DECLCALLBACK(int) FNVBOXWDDMVR_CB_COMPARATOR(const VBOXWDDMVR_REG *pReg1, const VBOXWDDMVR_REG *pReg2);
    16921692typedef FNVBOXWDDMVR_CB_COMPARATOR *PFNVBOXWDDMVR_CB_COMPARATOR;
    16931693
     
    20802080}
    20812081
    2082 static NTSTATUS vboxWddmVrListSubstNoJoin(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN *pfChanged)
     2082static NTSTATUS vboxWddmVrListSubstNoJoin(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged)
    20832083{
    20842084    if (VBoxWddmVrListIsEmpty(pList))
     
    21032103
    21042104#if 0
    2105 static const PRECT vboxWddmVrRectsOrder(UINT cRects, const PRECT aRects)
     2105static const RECT* vboxWddmVrRectsOrder(UINT cRects, const RECT *aRects)
    21062106{
    21072107#ifdef DEBUG
     
    21742174}
    21752175
    2176 NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN *pfChanged)
     2176NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged)
    21772177{
    21782178#if 0
    2179     const PRECT pRects = vboxWddmVrRectsOrder(cRects, aRects);
     2179    const RECT *pRects = vboxWddmVrRectsOrder(cRects, aRects);
    21802180    if (!pRects)
    21812181    {
     
    22052205}
    22062206
    2207 NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN *pfChanged)
     2207NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged)
    22082208{
    22092209    UINT cCovered = 0;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h

    r44529 r45132  
    191191void VBoxWddmVrListTranslate(PVBOXWDDMVR_LIST pList, LONG x, LONG y);
    192192
    193 NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN *pfChanged);
    194 NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN *pfChanged);
     193NTSTATUS VBoxWddmVrListRectsAdd(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged);
     194NTSTATUS VBoxWddmVrListRectsSubst(PVBOXWDDMVR_LIST pList, UINT cRects, const RECT *aRects, BOOLEAN *pfChanged);
    195195NTSTATUS VBoxWddmVrListRectsGet(PVBOXWDDMVR_LIST pList, UINT cRects, PRECT aRects);
    196196
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp

    r44529 r45132  
    312312}
    313313
    314 DECLINLINE(void) vboxVdmaDirtyRectsCalcIntersection(const RECT *pArea, const PVBOXWDDM_RECTS_INFO pRects, PVBOXWDDM_RECTS_INFO pResult)
     314DECLINLINE(void) vboxVdmaDirtyRectsCalcIntersection(const RECT *pArea, const VBOXWDDM_RECTS_INFO *pRects, PVBOXWDDM_RECTS_INFO pResult)
    315315{
    316316    uint32_t cRects = 0;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r45037 r45132  
    138138}
    139139
    140 NTSTATUS vboxWddmGhDisplayPostInfoScreenBySDesc (PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_SURFACE_DESC pDesc, const POINT * pVScreenPos, uint16_t fFlags)
     140NTSTATUS vboxWddmGhDisplayPostInfoScreenBySDesc (PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_SURFACE_DESC *pDesc, const POINT * pVScreenPos, uint16_t fFlags)
    141141{
    142142    void *p = VBoxHGSMIBufferAlloc (&VBoxCommonFromDeviceExt(pDevExt)->guestCtx,
     
    168168}
    169169
    170 NTSTATUS vboxWddmGhDisplayPostInfoScreen(PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_ALLOC_DATA pAllocData, const POINT * pVScreenPos)
     170NTSTATUS vboxWddmGhDisplayPostInfoScreen(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos)
    171171{
    172172    NTSTATUS Status = vboxWddmGhDisplayPostInfoScreenBySDesc(pDevExt, &pAllocData->SurfDesc, pVScreenPos, VBVA_SCREEN_F_ACTIVE);
     
    187187}
    188188
    189 NTSTATUS vboxWddmGhDisplayPostInfoView(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_ALLOC_DATA pAllocData)
     189NTSTATUS vboxWddmGhDisplayPostInfoView(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData)
    190190{
    191191    VBOXVIDEOOFFSET offVram = pAllocData->Addr.offVram;
     
    220220}
    221221
    222 NTSTATUS vboxWddmGhDisplaySetMode(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_ALLOC_DATA pAllocData)
     222NTSTATUS vboxWddmGhDisplaySetMode(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData)
    223223{
    224224//    PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pPrimaryInfo = VBOXWDDM_ALLOCATION_BODY(pAllocation, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
     
    270270}
    271271
    272 NTSTATUS vboxWddmGhDisplaySetInfo(PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_ALLOC_DATA pAllocData, const POINT * pVScreenPos)
     272NTSTATUS vboxWddmGhDisplaySetInfo(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos)
    273273{
    274274    NTSTATUS Status = vboxWddmGhDisplaySetMode(pDevExt, pAllocData);
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