Changeset 27230 in vbox
- Timestamp:
- Mar 9, 2010 6:22:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.cpp
r27228 r27230 42 42 { 43 43 dprintf(("unsupported Scaling (%d)\n", pNewVidPnPresentPathInfo->ContentTransformation.Scaling)); 44 AssertBreakpoint(); 44 45 bSupported = FALSE; 45 46 break; … … 49 50 { 50 51 dprintf(("unsupported Scaling support (Stretched)\n")); 52 AssertBreakpoint(); 51 53 bSupported = FALSE; 52 54 break; … … 57 59 { 58 60 dprintf(("\"Identity\" or \"Centered\" Scaling support not set\n")); 61 AssertBreakpoint(); 59 62 bSupported = FALSE; 60 63 break; … … 65 68 { 66 69 dprintf(("unsupported rotation (%d)\n", pNewVidPnPresentPathInfo->ContentTransformation.Rotation)); 70 AssertBreakpoint(); 67 71 bSupported = FALSE; 68 72 break; … … 74 78 { 75 79 dprintf(("unsupported RotationSupport\n")); 80 AssertBreakpoint(); 76 81 bSupported = FALSE; 77 82 break; … … 81 86 { 82 87 dprintf(("\"Identity\" RotationSupport not set\n")); 88 AssertBreakpoint(); 83 89 bSupported = FALSE; 84 90 break; … … 91 97 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx, 92 98 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy)); 99 AssertBreakpoint(); 93 100 bSupported = FALSE; 94 101 break; … … 101 108 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx, 102 109 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy)); 110 AssertBreakpoint(); 103 111 bSupported = FALSE; 104 112 break; … … 109 117 { 110 118 dprintf(("unsupported VidPnTargetColorBasis (%d)\n", pNewVidPnPresentPathInfo->VidPnTargetColorBasis)); 119 AssertBreakpoint(); 111 120 bSupported = FALSE; 112 121 break; … … 122 131 { 123 132 dprintf(("Non-zero FourthChannel (%d)\n", pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel)); 133 AssertBreakpoint(); 124 134 bSupported = FALSE; 125 135 break; … … 133 143 { 134 144 dprintf(("Copy protection not supported CopyProtectionType(%d)\n", pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType)); 145 AssertBreakpoint(); 135 146 bSupported = FALSE; 136 147 break; … … 140 151 { 141 152 dprintf(("Copy protection not supported APSTriggerBits(%d)\n", pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits)); 153 AssertBreakpoint(); 142 154 bSupported = FALSE; 143 155 break; … … 149 161 { 150 162 dprintf(("Copy protection support (0x%x)\n", *((UINT*)&pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport))); 163 AssertBreakpoint(); 151 164 bSupported = FALSE; 152 165 break; … … 156 169 { 157 170 dprintf(("Unsupported GammaRamp.Type (%d)\n", pNewVidPnPresentPathInfo->GammaRamp.Type)); 171 AssertBreakpoint(); 158 172 bSupported = FALSE; 159 173 break; … … 223 237 pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx, 224 238 pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cy)); 239 AssertBreakpoint(); 225 240 bSupported = FALSE; 226 241 break; … … 295 310 } 296 311 312 NTSTATUS vboxVidPnPopulateVideoSignalInfo(D3DKMDT_VIDEO_SIGNAL_INFO *pVsi, 313 D3DKMDT_2DREGION *pResolution, 314 ULONG VSync) 315 { 316 NTSTATUS Status = STATUS_SUCCESS; 317 318 pVsi->VideoStandard = D3DKMDT_VSS_VESA_DMT; 319 pVsi->ActiveSize = *pResolution; 320 pVsi->VSyncFreq.Numerator = VSync * 1000; 321 pVsi->VSyncFreq.Denominator = 1000; 322 pVsi->TotalSize.cx = pVsi->ActiveSize.cx + VBOXVDPN_C_DISPLAY_HBLANK_SIZE; 323 pVsi->TotalSize.cy = pVsi->ActiveSize.cy + VBOXVDPN_C_DISPLAY_VBLANK_SIZE; 324 pVsi->PixelRate = pVsi->TotalSize.cx * pVsi->TotalSize.cy * VSync; 325 pVsi->HSyncFreq.Numerator = (UINT)((pVsi->PixelRate / pVsi->TotalSize.cy) * 1000); 326 pVsi->HSyncFreq.Denominator = 1000; 327 pVsi->ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE; 328 329 return Status; 330 } 331 297 332 NTSTATUS vboxVidPnCheckTargetModeInfo(const D3DKMDT_HVIDPN hDesiredVidPn, 298 333 const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, … … 300 335 { 301 336 BOOLEAN bSupported = TRUE; 302 do 303 { 304 /* video standatd does not matter ?? 305 pNewVidPnTargetModeInfo->VideoSignalInfo.VideoStandard 306 307 we support any total size?? 308 pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cx 309 pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cy 310 */ 311 /* ActualSize should be same as total size??*/ 312 if (pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cx != pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cx 313 || pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cy != pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cy) 314 { 315 dprintf(("ActiveSize(%d, %d) != TotalSize(%d, %d)\n", 316 pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cx, 317 pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cy, 318 pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cx, 319 pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cy)); 320 bSupported = FALSE; 321 break; 322 } 323 324 /* we do not care about those 325 pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Numerator 326 pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Denominator 327 pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Numerator 328 pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Denominator 329 pNewVidPnTargetModeInfo->VideoSignalInfo.PixelRate 330 pNewVidPnTargetModeInfo->VideoSignalInfo.ScanLineOrdering 331 pNewVidPnTargetModeInfo->Preference 332 */ 333 } while (1); 337 D3DKMDT_VIDEO_SIGNAL_INFO CmpVsi; 338 D3DKMDT_2DREGION CmpRes; 339 CmpRes.cx = pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cx; 340 CmpRes.cy = pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cy; 341 NTSTATUS Status = vboxVidPnPopulateVideoSignalInfo(&CmpVsi, 342 &CmpRes, 343 pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Numerator/pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Denominator); 344 Assert(Status == STATUS_SUCCESS); 345 if (Status != STATUS_SUCCESS) 346 { 347 drprintf((__FUNCTION__": vboxVidPnPopulateVideoSignalInfo error Status (0x%x)\n", Status)); 348 return Status; 349 } 350 351 if (memcmp(&CmpRes, &pNewVidPnTargetModeInfo->VideoSignalInfo, sizeof (D3DKMDT_VIDEO_SIGNAL_INFO))) 352 { 353 dfprintf((__FUNCTION__": VideoSignalInfos do not match!!!\n")); 354 AssertBreakpoint(); 355 bSupported = FALSE; 356 } 334 357 335 358 *pbSupported = bSupported; … … 524 547 } 525 548 526 NTSTATUS vboxVidPnPopulateVideoSignalInfo(PDEVICE_EXTENSION pDevExt,527 D3DKMDT_VIDEO_SIGNAL_INFO *pVsi,528 D3DKMDT_2DREGION *pResolution,529 ULONG VSync)530 {531 NTSTATUS Status = STATUS_SUCCESS;532 533 pVsi->VideoStandard = D3DKMDT_VSS_VESA_DMT;534 pVsi->ActiveSize = *pResolution;535 pVsi->VSyncFreq.Numerator = VSync * 1000;536 pVsi->VSyncFreq.Denominator = 1000;537 pVsi->TotalSize.cx = pVsi->ActiveSize.cx + VBOXVDPN_C_DISPLAY_HBLANK_SIZE;538 pVsi->TotalSize.cy = pVsi->ActiveSize.cy + VBOXVDPN_C_DISPLAY_VBLANK_SIZE;539 pVsi->PixelRate = pVsi->TotalSize.cx * pVsi->TotalSize.cy * VSync;540 pVsi->HSyncFreq.Numerator = (UINT)((pVsi->PixelRate / pVsi->TotalSize.cy) * 1000);541 pVsi->HSyncFreq.Denominator = 1000;542 pVsi->ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE;543 544 return Status;545 }546 547 549 NTSTATUS vboxVidPnPopulateMonitorSourceModeInfoFromLegacy(PDEVICE_EXTENSION pDevExt, 548 550 D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode, … … 551 553 BOOLEAN bPreferred) 552 554 { 553 NTSTATUS Status = vboxVidPnPopulateVideoSignalInfo( pDevExt,&pMonitorSourceMode->VideoSignalInfo, pResolution, 60 /* ULONG VSync */);555 NTSTATUS Status = vboxVidPnPopulateVideoSignalInfo(&pMonitorSourceMode->VideoSignalInfo, pResolution, 60 /* ULONG VSync */); 554 556 Assert(Status == STATUS_SUCCESS); 555 557 if (Status == STATUS_SUCCESS) … … 574 576 pNewVidPnTargetModeInfo->Preference = bPreferred ? D3DKMDT_MP_PREFERRED : D3DKMDT_MP_NOTPREFERRED; 575 577 576 return vboxVidPnPopulateVideoSignalInfo( pDevExt,&pNewVidPnTargetModeInfo->VideoSignalInfo, pResolution, 60 /* ULONG VSync */);578 return vboxVidPnPopulateVideoSignalInfo(&pNewVidPnTargetModeInfo->VideoSignalInfo, pResolution, 60 /* ULONG VSync */); 577 579 } 578 580
Note:
See TracChangeset
for help on using the changeset viewer.