Changeset 51269 in vbox for trunk/src/VBox/Additions
- Timestamp:
- May 15, 2014 7:22:39 PM (11 years ago)
- 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 1406 1406 const DXGK_VIDPNTARGETMODESET_INTERFACE *pNewVidPnTargetModeSetInterface; 1407 1407 1408 Assert( VidPnSourceId == VidPnTargetId);1408 Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId); 1409 1409 1410 1410 D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet; … … 1446 1446 { 1447 1447 Assert(hNewVidPnTargetModeSet); 1448 Assert( VidPnSourceId == VidPnTargetId);1448 Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId); 1449 1449 // if (VidPnSourceId == VidPnTargetId && pCbContext->apPathInfos[VidPnTargetId].enmState == VBOXVIDPNPATHITEM_STATE_PRESENT) 1450 1450 { … … 1537 1537 const DXGK_VIDPNSOURCEMODESET_INTERFACE *pNewVidPnSourceModeSetInterface; 1538 1538 1539 Assert( VidPnSourceId == VidPnTargetId);1539 Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId); 1540 1540 1541 1541 D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet; … … 1577 1577 { 1578 1578 Assert(hNewVidPnSourceModeSet); 1579 Assert( VidPnSourceId == VidPnTargetId);1579 Assert(pDevExt->fCmdVbvaEnabled || VidPnSourceId == VidPnTargetId); 1580 1580 // if (VidPnSourceId == VidPnTargetId && pCbContext->apPathInfos[VidPnSourceId].enmState == VBOXVIDPNPATHITEM_STATE_PRESENT) 1581 1581 { … … 1741 1741 } 1742 1742 1743 static BOOLEAN vboxVidPnIsPathSupported( const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo)1744 { 1745 if ( pNewVidPnPresentPathInfo->VidPnSourceId != pNewVidPnPresentPathInfo->VidPnTargetId)1743 static BOOLEAN vboxVidPnIsPathSupported(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo) 1744 { 1745 if (!pDevExt->fCmdVbvaEnabled && pNewVidPnPresentPathInfo->VidPnSourceId != pNewVidPnPresentPathInfo->VidPnTargetId) 1746 1746 { 1747 1747 LOG(("unsupported source(%d)->target(%d) pair", pNewVidPnPresentPathInfo->VidPnSourceId, pNewVidPnPresentPathInfo->VidPnTargetId)); … … 1866 1866 typedef struct VBOXVIDPNGETPATHSINFO 1867 1867 { 1868 PVBOXMP_DEVEXT pDevExt; 1868 1869 NTSTATUS Status; 1869 1870 BOOLEAN fBreakOnDisabled; 1870 1871 BOOLEAN fDisabledFound; 1871 UINT cItems;1872 PVBOXVIDPNPATHITEM paItems;1873 1872 } VBOXVIDPNGETPATHSINFO, *PVBOXVIDPNGETPATHSINFO; 1874 1873 … … 1880 1879 CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId = pNewVidPnPresentPathInfo->VidPnSourceId; 1881 1880 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); 1929 1882 1930 1883 pCbContext->fDisabledFound |= fDisabledFound; … … 1938 1891 /* we currently support only 0 -> 0, 1 -> 1, 2 -> 2 paths, AND 0 -> 0 must be present 1939 1892 * 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); 1893 NTSTATUS VBoxVidPnCheckTopology(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported) 1894 { 1944 1895 UINT i; 1945 for (i = 0; i < cItems; ++i)1946 {1947 aItems[i].enmState = VBOXVIDPNPATHITEM_STATE_NOT_EXISTS;1948 }1949 1896 VBOXVIDPNGETPATHSINFO CbContext = {0}; 1897 CbContext.pDevExt = pDevExt; 1950 1898 CbContext.Status = STATUS_SUCCESS; 1951 1899 CbContext.fBreakOnDisabled = FALSE; 1952 1900 CbContext.fDisabledFound = FALSE; 1953 CbContext.cItems = cItems;1954 CbContext.paItems = aItems;1955 1901 NTSTATUS Status = vboxVidPnEnumPaths(hVidPnTopology, pVidPnTopologyInterface, vboxVidPnCheckTopologyEnum, &CbContext); 1956 1902 if (!NT_SUCCESS(Status)) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.h
r51260 r51269 166 166 NTSTATUS vboxVidPnCofuncModalityForPath(PVBOXVIDPNCOFUNCMODALITY pCbContext, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId); 167 167 168 NTSTATUS vboxVidPnCheckTopology(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported);168 NTSTATUS VBoxVidPnCheckTopology(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, BOOLEAN *pfSupported); 169 169 170 170 NTSTATUS vboxVidPnPathAdd(D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r51266 r51269 5053 5053 NTSTATUS Status = STATUS_SUCCESS; 5054 5054 5055 PVBOXMP_DEVEXT p Context = (PVBOXMP_DEVEXT)hAdapter;5055 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)hAdapter; 5056 5056 const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL; 5057 Status = p Context->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); 5058 5058 if (!NT_SUCCESS(Status)) 5059 5059 { … … 5063 5063 5064 5064 #ifdef VBOXWDDM_DEBUG_VIDPN 5065 vboxVidPnDumpVidPn("\n>>>>IS SUPPORTED VidPN : >>>>", p Context, pIsSupportedVidPnArg->hDesiredVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<");5065 vboxVidPnDumpVidPn("\n>>>>IS SUPPORTED VidPN : >>>>", pDevExt, pIsSupportedVidPnArg->hDesiredVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<"); 5066 5066 #endif 5067 5067 … … 5076 5076 5077 5077 BOOLEAN fSupported = FALSE; 5078 Status = vboxVidPnCheckTopology(hVidPnTopology, pVidPnTopologyInterface, &fSupported);5078 Status = VBoxVidPnCheckTopology(pDevExt, hVidPnTopology, pVidPnTopologyInterface, &fSupported); 5079 5079 if (!NT_SUCCESS(Status)) 5080 5080 { 5081 WARN((" vboxVidPnCheckTopology failed Status()0x%x\n", Status));5081 WARN(("VBoxVidPnCheckTopology failed Status()0x%x\n", Status)); 5082 5082 return Status; 5083 5083 } … … 5265 5265 5266 5266 #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 } 5276 5275 #endif 5277 5276 VBOXVIDPNCOFUNCMODALITY CbContext = {0};
Note:
See TracChangeset
for help on using the changeset viewer.