VirtualBox

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


Ignore:
Timestamp:
Mar 1, 2012 9:56:01 AM (13 years ago)
Author:
vboxsync
Message:

wddm/3d: disible rects fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp

    r39981 r40309  
    16531653#define PVBOXWDDMVR_REG_FROM_ENTRY(_pEntry) ((PVBOXWDDMVR_REG)(((uint8_t*)(_pEntry)) - RT_OFFSETOF(VBOXWDDMVR_REG, ListEntry)))
    16541654
     1655#ifdef DEBUG_misha
     1656# define VBOXVDBG_VR_LAL_DISABLE
     1657#endif
     1658
     1659#ifndef VBOXVDBG_VR_LAL_DISABLE
    16551660static LOOKASIDE_LIST_EX g_VBoxWddmVrLookasideList;
     1661#endif
    16561662
    16571663static PVBOXWDDMVR_REG vboxWddmVrRegCreate()
    16581664{
     1665#ifndef VBOXVDBG_VR_LAL_DISABLE
    16591666    PVBOXWDDMVR_REG pReg = (PVBOXWDDMVR_REG)ExAllocateFromLookasideListEx(&g_VBoxWddmVrLookasideList);
    16601667    if (!pReg)
     
    16631670    }
    16641671    return pReg;
     1672#else
     1673    return (PVBOXWDDMVR_REG)vboxWddmMemAlloc(sizeof (VBOXWDDMVR_REG));
     1674#endif
    16651675}
    16661676
    16671677static void vboxWddmVrRegTerm(PVBOXWDDMVR_REG pReg)
    16681678{
     1679#ifndef VBOXVDBG_VR_LAL_DISABLE
    16691680    ExFreeToLookasideListEx(&g_VBoxWddmVrLookasideList, pReg);
     1681#else
     1682    vboxWddmMemFree(pReg);
     1683#endif
    16701684}
    16711685
     
    16861700NTSTATUS VBoxWddmVrInit()
    16871701{
     1702#ifndef VBOXVDBG_VR_LAL_DISABLE
    16881703    NTSTATUS Status = ExInitializeLookasideListEx(&g_VBoxWddmVrLookasideList,
    16891704                            NULL, /* PALLOCATE_FUNCTION_EX Allocate */
     
    17001715        return Status;
    17011716    }
     1717#endif
     1718
    17021719    return STATUS_SUCCESS;
    17031720}
     
    17051722void VBoxWddmVrTerm()
    17061723{
     1724#ifndef VBOXVDBG_VR_LAL_DISABLE
    17071725    ExDeleteLookasideListEx(&g_VBoxWddmVrLookasideList);
     1726#endif
    17081727}
    17091728
     
    18901909typedef FNVBOXWDDMVR_CB_INTERSECTED_VISITOR *PFNVBOXWDDMVR_CB_INTERSECTED_VISITOR;
    18911910
    1892 static void vboxWddmVrListVisitIntersected(PVBOXWDDMVR_LIST pList1, UINT cRects, const RECT *aRects, BOOLEAN fRectsNonintersectedOrdered, PFNVBOXWDDMVR_CB_INTERSECTED_VISITOR pfnVisitor, void* pvVisitor)
     1911static void vboxWddmVrListVisitIntersected(PVBOXWDDMVR_LIST pList1, UINT cRects, const RECT *aRects, PFNVBOXWDDMVR_CB_INTERSECTED_VISITOR pfnVisitor, void* pvVisitor)
    18931912{
    18941913    PLIST_ENTRY pEntry1 = pList1->ListHead.Flink;
     
    19041923            const RECT *pRect2 = &aRects[i];
    19051924            if (pReg1->Rect.bottom <= pRect2->top)
    1906             {
    1907                 if (fRectsNonintersectedOrdered)
    1908                     break; /* the forthcomming rects won't intersect as well since they have at least not bigget top */
    1909                 else
    1910                     continue; /* no assumptions, just continue */
    1911             }
     1925                continue;
    19121926            else if (pRect2->bottom <= pReg1->Rect.top)
    1913             {
    1914                 if (fRectsNonintersectedOrdered)
    1915                 {
    1916                     iFirst2 = i + 1; /* the previous rects including this one have top < pRect2->bottom,
    1917                                       * while the forhtcoming pRegs will have top >= pReg1->Rect.top
    1918                                       * so we can start with the next rect next time */
    1919                 }
    19201927                continue;
    1921             }
    19221928            /* y coords intersect */
    19231929            else if (pReg1->Rect.right <= pRect2->left)
     
    21122118}
    21132119
    2114 static NTSTATUS vboxWddmVrListSubstNoJoin(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN fRectsNonintersectedOrdered, BOOLEAN *pfChanged)
     2120static NTSTATUS vboxWddmVrListSubstNoJoin(PVBOXWDDMVR_LIST pList, UINT cRects, const PRECT aRects, BOOLEAN *pfChanged)
    21152121{
    21162122    if (VBoxWddmVrListIsEmpty(pList))
     
    21232129    *pfChanged = FALSE;
    21242130
    2125     vboxWddmVrListVisitIntersected(pList, cRects, aRects, fRectsNonintersectedOrdered, vboxWddmVrListSubstNoJoinCb, &Data);
     2131    vboxWddmVrListVisitIntersected(pList, cRects, aRects, vboxWddmVrListSubstNoJoinCb, &Data);
    21262132    if (!NT_SUCCESS(Data.Status))
    21272133    {
     
    22172223#endif
    22182224
    2219     NTSTATUS Status = vboxWddmVrListSubstNoJoin(pList, cRects, aRects,
    2220             FALSE, /* rects can be of any type, i.e. can intersect and can NOT be ordered */
    2221             pfChanged);
     2225    NTSTATUS Status = vboxWddmVrListSubstNoJoin(pList, cRects, aRects, pfChanged);
    22222226    if (!NT_SUCCESS(Status))
    22232227    {
     
    23372341
    23382342        BOOLEAN fDummyChanged = FALSE;
    2339         Status = vboxWddmVrListSubstNoJoin(&DiffList, cListRects, pListRects, TRUE, &fDummyChanged);
     2343        Status = vboxWddmVrListSubstNoJoin(&DiffList, cListRects, pListRects, &fDummyChanged);
    23402344        if (!NT_SUCCESS(Status))
    23412345        {
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