- Timestamp:
- Sep 14, 2016 6:35:39 AM (8 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPDevExt.h
r63039 r63823 66 66 67 67 BOOLEAN fAnyX; /* Unrestricted horizontal resolution flag. */ 68 uint16_t u16SupportedScreenFlags; /* VBVA_SCREEN_F_* flags supported by the host. */ 68 69 } VBOXMP_COMMON, *PVBOXMP_COMMON; 69 70 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPHGSMI.cpp
r63046 r63823 127 127 /* Query the configured number of displays. */ 128 128 pCommon->cDisplays = VBoxHGSMIGetMonitorCount(&pCommon->guestCtx); 129 /* Query supported VBVA_SCREEN_F_* flags. */ 130 pCommon->u16SupportedScreenFlags = VBoxHGSMIGetScreenFlags(&pCommon->guestCtx); 129 131 LOGF_LEAVE(); 130 132 return; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPTypes.h
r63646 r63823 129 129 BOOLEAN fTargetsReported; 130 130 BOOLEAN bVisible; 131 BOOLEAN bBlankedByPowerOff; 131 132 #ifdef VBOX_WITH_CROGL 132 133 /* specifies whether the source has 3D overlay data visible */ … … 160 161 bool fConnected; 161 162 bool fConfigured; 163 bool fBlankedByPowerOff; 162 164 } VBOXWDDM_TARGET, *PVBOXWDDM_TARGET; 163 165 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.cpp
r63646 r63823 2327 2327 NTSTATUS VBoxVidPnCommitSourceModeForSrcId(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 2328 2328 PVBOXWDDM_ALLOCATION pAllocation, 2329 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, VBOXWDDM_SOURCE *paSources, VBOXWDDM_TARGET *paTargets )2329 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, VBOXWDDM_SOURCE *paSources, VBOXWDDM_TARGET *paTargets, BOOLEAN bPathPowerTransition) 2330 2330 { 2331 2331 D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet; … … 2333 2333 2334 2334 PVBOXWDDM_SOURCE pSource = &paSources[VidPnSourceId]; 2335 pSource->bBlankedByPowerOff = bPathPowerTransition ? pAllocation == NULL : 0; 2336 2335 2337 VBOXWDDM_TARGET_ITER Iter; 2336 2338 VBoxVidPnStTIterInit(pSource, paTargets, (uint32_t)VBoxCommonFromDeviceExt(pDevExt)->cDisplays, &Iter); … … 2342 2344 pTarget->Size.cx = 0; 2343 2345 pTarget->Size.cy = 0; 2346 pTarget->fBlankedByPowerOff = RT_BOOL(pSource->bBlankedByPowerOff); 2344 2347 pTarget->u8SyncState &= ~VBOXWDDM_HGSYNC_F_SYNCED_ALL; 2345 2348 } … … 2456 2459 { 2457 2460 Status = VBoxVidPnCommitSourceModeForSrcId(pDevExt, hDesiredVidPn, pVidPnInterface, pAllocation, 2458 pPath->VidPnSourceId, paSources, paTargets );2461 pPath->VidPnSourceId, paSources, paTargets, FALSE); 2459 2462 if (Status != STATUS_SUCCESS) 2460 2463 { -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.h
r63646 r63823 74 74 NTSTATUS VBoxVidPnCommitSourceModeForSrcId(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 75 75 PVBOXWDDM_ALLOCATION pAllocation, 76 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, VBOXWDDM_SOURCE *paSources, VBOXWDDM_TARGET *paTargets );76 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, VBOXWDDM_SOURCE *paSources, VBOXWDDM_TARGET *paTargets, BOOLEAN bPathPowerTransition); 77 77 78 78 NTSTATUS VBoxVidPnCommitAll(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r63815 r63823 280 280 int rc; 281 281 282 if (!(fFlags & VBVA_SCREEN_F_DISABLED))282 if (!(fFlags & (VBVA_SCREEN_F_DISABLED | VBVA_SCREEN_F_BLANK2))) 283 283 { 284 284 rc = vboxWddmGhDisplayPostInfoView(pDevExt, pAllocData); … … 345 345 } 346 346 347 NTSTATUS vboxWddmGhDisplaySetInfoLegacy(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos, uint8_t u8CurCyncState) 347 static uint16_t vboxWddmCalcScreenFlags(PVBOXMP_DEVEXT pDevExt, bool fValidAlloc, bool fPowerOff) 348 { 349 uint16_t u16Flags; 350 351 if (fValidAlloc) 352 { 353 u16Flags = VBVA_SCREEN_F_ACTIVE; 354 } 355 else 356 { 357 if ( fPowerOff 358 && RT_BOOL(VBoxCommonFromDeviceExt(pDevExt)->u16SupportedScreenFlags & VBVA_SCREEN_F_BLANK2)) 359 { 360 u16Flags = VBVA_SCREEN_F_ACTIVE | VBVA_SCREEN_F_BLANK2; 361 } 362 else 363 { 364 u16Flags = VBVA_SCREEN_F_DISABLED; 365 } 366 } 367 368 return u16Flags; 369 } 370 371 NTSTATUS vboxWddmGhDisplaySetInfoLegacy(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos, uint8_t u8CurCyncState, bool fPowerOff) 348 372 { 349 373 NTSTATUS Status = STATUS_SUCCESS; 350 bool fEnabled = !!pAllocData->SurfDesc.width; 351 uint16_t fu16Flags = fEnabled ? VBVA_SCREEN_F_ACTIVE : VBVA_SCREEN_F_DISABLED; 352 if (fEnabled) 374 bool fValidAlloc = pAllocData->SurfDesc.width > 0 && pAllocData->SurfDesc.height > 0; 375 uint16_t fu16Flags = vboxWddmCalcScreenFlags(pDevExt, fValidAlloc, fPowerOff); 376 377 if (fValidAlloc) 353 378 { 354 379 #ifdef VBOX_WITH_CROGL … … 374 399 { 375 400 #ifdef VBOX_WITH_CROGL 376 if (f Enabled&& pDevExt->f3DEnabled)401 if (fValidAlloc && pDevExt->f3DEnabled) 377 402 { 378 403 Status = vboxVdmaTexPresentSetAlloc(pDevExt, pAllocData); … … 395 420 } 396 421 397 NTSTATUS vboxWddmGhDisplaySetInfoNew(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const uint32_t *pTargetMap, const POINT * pVScreenPos, uint8_t u8CurCyncState )422 NTSTATUS vboxWddmGhDisplaySetInfoNew(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const uint32_t *pTargetMap, const POINT * pVScreenPos, uint8_t u8CurCyncState, bool fPowerOff) 398 423 { 399 424 NTSTATUS Status = STATUS_SUCCESS; 400 bool fEnabled = !!pAllocData->SurfDesc.width; 401 uint16_t fu16Flags = fEnabled ? VBVA_SCREEN_F_ACTIVE : VBVA_SCREEN_F_DISABLED; 402 if (fEnabled) 425 bool fValidAlloc = pAllocData->SurfDesc.width > 0 && pAllocData->SurfDesc.height > 0; 426 uint16_t fu16Flags = vboxWddmCalcScreenFlags(pDevExt, fValidAlloc, fPowerOff); 427 428 if (fValidAlloc) 403 429 { 404 430 #ifdef VBOX_WITH_CROGL … … 423 449 { 424 450 #ifdef VBOX_WITH_CROGL 425 if (f Enabled&& pDevExt->f3DEnabled)451 if (fValidAlloc && pDevExt->f3DEnabled) 426 452 { 427 453 Status = vboxVdmaTexPresentSetAlloc(pDevExt, pAllocData); … … 467 493 } 468 494 469 NTSTATUS Status = vboxWddmGhDisplaySetInfoNew(pDevExt, &pSource->AllocData, pTargetMap, &pSource->VScreenPos, pSource->u8SyncState );495 NTSTATUS Status = vboxWddmGhDisplaySetInfoNew(pDevExt, &pSource->AllocData, pTargetMap, &pSource->VScreenPos, pSource->u8SyncState, RT_BOOL(pSource->bBlankedByPowerOff)); 470 496 if (NT_SUCCESS(Status)) 471 497 { … … 513 539 { 514 540 AllocData.SurfDesc.VidPnSourceId = pTarget->u32Id; 515 NTSTATUS Status = vboxWddmGhDisplaySetInfoLegacy(pDevExt, &AllocData, &pSource->VScreenPos, pSource->u8SyncState | pTarget->u8SyncState );541 NTSTATUS Status = vboxWddmGhDisplaySetInfoLegacy(pDevExt, &AllocData, &pSource->VScreenPos, pSource->u8SyncState | pTarget->u8SyncState, pTarget->fBlankedByPowerOff); 516 542 if (NT_SUCCESS(Status)) 517 543 pTarget->u8SyncState = VBOXWDDM_HGSYNC_F_SYNCED_ALL; … … 548 574 549 575 bool fFound = false; 576 bool fPowerOff = false; 550 577 for (int i = 0; i < VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i) 551 578 { … … 559 586 560 587 if (pTarget->u8SyncState != VBOXWDDM_HGSYNC_F_SYNCED_ALL) 588 { 561 589 fFound = true; 590 /* Assume that either all targets are powered off or all are disabled (usually true). */ 591 fPowerOff = pTarget->fBlankedByPowerOff; 592 } 562 593 563 594 ASMBitSet(aTargetMap, i); … … 570 601 VBOXWDDM_ALLOC_DATA AllocData; 571 602 VBoxVidPnAllocDataInit(&AllocData, D3DDDI_ID_UNINITIALIZED); 572 NTSTATUS Status = vboxWddmGhDisplaySetInfoNew(pDevExt, &AllocData, aTargetMap, &VScreenPos, 0 );603 NTSTATUS Status = vboxWddmGhDisplaySetInfoNew(pDevExt, &AllocData, aTargetMap, &VScreenPos, 0, fPowerOff); 573 604 if (!NT_SUCCESS(Status)) 574 605 { … … 614 645 fFound = true; 615 646 AllocData.SurfDesc.VidPnSourceId = i; 616 NTSTATUS Status = vboxWddmGhDisplaySetInfoLegacy(pDevExt, &AllocData, &VScreenPos, 0 );647 NTSTATUS Status = vboxWddmGhDisplaySetInfoLegacy(pDevExt, &AllocData, &VScreenPos, 0, pTarget->fBlankedByPowerOff); 617 648 if (NT_SUCCESS(Status)) 618 649 pTarget->u8SyncState = VBOXWDDM_HGSYNC_F_SYNCED_ALL; … … 5359 5390 pCommitVidPnArg->hFunctionalVidPn, pVidPnInterface, 5360 5391 (PVBOXWDDM_ALLOCATION)pCommitVidPnArg->hPrimaryAllocation, 5361 pCommitVidPnArg->AffectedVidPnSourceId, paSources, paTargets );5392 pCommitVidPnArg->AffectedVidPnSourceId, paSources, paTargets, pCommitVidPnArg->Flags.PathPowerTransition); 5362 5393 if (!NT_SUCCESS(Status)) 5363 5394 { -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.h
r63646 r63823 171 171 { 172 172 VBOXVIDEOOFFSET offVram = vboxWddmAddrFramOffset(&pAllocData->Addr); 173 if (offVram == VBOXVIDEOOFFSET_VOID && !(fFlags & VBVA_SCREEN_F_DISABLED))173 if (offVram == VBOXVIDEOOFFSET_VOID && !(fFlags & (VBVA_SCREEN_F_DISABLED | VBVA_SCREEN_F_BLANK2))) 174 174 { 175 175 WARN(("offVram == VBOXVIDEOOFFSET_VOID"));
Note:
See TracChangeset
for help on using the changeset viewer.