VirtualBox

Ignore:
Timestamp:
Jul 1, 2013 2:02:37 PM (11 years ago)
Author:
vboxsync
Message:

crOpenGL: TexPresent fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.h

    r46757 r46885  
    168168    }
    169169
    170     if (pAllocation && pAllocation->enmType == VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE)
    171     {
     170    if (pAllocation && pAllocation->hostID)
     171    {
     172        NTSTATUS Status = vboxVdmaTexPresentSetAlloc(pDevExt, srcId, pAllocation);
     173        if (!NT_SUCCESS(Status))
     174        {
     175            WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status));
     176        }
     177
     178        VBoxVrListClear(&pSource->VrList);
     179        pSource->fHas3DVrs = TRUE;
     180    }
     181    else
     182    {
     183        if (pSource->fHas3DVrs)
     184        {
     185            NTSTATUS Status = vboxVdmaTexPresentSetAlloc(pDevExt, srcId, NULL);
     186            if (!NT_SUCCESS(Status))
     187            {
     188                WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status));
     189            }
     190            pSource->fHas3DVrs = FALSE;
     191        }
     192
    172193        RTRECT Rect;
    173194        Rect.xLeft = 0;
    174195        Rect.yTop = 0;
    175         Rect.xRight = pAllocation->AllocData.SurfDesc.width;
    176         Rect.yBottom = pAllocation->AllocData.SurfDesc.height;
     196        Rect.xRight = pAllocation ? pAllocation->AllocData.SurfDesc.width : pSource->AllocData.SurfDesc.width;
     197        Rect.yBottom = pAllocation ? pAllocation->AllocData.SurfDesc.height : pSource->AllocData.SurfDesc.height;
    177198
    178199        VBoxVrListRectsSet(&pSource->VrList, 1, &Rect, NULL);
    179200    }
    180     else
    181         VBoxVrListClear(&pSource->VrList);
    182 
    183     pSource->fHas3DVrs = FALSE;
    184201
    185202    KIRQL OldIrql;
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