儲存庫 vbox 的更動 63051
- 時間撮記:
- 2016-8-5 下午03:21:48 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.cpp
r62522 r63051 184 184 } 185 185 186 static void vboxVidPnPopulateSourceModeInfo(D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, 187 const RTRECTSIZE *pSize) 188 { 189 NTSTATUS Status = STATUS_SUCCESS; 186 static void vboxVidPnPopulateSourceModeInfo(D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, const RTRECTSIZE *pSize) 187 { 190 188 /* this is a graphics mode */ 191 189 pNewVidPnSourceModeInfo->Type = D3DKMDT_RMT_GRAPHICS; … … 203 201 } 204 202 205 static void vboxVidPnPopulateMonitorModeInfo(D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode, 206 const RTRECTSIZE *pResolution) 203 static void vboxVidPnPopulateMonitorModeInfo(D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode, const RTRECTSIZE *pResolution) 207 204 { 208 205 vboxVidPnPopulateVideoSignalInfo(&pMonitorSourceMode->VideoSignalInfo, pResolution, 60 /* ULONG VSync */); … … 224 221 void VBoxVidPnStTargetCleanup(PVBOXWDDM_SOURCE paSources, uint32_t cScreens, PVBOXWDDM_TARGET pTarget) 225 222 { 223 RT_NOREF(cScreens); 226 224 if (pTarget->VidPnSourceId == D3DDDI_ID_UNINITIALIZED) 227 225 return; … … 439 437 pSize->cx = pPinnedVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cx; 440 438 pSize->cy = pPinnedVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cy; 441 NTSTATUS tmpStatus= pCurVidPnTargetModeSetInterface->pfnReleaseModeInfo(hCurVidPnTargetModeSet, pPinnedVidPnTargetModeInfo);442 Assert (NT_SUCCESS(tmpStatus));443 } 444 445 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet);446 Assert (tmpStatus == STATUS_SUCCESS);439 NTSTATUS rcNt2 = pCurVidPnTargetModeSetInterface->pfnReleaseModeInfo(hCurVidPnTargetModeSet, pPinnedVidPnTargetModeInfo); 440 AssertNtStatus(rcNt2); 441 } 442 443 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet); 444 AssertNtStatusSuccess(rcNt2); 447 445 448 446 return Status; … … 482 480 pSize->cx = pPinnedVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize.cx; 483 481 pSize->cy = pPinnedVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize.cy; 484 NTSTATUS tmpStatus= pCurVidPnSourceModeSetInterface->pfnReleaseModeInfo(hCurVidPnSourceModeSet, pPinnedVidPnSourceModeInfo);485 Assert (NT_SUCCESS(tmpStatus));486 } 487 488 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet);489 Assert (tmpStatus == STATUS_SUCCESS);482 NTSTATUS rcNt2 = pCurVidPnSourceModeSetInterface->pfnReleaseModeInfo(hCurVidPnSourceModeSet, pPinnedVidPnSourceModeInfo); 483 AssertNtStatus(rcNt2); 484 } 485 486 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet); 487 AssertNtStatusSuccess(rcNt2); 490 488 491 489 return Status; … … 543 541 WARN(("pfnAddMode failed, Status 0x%x", Status)); 544 542 VBoxVidPnDumpSourceMode("SourceMode: ", pVidPnModeInfo, "\n"); 545 NTSTATUS tmpStatus= pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);546 Assert (tmpStatus == STATUS_SUCCESS);543 NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo); 544 AssertNtStatusSuccess(rcNt2); 547 545 return Status; 548 546 } … … 603 601 WARN(("pfnAddMode failed, Status 0x%x", Status)); 604 602 VBoxVidPnDumpTargetMode("TargetMode: ", pVidPnModeInfo, "\n"); 605 NTSTATUS tmpStatus= pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);606 Assert (tmpStatus == STATUS_SUCCESS);603 NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo); 604 AssertNtStatusSuccess(rcNt2); 607 605 return Status; 608 606 } … … 662 660 { 663 661 WARN(("pfnAddMode (%d x %d) failed, Status 0x%x", size.cx, size.cy, Status)); 664 NTSTATUS tmpStatus= pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);665 Assert (tmpStatus == STATUS_SUCCESS);662 NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo); 663 AssertNtStatusSuccess(rcNt2); 666 664 continue; 667 665 } … … 713 711 } 714 712 715 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);716 Assert (tmpStatus == STATUS_SUCCESS);713 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet); 714 AssertNtStatusSuccess(rcNt2); 717 715 718 716 if (!NT_SUCCESS(Status)) … … 833 831 uint32_t *aAdjustedModeMap, 834 832 const CR_SORTARRAY *aModes, 835 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 836 { 833 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, 834 D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 835 { 836 RT_NOREF(aAdjustedModeMap, VidPnSourceId); 837 837 Assert(ASMBitTest(aAdjustedModeMap, VidPnTargetId)); 838 838 … … 872 872 vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n"); 873 873 VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n"); 874 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);875 Assert (tmpStatus == STATUS_SUCCESS);874 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet); 875 AssertNtStatusSuccess(rcNt2); 876 876 return Status; 877 877 } … … 883 883 vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n"); 884 884 VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n"); 885 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);886 Assert (tmpStatus == STATUS_SUCCESS);885 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet); 886 AssertNtStatusSuccess(rcNt2); 887 887 return Status; 888 888 } … … 907 907 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 908 908 { 909 RT_NOREF(aAdjustedModeMap); 909 910 Assert(ASMBitTest(aAdjustedModeMap, VidPnTargetId)); 910 911 … … 944 945 vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n"); 945 946 VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n"); 946 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);947 Assert (tmpStatus == STATUS_SUCCESS);947 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet); 948 AssertNtStatusSuccess(rcNt2); 948 949 return Status; 949 950 } … … 955 956 vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n"); 956 957 VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n"); 957 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);958 Assert (tmpStatus == STATUS_SUCCESS);958 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet); 959 AssertNtStatusSuccess(rcNt2); 959 960 return Status; 960 961 } … … 1003 1004 } 1004 1005 1005 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);1006 Assert (tmpStatus == STATUS_SUCCESS);1006 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet); 1007 AssertNtStatusSuccess(rcNt2); 1007 1008 1008 1009 if (!NT_SUCCESS(Status)) … … 1204 1205 1205 1206 done: 1206 NTSTATUS tmpStatus= pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet);1207 if (!NT_SUCCESS( tmpStatus))1208 WARN(("pfnReleaseMonitorSourceModeSet failed tmpStatus(0x%x)", tmpStatus));1207 NTSTATUS rcNt2 = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet); 1208 if (!NT_SUCCESS(rcNt2)) 1209 WARN(("pfnReleaseMonitorSourceModeSet failed rcNt2(0x%x)", rcNt2)); 1209 1210 1210 1211 CrSaCleanup(&DiffModes); … … 1270 1271 { 1271 1272 AssertFailed(); 1272 NTSTATUS tmpStatus= pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo);1273 Assert (NT_SUCCESS(tmpStatus));1273 NTSTATUS rcNt2 = pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo); 1274 AssertNtStatus(rcNt2); 1274 1275 } 1275 1276 … … 1366 1367 } 1367 1368 1368 if (!pDevExt->fComplexTopologiesEnabled && iSource != i)1369 if (!pDevExt->fComplexTopologiesEnabled && iSource != (int32_t)i) 1369 1370 { 1370 1371 WARN(("complex topologies not supported!")); … … 1451 1452 if (pVidPnModeInfo) 1452 1453 { 1453 NTSTATUS tmpStatus= pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);1454 Assert (tmpStatus == STATUS_SUCCESS);1454 NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo); 1455 AssertNtStatusSuccess(rcNt2); 1455 1456 } 1456 1457 } … … 1458 1459 WARN(("pfnCreateNewTargetModeSet failed %#x", Status)); 1459 1460 1460 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);1461 Assert (tmpStatus == STATUS_SUCCESS);1461 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet); 1462 AssertNtStatusSuccess(rcNt2); 1462 1463 } 1463 1464 else … … 1515 1516 if (pVidPnModeInfo) 1516 1517 { 1517 NTSTATUS tmpStatus= pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);1518 Assert (tmpStatus == STATUS_SUCCESS);1518 NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo); 1519 AssertNtStatusSuccess(rcNt2); 1519 1520 } 1520 1521 } … … 1522 1523 WARN(("pfnCreateNewSourceModeSet failed %#x", Status)); 1523 1524 1524 NTSTATUS tmpStatus= pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);1525 Assert (tmpStatus == STATUS_SUCCESS);1525 NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet); 1526 AssertNtStatusSuccess(rcNt2); 1526 1527 } 1527 1528 else … … 2188 2189 } 2189 2190 2190 NTSTATUS vboxVidPnSetupSourceInfo(PVBOXMP_DEVEXT pDevExt, CONST D3DKMDT_VIDPN_SOURCE_MODE* pVidPnSourceModeInfo, PVBOXWDDM_ALLOCATION pAllocation, 2191 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, VBOXWDDM_SOURCE *paSources) 2192 { 2191 NTSTATUS vboxVidPnSetupSourceInfo(PVBOXMP_DEVEXT pDevExt, CONST D3DKMDT_VIDPN_SOURCE_MODE* pVidPnSourceModeInfo, 2192 PVBOXWDDM_ALLOCATION pAllocation, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, 2193 VBOXWDDM_SOURCE *paSources) 2194 { 2195 RT_NOREF(pDevExt); 2193 2196 PVBOXWDDM_SOURCE pSource = &paSources[VidPnSourceId]; 2194 2197 /* pVidPnSourceModeInfo could be null if STATUS_GRAPHICS_MODE_NOT_PINNED, … … 2279 2282 } VBOXVIDPNCOMMITTARGETMODE; 2280 2283 2281 DECLCALLBACK(BOOLEAN) vboxVidPnCommitTargetModeEnum(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, 2282 CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths, PVOID pContext) 2283 { 2284 DECLCALLBACK(BOOLEAN) vboxVidPnCommitTargetModeEnum(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, 2285 const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, 2286 CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, 2287 D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths, 2288 PVOID pContext) 2289 { 2290 RT_NOREF(hVidPnTopology, pVidPnTopologyInterface, cTgtPaths); 2284 2291 VBOXVIDPNCOMMITTARGETMODE *pInfo = (VBOXVIDPNCOMMITTARGETMODE*)pContext; 2285 2292 Assert(cTgtPaths <= (SIZE_T)VBoxCommonFromDeviceExt(pDevExt)->cDisplays); … … 2906 2913 } 2907 2914 2908 NTSTATUS tmpStatus= pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet);2909 if (!NT_SUCCESS( tmpStatus))2910 WARN(("pfnReleaseMonitorSourceModeSet failed tmpStatus(0x%x)", tmpStatus));2915 NTSTATUS rcNt2 = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet); 2916 if (!NT_SUCCESS(rcNt2)) 2917 WARN(("pfnReleaseMonitorSourceModeSet failed rcNt2(0x%x)", rcNt2)); 2911 2918 2912 2919 LOGREL_EXACT(("%s", pSuffix)); … … 2953 2960 2954 2961 2955 DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface, 2956 const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext) 2957 { 2962 DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, 2963 const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface, 2964 const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext) 2965 { 2966 2967 RT_NOREF(hNewVidPnSourceModeSet, pVidPnSourceModeSetInterface, pNewVidPnSourceModeInfo, pContext); 2958 2968 VBoxVidPnDumpSourceMode("SourceMode: ", pNewVidPnSourceModeInfo, "\n"); 2959 2969 return TRUE; 2960 2970 } 2961 2971 2962 void vboxVidPnDumpSourceModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId) 2963 { 2972 void vboxVidPnDumpSourceModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 2973 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId) 2974 { 2975 RT_NOREF(pDevExt); 2964 2976 LOGREL_EXACT((" >>>+++SourceMode Set for Source(%d)+++\n", VidPnSourceId)); 2965 2977 D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet; … … 2991 3003 } 2992 3004 2993 DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface, 2994 const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext) 2995 { 3005 DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, 3006 const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface, 3007 const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext) 3008 { 3009 RT_NOREF(hNewVidPnTargetModeSet, pVidPnTargetModeSetInterface, pNewVidPnTargetModeInfo, pContext); 2996 3010 VBoxVidPnDumpTargetMode("TargetMode: ", pNewVidPnTargetModeInfo, "\n"); 2997 3011 return TRUE; 2998 3012 } 2999 3013 3000 void vboxVidPnDumpTargetModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 3001 { 3014 void vboxVidPnDumpTargetModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 3015 D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 3016 { 3017 RT_NOREF(pDevExt); 3002 3018 LOGREL_EXACT((" >>>---TargetMode Set for Target(%d)---\n", VidPnTargetId)); 3003 3019 D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器