VirtualBox

Ignore:
Timestamp:
Jul 9, 2013 4:27:54 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
87103
Message:

wddm/3d: fixes to r0-based presentation

File:
1 edited

Legend:

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

    r47049 r47059  
    135135
    136136    pSource->pShadowAllocation = pAllocation;
     137
     138    Assert(!pSource->AllocData.pSwapchain);
     139    Assert(!pSource->AllocData.hostID);
    137140}
    138141#endif
     
    168171    }
    169172
    170     if (pDevExt->fTexPresentEnabled)
    171     {
    172         /* only submit TexPresent if host supports it and it is enabled */
    173         if (pAllocation && pAllocation->hostID)
    174         {
    175             NTSTATUS Status = vboxVdmaTexPresentSetAlloc(pDevExt, srcId, pAllocation);
    176             if (!NT_SUCCESS(Status))
    177             {
    178                 WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status));
    179             }
    180 
    181             VBoxVrListClear(&pSource->VrList);
    182             pSource->fHas3DVrs = TRUE;
    183         }
    184         else
    185         {
    186             if (pSource->fHas3DVrs)
    187             {
    188                 NTSTATUS Status = vboxVdmaTexPresentSetAlloc(pDevExt, srcId, NULL);
    189                 if (!NT_SUCCESS(Status))
    190                 {
    191                     WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status));
    192                 }
    193                 pSource->fHas3DVrs = FALSE;
    194             }
    195 
    196             RTRECT Rect;
    197             Rect.xLeft = 0;
    198             Rect.yTop = 0;
    199             Rect.xRight = pAllocation ? pAllocation->AllocData.SurfDesc.width : pSource->AllocData.SurfDesc.width;
    200             Rect.yBottom = pAllocation ? pAllocation->AllocData.SurfDesc.height : pSource->AllocData.SurfDesc.height;
    201 
    202             VBoxVrListRectsSet(&pSource->VrList, 1, &Rect, NULL);
    203         }
    204     }
    205     else
    206     {
    207         Assert(!pSource->fHas3DVrs);
    208     }
    209 
    210173    KIRQL OldIrql;
    211174    KeAcquireSpinLock(&pSource->AllocationLock, &OldIrql);
    212175    pSource->pPrimaryAllocation = pAllocation;
    213176    KeReleaseSpinLock(&pSource->AllocationLock, OldIrql);
     177
     178    Assert(!pSource->AllocData.pSwapchain);
     179    Assert(!pSource->AllocData.hostID);
    214180}
    215181
     
    231197# ifdef VBOX_WDDM_WIN8
    232198#  define VBOXWDDM_IS_FB_ALLOCATION(_pDevExt, _pAlloc) ( (_pAlloc)->bAssigned \
    233         && (  (_pAlloc)->enmType == VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC \
     199        && (  (_pAlloc)->AllocData.hostID \
    234200           || (_pAlloc)->enmType == \
    235201               ((g_VBoxDisplayOnly || (_pDevExt)->fRenderToShadowDisabled) ? VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE : VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE) \
     
    237203# else
    238204#  define VBOXWDDM_IS_FB_ALLOCATION(_pDevExt, _pAlloc) ( (_pAlloc)->bAssigned \
    239         && (  (_pAlloc)->enmType == VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC \
     205        && (  (_pAlloc)->AllocData.hostID \
    240206           || (_pAlloc)->enmType == \
    241207               (((_pDevExt)->fRenderToShadowDisabled) ? VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE : VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE) \
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette