VirtualBox

Changeset 51943 in vbox


Ignore:
Timestamp:
Jul 8, 2014 6:51:19 PM (10 years ago)
Author:
vboxsync
Message:

wddm: fix display-only

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPVidModes.cpp

    r51260 r51943  
    277277#else
    278278    ULONG vramSize = vboxWddmVramCpuVisibleSegmentSize(pExt);
    279     /* at least two surfaces will be needed: primary & shadow */
    280     vramSize /= 2 * pExt->u.primary.commonInfo.cDisplays;
     279    vramSize /= pExt->u.primary.commonInfo.cDisplays;
     280# ifdef VBOX_WDDM_WIN8
     281    if (!g_VBoxDisplayOnly)
     282# endif
     283    {
     284        /* at least two surfaces will be needed: primary & shadow */
     285        vramSize /= 2;
     286    }
     287    vramSize &= ~PAGE_OFFSET_MASK;
    281288#endif
    282289
     
    605612        vramSize /= 2;
    606613    }
     614    vramSize &= ~PAGE_OFFSET_MASK;
    607615#endif
    608616
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp

    r51361 r51943  
    20722072}
    20732073
    2074 void vboxWddmDmAdjustDefaultVramLocations(PVBOXMP_DEVEXT pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID ModifiedVidPnSourceId, VBOXWDDM_SOURCE *paSources)
     2074void vboxWddmDmSetupDefaultVramLocation(PVBOXMP_DEVEXT pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID ModifiedVidPnSourceId, VBOXWDDM_SOURCE *paSources)
    20752075{
    20762076    PVBOXWDDM_SOURCE pSource = &paSources[ModifiedVidPnSourceId];
    2077     PHYSICAL_ADDRESS PhAddr;
    2078     AssertRelease(pSource->AllocData.Addr.SegmentId);
    2079     AssertRelease(pSource->AllocData.Addr.offVram != VBOXVIDEOOFFSET_VOID);
    2080     PhAddr.QuadPart = pSource->AllocData.Addr.offVram;
    2081 
    2082     for (UINT i = ModifiedVidPnSourceId + 1; i < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i)
    2083     {
    2084         /* increaze the phaddr based on the previous source size info */
    2085         PhAddr.QuadPart += pSource->AllocData.SurfDesc.cbSize;
    2086         PhAddr.QuadPart = ROUND_TO_PAGES(PhAddr.QuadPart);
    2087         pSource = &paSources[i];
    2088         if (pSource->AllocData.Addr.offVram != PhAddr.QuadPart
    2089                 || pSource->AllocData.Addr.SegmentId != 1)
    2090             pSource->u8SyncState &= ~VBOXWDDM_HGSYNC_F_SYNCED_LOCATION;
    2091         pSource->AllocData.Addr.SegmentId = 1;
    2092         pSource->AllocData.Addr.offVram = PhAddr.QuadPart;
    2093     }
     2077    AssertRelease(g_VBoxDisplayOnly);
     2078    ULONG offVram = vboxWddmVramCpuVisibleSegmentSize(pDevExt);
     2079    offVram /= VBoxCommonFromDeviceExt(pDevExt)->cDisplays;
     2080    offVram &= ~PAGE_OFFSET_MASK;
     2081    offVram *= ModifiedVidPnSourceId;
     2082
     2083    if (vboxWddmAddrSetVram(&pSource->AllocData.Addr, 1, offVram))
     2084        pSource->u8SyncState &= ~VBOXWDDM_HGSYNC_F_SYNCED_LOCATION;
    20942085}
    20952086#endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h

    r51260 r51943  
    185185void vboxWddmDiInitDefault(DXGK_DISPLAY_INFORMATION *pInfo, PHYSICAL_ADDRESS PhAddr, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId);
    186186void vboxWddmDiToAllocData(PVBOXMP_DEVEXT pDevExt, const DXGK_DISPLAY_INFORMATION *pInfo, struct VBOXWDDM_ALLOC_DATA *pAllocData);
    187 void vboxWddmDmAdjustDefaultVramLocations(PVBOXMP_DEVEXT pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID ModifiedVidPnSourceId, struct VBOXWDDM_SOURCE *paSources);
     187void vboxWddmDmSetupDefaultVramLocation(PVBOXMP_DEVEXT pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID ModifiedVidPnSourceId, struct VBOXWDDM_SOURCE *paSources);
    188188#endif
    189189
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.cpp

    r51330 r51943  
    22242224        if (g_VBoxDisplayOnly)
    22252225        {
    2226             vboxWddmDmAdjustDefaultVramLocations(pDevExt, VidPnSourceId, paSources);
     2226            vboxWddmDmSetupDefaultVramLocation(pDevExt, VidPnSourceId, paSources);
    22272227        }
    22282228#endif
     
    22352235    }
    22362236
    2237     vboxWddmAssignPrimary(pSource, pAllocation, VidPnSourceId);
     2237#ifdef VBOX_WDDM_WIN8
     2238    if (!g_VBoxDisplayOnly)
     2239        vboxWddmAssignPrimary(pSource, pAllocation, VidPnSourceId);
     2240    else
     2241        Assert(!pAllocation);
     2242#endif
    22382243
    22392244    Assert(pSource->AllocData.SurfDesc.VidPnSourceId == VidPnSourceId);
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