VirtualBox

Changeset 51269 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
May 15, 2014 7:22:39 PM (11 years ago)
Author:
vboxsync
Message:

wddm: enable complex topology for CmdVbva

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

Legend:

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

    r51260 r51269  
    14061406    const DXGK_VIDPNTARGETMODESET_INTERFACE *pNewVidPnTargetModeSetInterface;
    14071407
    1408     Assert(VidPnSourceId == VidPnTargetId);
     1408    Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId);
    14091409
    14101410    D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet;
     
    14461446        {
    14471447            Assert(hNewVidPnTargetModeSet);
    1448             Assert(VidPnSourceId == VidPnTargetId);
     1448            Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId);
    14491449//            if (VidPnSourceId == VidPnTargetId && pCbContext->apPathInfos[VidPnTargetId].enmState == VBOXVIDPNPATHITEM_STATE_PRESENT)
    14501450            {
     
    15371537    const DXGK_VIDPNSOURCEMODESET_INTERFACE *pNewVidPnSourceModeSetInterface;
    15381538
    1539     Assert(VidPnSourceId == VidPnTargetId);
     1539    Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId);
    15401540
    15411541    D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet;
     
    15771577        {
    15781578            Assert(hNewVidPnSourceModeSet);
    1579             Assert(VidPnSourceId == VidPnTargetId);
     1579            Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId);
    15801580//            if (VidPnSourceId == VidPnTargetId && pCbContext->apPathInfos[VidPnSourceId].enmState == VBOXVIDPNPATHITEM_STATE_PRESENT)
    15811581            {
     
    17411741}
    17421742
    1743 static BOOLEAN vboxVidPnIsPathSupported(const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo)
    1744 {
    1745     if (pNewVidPnPresentPathInfo->VidPnSourceId != pNewVidPnPresentPathInfo->VidPnTargetId)
     1743static BOOLEAN vboxVidPnIsPathSupported(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo)
     1744{
     1745    if (!pDevExt->fCmdVbvaEnabled && pNewVidPnPresentPathInfo->VidPnSourceId != pNewVidPnPresentPathInfo->VidPnTargetId)
    17461746    {
    17471747        LOG(("unsupported source(%d)->target(%d) pair", pNewVidPnPresentPathInfo->VidPnSourceId, pNewVidPnPresentPathInfo->VidPnTargetId));
     
    18661866typedef struct VBOXVIDPNGETPATHSINFO
    18671867{
     1868    PVBOXMP_DEVEXT pDevExt;
    18681869    NTSTATUS Status;
    18691870    BOOLEAN fBreakOnDisabled;
    18701871    BOOLEAN fDisabledFound;
    1871     UINT cItems;
    1872     PVBOXVIDPNPATHITEM paItems;
    18731872} VBOXVIDPNGETPATHSINFO, *PVBOXVIDPNGETPATHSINFO;
    18741873
     
    18801879    CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId = pNewVidPnPresentPathInfo->VidPnSourceId;
    18811880    CONST D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId = pNewVidPnPresentPathInfo->VidPnTargetId;
    1882     BOOLEAN fDisabledFound = !vboxVidPnIsPathSupported(pNewVidPnPresentPathInfo);
    1883     do
    1884     {
    1885         if (fDisabledFound)
    1886         {
    1887             if (pCbContext->cItems > VidPnSourceId)
    1888             {
    1889                 pCbContext->paItems[VidPnSourceId].enmState = VBOXVIDPNPATHITEM_STATE_DISABLED;
    1890             }
    1891             else
    1892             {
    1893                 WARN(("cItems(%d) <= VidPnSourceId(%d)", pCbContext->cItems, VidPnSourceId));
    1894                 Status = STATUS_BUFFER_OVERFLOW;
    1895                 break;
    1896             }
    1897 
    1898             if (pCbContext->cItems > VidPnTargetId)
    1899             {
    1900                 pCbContext->paItems[VidPnTargetId].enmState = VBOXVIDPNPATHITEM_STATE_DISABLED;
    1901             }
    1902             else
    1903             {
    1904                 WARN(("cItems(%d) <= VidPnTargetId(%d)", pCbContext->cItems, VidPnTargetId));
    1905                 Status = STATUS_BUFFER_OVERFLOW;
    1906                 break;
    1907             }
    1908 
    1909             break;
    1910         }
    1911 
    1912         /* VidPnSourceId == VidPnTargetId */
    1913         Assert(VidPnSourceId == VidPnTargetId);
    1914         if (pCbContext->cItems > VidPnSourceId)
    1915         {
    1916             if (pCbContext->paItems[VidPnSourceId].enmState != VBOXVIDPNPATHITEM_STATE_DISABLED)
    1917             {
    1918                 Assert(pCbContext->paItems[VidPnSourceId].enmState == VBOXVIDPNPATHITEM_STATE_NOT_EXISTS);
    1919                 pCbContext->paItems[VidPnSourceId].enmState = VBOXVIDPNPATHITEM_STATE_PRESENT;
    1920             }
    1921         }
    1922         else
    1923         {
    1924             WARN(("cItems(%d) <= VidPnSource/TargetId(%d)", pCbContext->cItems, VidPnSourceId));
    1925             Status = STATUS_BUFFER_OVERFLOW;
    1926             break;
    1927         }
    1928     } while (0);
     1881    BOOLEAN fDisabledFound = !vboxVidPnIsPathSupported(pCbContext->pDevExt, pNewVidPnPresentPathInfo);
    19291882
    19301883    pCbContext->fDisabledFound |= fDisabledFound;
     
    19381891/* we currently support only 0 -> 0, 1 -> 1, 2 -> 2 paths, AND 0 -> 0 must be present
    19391892 * this routine disables all paths unsupported */
    1940 NTSTATUS vboxVidPnCheckTopology(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported)
    1941 {
    1942     VBOXVIDPNPATHITEM aItems[VBOX_VIDEO_MAX_SCREENS];
    1943     const uint32_t cItems = RT_ELEMENTS(aItems);
     1893NTSTATUS VBoxVidPnCheckTopology(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported)
     1894{
    19441895    UINT i;
    1945     for (i = 0; i < cItems; ++i)
    1946     {
    1947         aItems[i].enmState = VBOXVIDPNPATHITEM_STATE_NOT_EXISTS;
    1948     }
    19491896    VBOXVIDPNGETPATHSINFO CbContext = {0};
     1897    CbContext.pDevExt = pDevExt;
    19501898    CbContext.Status = STATUS_SUCCESS;
    19511899    CbContext.fBreakOnDisabled = FALSE;
    19521900    CbContext.fDisabledFound = FALSE;
    1953     CbContext.cItems = cItems;
    1954     CbContext.paItems = aItems;
    19551901    NTSTATUS Status = vboxVidPnEnumPaths(hVidPnTopology, pVidPnTopologyInterface, vboxVidPnCheckTopologyEnum, &CbContext);
    19561902    if (!NT_SUCCESS(Status))
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.h

    r51260 r51269  
    166166NTSTATUS vboxVidPnCofuncModalityForPath(PVBOXVIDPNCOFUNCMODALITY pCbContext, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId);
    167167
    168 NTSTATUS vboxVidPnCheckTopology(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported);
     168NTSTATUS VBoxVidPnCheckTopology(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported);
    169169
    170170NTSTATUS vboxVidPnPathAdd(D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r51266 r51269  
    50535053    NTSTATUS Status = STATUS_SUCCESS;
    50545054
    5055     PVBOXMP_DEVEXT pContext = (PVBOXMP_DEVEXT)hAdapter;
     5055    PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)hAdapter;
    50565056    const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
    5057     Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pIsSupportedVidPnArg->hDesiredVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
     5057    Status = pDevExt->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pIsSupportedVidPnArg->hDesiredVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
    50585058    if (!NT_SUCCESS(Status))
    50595059    {
     
    50635063
    50645064#ifdef VBOXWDDM_DEBUG_VIDPN
    5065     vboxVidPnDumpVidPn("\n>>>>IS SUPPORTED VidPN : >>>>", pContext, pIsSupportedVidPnArg->hDesiredVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<");
     5065    vboxVidPnDumpVidPn("\n>>>>IS SUPPORTED VidPN : >>>>", pDevExt, pIsSupportedVidPnArg->hDesiredVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<");
    50665066#endif
    50675067
     
    50765076
    50775077    BOOLEAN fSupported = FALSE;
    5078     Status = vboxVidPnCheckTopology(hVidPnTopology, pVidPnTopologyInterface, &fSupported);
     5078    Status = VBoxVidPnCheckTopology(pDevExt, hVidPnTopology, pVidPnTopologyInterface, &fSupported);
    50795079    if (!NT_SUCCESS(Status))
    50805080    {
    5081         WARN(("vboxVidPnCheckTopology failed Status()0x%x\n", Status));
     5081        WARN(("VBoxVidPnCheckTopology failed Status()0x%x\n", Status));
    50825082        return Status;
    50835083    }
     
    52655265
    52665266#ifdef DEBUG_misha
    5267     BOOLEAN fSupported = FALSE;
    5268     Status = vboxVidPnCheckTopology(hVidPnTopology, pVidPnTopologyInterface, &fSupported);
    5269     if (!NT_SUCCESS(Status))
    5270     {
    5271         WARN(("vboxVidPnCheckTopology failed Status()0x%x\n", Status));
    5272         return Status;
    5273     }
    5274 
    5275     Assert(fSupported);
     5267    {
     5268        BOOLEAN fSupported = FALSE;
     5269        Status = VBoxVidPnCheckTopology(pDevExt, hVidPnTopology, pVidPnTopologyInterface, &fSupported);
     5270        if (!NT_SUCCESS(Status))
     5271            WARN(("VBoxVidPnCheckTopology failed Status()0x%x\n", Status));
     5272
     5273        Assert(fSupported);
     5274    }
    52765275#endif
    52775276    VBOXVIDPNCOFUNCMODALITY CbContext = {0};
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