Changeset 102145 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 17, 2023 9:47:01 PM (13 months ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/Makefile.kmk
r98416 r102145 217 217 VBoxDX_SOURCES = \ 218 218 wddm/dx/VBoxDXDDI.cpp \ 219 wddm/dx/VBoxDXDDIVideo.cpp \ 219 220 wddm/dx/VBoxDX.cpp \ 221 wddm/dx/VBoxDXVideo.cpp \ 220 222 wddm/dx/VBoxDXCmd.cpp \ 221 223 wddm/dx/VBoxDX.rc \ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.cpp
r100065 r102145 574 574 | D3D10_DDI_BIND_RENDER_TARGET 575 575 | D3D10_DDI_BIND_DEPTH_STENCIL 576 | D3D11_DDI_BIND_UNORDERED_ACCESS))) == 0); 576 | D3D11_DDI_BIND_UNORDERED_ACCESS 577 | D3D11_DDI_BIND_DECODER))) == 0); 577 578 578 579 if (BindFlags & D3D10_DDI_BIND_VERTEX_BUFFER) … … 592 593 if (BindFlags & D3D11_DDI_BIND_UNORDERED_ACCESS) 593 594 f |= SVGA3D_SURFACE_BIND_UAVIEW; 595 if (BindFlags & D3D11_DDI_BIND_DECODER) 596 f |= SVGA3D_SURFACE_RESERVED1; 594 597 595 598 /* D3D10_DDI_BIND_PRESENT textures can be used as render targets in a blitter on the host. */ … … 704 707 RTListInit(&pResource->listDSV); 705 708 RTListInit(&pResource->listUAV); 709 RTListInit(&pResource->listVDOV); 710 RTListInit(&pResource->listVPIV); 711 RTListInit(&pResource->listVPOV); 706 712 707 713 return VINF_SUCCESS; … … 829 835 RTListInit(&pResource->listDSV); 830 836 RTListInit(&pResource->listUAV); 837 RTListInit(&pResource->listVDOV); 838 RTListInit(&pResource->listVPIV); 839 RTListInit(&pResource->listVPOV); 831 840 832 841 pResource->pKMResource->pResource = pResource; … … 852 861 Assert(RTListIsEmpty(&pResource->listDSV)); 853 862 Assert(RTListIsEmpty(&pResource->listUAV)); 863 Assert(RTListIsEmpty(&pResource->listVDOV)); 864 Assert(RTListIsEmpty(&pResource->listVPIV)); 865 Assert(RTListIsEmpty(&pResource->listVPOV)); 854 866 855 867 /* Remove from the list of active resources. */ … … 2014 2026 if (pQuery->Query == D3D10DDI_QUERY_EVENT) 2015 2027 { 2016 pQuery->u64Value = ++pDevice->u64MobFenceValue;2028 pQuery->u64Value = ASMAtomicIncU64(&pDevice->u64MobFenceValue); 2017 2029 vgpu10MobFence64(pDevice, pQuery->u64Value, pQuery->pCOAllocation->hCOAllocation, pQuery->offQuery); 2018 2030 pQuery->enmQueryState = VBOXDXQUERYSTATE_ISSUED; … … 2900 2912 2901 2913 /** @todo UAV */ 2914 2915 VBOXDXVIDEOPROCESSOROUTPUTVIEW *pVPOV; 2916 RTListForEach(&pResource->listVPOV, pVPOV, VBOXDXVIDEOPROCESSOROUTPUTVIEW, nodeView) 2917 { 2918 if (pVPOV->fDefined) 2919 { 2920 vgpu10DestroyVideoProcessorOutputView(pDevice, pVPOV->uVideoProcessorOutputViewId); 2921 pVPOV->fDefined = false; 2922 } 2923 } 2902 2924 } 2903 2925 … … 2943 2965 2944 2966 /** @todo UAV */ 2967 2968 VBOXDXVIDEOPROCESSOROUTPUTVIEW *pVPOV; 2969 RTListForEach(&pResource->listVPOV, pVPOV, VBOXDXVIDEOPROCESSOROUTPUTVIEW, nodeView) 2970 { 2971 if (!pVPOV->fDefined) 2972 { 2973 vgpu10DefineVideoProcessorOutputView(pDevice, pVPOV->uVideoProcessorOutputViewId, 2974 vboxDXGetAllocation(pVPOV->pResource), 2975 pVPOV->svga.ContentDesc, pVPOV->svga.VPOVDesc); 2976 pVPOV->fDefined = true; 2977 } 2978 } 2945 2979 } 2946 2980 … … 2999 3033 3000 3034 /* Rotate allocation handles. The function would be that simple if resources would not have views. */ 3001 D3DKMT_HANDLE hAllocation = papResources[0]->pKMResource->hAllocation;3035 D3DKMT_HANDLE const hAllocation = papResources[0]->pKMResource->hAllocation; 3002 3036 for (unsigned i = 0; i < cResources - 1; ++i) 3003 3037 papResources[i]->pKMResource->hAllocation = papResources[i + 1]->pKMResource->hAllocation; … … 3427 3461 AssertRCReturn(rc, rc); 3428 3462 3463 rc = RTHandleTableCreateEx(&pDevice->hHTVideoProcessor, /* fFlags */ 0, /* uBase */ 0, 3464 SVGA_COTABLE_MAX_IDS, NULL, NULL); 3465 AssertRCReturn(rc, rc); 3466 3467 rc = RTHandleTableCreateEx(&pDevice->hHTVideoDecoderOutputView, /* fFlags */ 0, /* uBase */ 0, 3468 SVGA_COTABLE_MAX_IDS, NULL, NULL); 3469 AssertRCReturn(rc, rc); 3470 3471 rc = RTHandleTableCreateEx(&pDevice->hHTVideoDecoder, /* fFlags */ 0, /* uBase */ 0, 3472 SVGA_COTABLE_MAX_IDS, NULL, NULL); 3473 AssertRCReturn(rc, rc); 3474 3475 rc = RTHandleTableCreateEx(&pDevice->hHTVideoProcessorInputView, /* fFlags */ 0, /* uBase */ 0, 3476 SVGA_COTABLE_MAX_IDS, NULL, NULL); 3477 AssertRCReturn(rc, rc); 3478 3479 rc = RTHandleTableCreateEx(&pDevice->hHTVideoProcessorOutputView, /* fFlags */ 0, /* uBase */ 0, 3480 SVGA_COTABLE_MAX_IDS, NULL, NULL); 3481 AssertRCReturn(rc, rc); 3482 3429 3483 RTListInit(&pDevice->listResources); 3430 3484 RTListInit(&pDevice->listDestroyedResources); … … 3514 3568 pDevice->hHTStreamOutput = 0; 3515 3569 } 3570 3571 if (pDevice->hHTVideoProcessor) 3572 { 3573 RTHandleTableDestroy(pDevice->hHTVideoProcessor, NULL, NULL); 3574 pDevice->hHTVideoProcessor = 0; 3575 } 3576 3577 if (pDevice->hHTVideoDecoderOutputView) 3578 { 3579 RTHandleTableDestroy(pDevice->hHTVideoDecoderOutputView, NULL, NULL); 3580 pDevice->hHTVideoDecoderOutputView = 0; 3581 } 3582 3583 if (pDevice->hHTVideoDecoder) 3584 { 3585 RTHandleTableDestroy(pDevice->hHTVideoDecoder, NULL, NULL); 3586 pDevice->hHTVideoDecoder = 0; 3587 } 3588 3589 if (pDevice->hHTVideoProcessorInputView) 3590 { 3591 RTHandleTableDestroy(pDevice->hHTVideoProcessorInputView, NULL, NULL); 3592 pDevice->hHTVideoProcessorInputView = 0; 3593 } 3594 3595 if (pDevice->hHTVideoProcessorOutputView) 3596 { 3597 RTHandleTableDestroy(pDevice->hHTVideoProcessorOutputView, NULL, NULL); 3598 pDevice->hHTVideoProcessorOutputView = 0; 3599 } 3516 3600 } 3517 3601 … … 3576 3660 3577 3661 vboxDXDeviceDeleteObjects(pDevice); 3578 } 3662 3663 RTMemFree(pDevice->VideoDevice.paDecodeProfile); 3664 pDevice->VideoDevice.paDecodeProfile = 0; 3665 3666 RTMemFree(pDevice->VideoDevice.config.pConfigInfo); 3667 pDevice->VideoDevice.config.pConfigInfo = 0; 3668 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.h
r99855 r102145 43 43 #include <svga_escape.h> 44 44 #include <svga_overlay.h> 45 #include <vbsvga3d_dx.h> 45 46 #pragma pack() 46 47 … … 204 205 RTLISTANCHOR listDSV; /* Depth stencil views. */ 205 206 RTLISTANCHOR listUAV; /* Unordered access views. */ 207 RTLISTANCHOR listVDOV; /* Video decoder output views. */ 208 RTLISTANCHOR listVPIV; /* Video processor input views. */ 209 RTLISTANCHOR listVPOV; /* Video processor output views. */ 206 210 207 211 RT_FLEXIBLE_ARRAY_EXTENSION … … 311 315 } svga; 312 316 } VBOXDXUNORDEREDACCESSVIEW, *PVBOXDXUNORDEREDACCESSVIEW; 317 318 319 typedef struct VBOXDXVIDEOPROCESSORINPUTVIEW 320 { 321 RTLISTNODE nodeView; /* listVPIV of the resource. */ 322 bool fDefined : 1; /* Whether the view has been defined on the host. */ 323 D3D11_1DDI_HRTVIDEOPROCESSORINPUTVIEW hRTView; 324 uint32_t uVideoProcessorInputViewId; 325 PVBOXDX_RESOURCE pResource; 326 327 struct 328 { 329 VBSVGA3dVideoProcessorDesc ContentDesc; 330 VBSVGA3dVPIVDesc VPIVDesc; 331 } svga; 332 } VBOXDXVIDEOPROCESSORINPUTVIEW, *PVBOXDXVIDEOPROCESSORINPUTVIEW; 333 334 335 typedef struct VBOXDXVIDEOPROCESSOROUTPUTVIEW 336 { 337 RTLISTNODE nodeView; /* listVPOV of the resource. */ 338 bool fDefined : 1; /* Whether the view has been defined on the host. */ 339 D3D11_1DDI_HRTVIDEOPROCESSOROUTPUTVIEW hRTView; 340 uint32_t uVideoProcessorOutputViewId; 341 PVBOXDX_RESOURCE pResource; 342 343 struct 344 { 345 VBSVGA3dVideoProcessorDesc ContentDesc; 346 VBSVGA3dVPOVDesc VPOVDesc; 347 } svga; 348 } VBOXDXVIDEOPROCESSOROUTPUTVIEW, *PVBOXDXVIDEOPROCESSOROUTPUTVIEW; 349 350 351 typedef struct VBOXDXVIDEOPROCESSORFILTER 352 { 353 BOOL Enable; 354 int Level; 355 } VBOXDXVIDEOPROCESSORFILTER; 356 357 358 typedef struct VBOXDXVIDEOPROCESSORSTREAM 359 { 360 D3D11_1DDI_VIDEO_FRAME_FORMAT FrameFormat; 361 D3D11_1DDI_VIDEO_PROCESSOR_COLOR_SPACE ColorSpace; 362 struct { 363 D3D11_1DDI_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate; 364 BOOL RepeatFrame; 365 DXGI_RATIONAL CustomRate; 366 } OutputRate; 367 struct { 368 BOOL Enable; 369 RECT SourceRect; 370 } SourceRect; 371 struct { 372 BOOL Enable; 373 RECT DestRect; 374 } DestRect; 375 struct { 376 BOOL Enable; 377 FLOAT Lower; 378 FLOAT Upper; 379 } LumaKey; 380 struct { 381 BOOL Enable; 382 } AutoProcessingMode; 383 struct { 384 BOOL Enable; 385 D3D11_1DDI_VIDEO_PROCESSOR_STEREO_FORMAT Format; 386 } StereoFormat; 387 struct { 388 BOOL Enable; 389 D3D11_1DDI_VIDEO_PROCESSOR_ROTATION Rotation; 390 } Rotation; 391 VBOXDXVIDEOPROCESSORFILTER aFilters[D3D11_1DDI_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT + 1]; 392 } VBOXDXVIDEOPROCESSORSTREAM; 393 394 395 typedef struct VBOXDXVIDEOPROCESSOR 396 { 397 D3D11_1DDI_HRTVIDEOPROCESSOR hRTVideoProcessor; 398 uint32_t uVideoProcessorId; 399 struct { 400 VBSVGA3dVideoProcessorDesc desc; 401 uint32 RateConversionCapsIndex; 402 } svga; 403 struct { 404 BOOL Enable; 405 RECT Rect; 406 } OutputRect; 407 struct { 408 BOOL YCbCr; 409 D3D11_1DDI_VIDEO_COLOR Color; 410 } OutputBackgroundColor; 411 D3D11_1DDI_VIDEO_PROCESSOR_COLOR_SPACE Colorspace; 412 struct { 413 BOOL Enabled; 414 SIZE ConstrictonSize; 415 } OutputConstriction; 416 417 struct { 418 D3D11_1DDI_VIDEO_PROCESSOR_ALPHA_FILL_MODE FillMode; 419 UINT StreamIndex; 420 } AlphaFillMode; 421 422 struct { 423 BOOL Enable; 424 } StereoMode; 425 426 VBOXDXVIDEOPROCESSORSTREAM aStreams[2]; 427 } VBOXDXVIDEOPROCESSOR, *PVBOXDXVIDEOPROCESSOR; 428 429 430 typedef struct VBOXDXVIDEOPROCESSORENUM 431 { 432 D3D11_1DDI_HRTVIDEOPROCESSORENUM hRTVideoProcessorEnum; 433 D3D11_1DDI_VIDEO_PROCESSOR_CONTENT_DESC Desc; 434 } VBOXDXVIDEOPROCESSORENUM, *PVBOXDXVIDEOPROCESSORENUM; 435 436 437 typedef struct VBOXDXVIDEODECODEROUTPUTVIEW 438 { 439 RTLISTNODE nodeView; /* listVDOV of the resource. */ 440 bool fDefined : 1; /* Whether the view has been defined on the host. */ 441 D3D11_1DDI_HRTVIDEODECODEROUTPUTVIEW hRTView; 442 uint32_t uVideoDecoderOutputViewId; 443 PVBOXDX_RESOURCE pResource; 444 445 struct { 446 VBSVGA3dVDOVDesc desc; 447 } svga; 448 } VBOXDXVIDEODECODEROUTPUTVIEW, *PVBOXDXVIDEODECODEROUTPUTVIEW; 449 450 451 typedef struct VBOXDXVIDEODECODER 452 { 453 D3D11_1DDI_HRTDECODE hRTVideoDecoder; 454 uint32_t uVideoDecoderId; 455 456 struct { 457 VBSVGA3dVideoDecoderDesc Desc; 458 VBSVGA3dVideoDecoderConfig Config; 459 } svga; 460 461 struct { 462 PVBOXDXVIDEODECODEROUTPUTVIEW pOutputView; 463 } Frame; 464 } VBOXDXVIDEODECODER, *PVBOXDXVIDEODECODER; 465 466 467 typedef struct VBOXDXVIDEOCRYPTOSESSION 468 { 469 D3D11_1DDI_HRTCRYPTOSESSION hRTCryptoSession; 470 uint32_t au32Dummy[3]; 471 } VBOXDXVIDEOCRYPTOSESSION, *PVBOXDXVIDEOCRYPTOSESSION; 472 473 474 typedef struct VBOXDXVIDEOAUTHCHANNEL 475 { 476 D3D11_1DDI_HRTAUTHCHANNEL hRTAuthChannel; 477 uint32_t au32Dummy[4]; 478 } VBOXDXVIDEOAUTHCHANNEL, *PVBOXDXVIDEOAUTHCHANNEL; 313 479 314 480 … … 382 548 RTHANDLETABLE hHTUnorderedAccessView; 383 549 RTHANDLETABLE hHTStreamOutput; 550 RTHANDLETABLE hHTVideoProcessor; 551 RTHANDLETABLE hHTVideoDecoderOutputView; 552 RTHANDLETABLE hHTVideoDecoder; 553 RTHANDLETABLE hHTVideoProcessorInputView; 554 RTHANDLETABLE hHTVideoProcessorOutputView; 384 555 385 556 /* Resources */ … … 398 569 RTLISTANCHOR listQueries; /* All queries of this device, to be able to repack them in the allocation. */ 399 570 RTLISTANCHOR listCOAQuery; /* List of VBOXDXCOALLOCATION for all query types. */ 400 uint64_t 571 uint64_t volatile u64MobFenceValue; 401 572 402 573 /* Stream output declarations */ … … 417 588 VBOXDXINDEXBUFFERSTATE IndexBuffer; 418 589 } pipeline; 590 591 /* Video decoding and processing. */ 592 struct 593 { 594 D3DKMT_HANDLE hAllocation; /* For querying capabilities of the host device. */ 595 uint32_t cbAllocation; 596 uint64_t volatile u64MobFenceValue; /* Fence value for host queries. */ 597 598 bool fDecodeProfilesQueried; 599 UINT cDecodeProfile; /* Number of elements in paDecodeProfile array. */ 600 VBSVGA3dDecodeProfileInfo *paDecodeProfile; 601 602 struct 603 { 604 uint32_t cConfig; /* Number of elements in pConfigInfo->aConfig array. */ 605 VBSVGA3dDecodeConfigInfo *pConfigInfo; 606 } config; 607 } VideoDevice; 419 608 } VBOXDX_DEVICE, *PVBOXDX_DEVICE; 420 609 610 HRESULT ddi11_1RetrieveVideoFunctions(PVBOXDX_DEVICE pDevice, D3D11_1DDI_VIDEO_INPUT *pVideoInput); 421 611 422 612 HRESULT vboxDXDeviceInit(PVBOXDX_DEVICE pDevice); … … 532 722 HRESULT vboxDXFlush(PVBOXDX_DEVICE pDevice, bool fForce); 533 723 724 void vboxDXGetVideoDecoderProfileCount(PVBOXDX_DEVICE pDevice, UINT *pDecodeProfileCount); 725 void vboxDXGetVideoDecoderProfile(PVBOXDX_DEVICE pDevice, UINT Index, GUID *pGuid); 726 void vboxDXCheckVideoDecoderFormat(PVBOXDX_DEVICE pDevice, GUID const *pDecodeProfile, DXGI_FORMAT Format, BOOL *pSupported); 727 void vboxDXGetVideoDecoderConfigCount(PVBOXDX_DEVICE pDevice, D3D11_1DDI_VIDEO_DECODER_DESC const *pDecodeDesc, UINT *pConfigCount); 728 void vboxDXGetVideoDecoderConfig(PVBOXDX_DEVICE pDevice, D3D11_1DDI_VIDEO_DECODER_DESC const *pDecodeDesc, UINT Index, 729 D3D11_1DDI_VIDEO_DECODER_CONFIG *pConfig); 730 HRESULT vboxDXCreateVideoProcessor(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, 731 PVBOXDXVIDEOPROCESSORENUM pVideoProcessorEnum, UINT RateConversionCapsIndex); 732 HRESULT vboxDXCreateVideoDecoderOutputView(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODEROUTPUTVIEW pVideoDecoderOutputView, PVBOXDX_RESOURCE pResource, 733 GUID const &DecodeProfile, UINT MipSlice, UINT FirstArraySlice, UINT ArraySize); 734 HRESULT vboxDXCreateVideoDecoder(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODER pVideoDecoder, 735 D3D11_1DDI_VIDEO_DECODER_DESC const &Desc, D3D11_1DDI_VIDEO_DECODER_CONFIG const &Config); 736 HRESULT vboxDXVideoDecoderBeginFrame(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODER pVideoDecoder, 737 PVBOXDXVIDEODECODEROUTPUTVIEW pVideoDecoderOutputView, 738 void const *pContentKey, UINT ContentKeySize); 739 HRESULT vboxDXVideoDecoderSubmitBuffers(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODER pVideoDecoder, 740 UINT BufferCount, D3D11_1DDI_VIDEO_DECODER_BUFFER_DESC const *pBufferDesc); 741 HRESULT vboxDXVideoDecoderEndFrame(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODER pVideoDecoder); 742 HRESULT vboxDXCreateVideoProcessorInputView(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSORINPUTVIEW pVideoProcessorInputView, 743 PVBOXDX_RESOURCE pResource, PVBOXDXVIDEOPROCESSORENUM pVideoProcessorEnum, 744 UINT FourCC, UINT MipSlice, UINT FirstArraySlice, UINT ArraySize); 745 HRESULT vboxDXCreateVideoProcessorOutputView(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOROUTPUTVIEW pVideoProcessorOutputView, 746 PVBOXDX_RESOURCE pResource, PVBOXDXVIDEOPROCESSORENUM pVideoProcessorEnum, 747 UINT MipSlice, UINT FirstArraySlice, UINT ArraySize); 748 HRESULT vboxDXVideoProcessorBlt(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, PVBOXDXVIDEOPROCESSOROUTPUTVIEW pVideoProcessorOutputView, 749 UINT OutputFrame, UINT StreamCount, D3D11_1DDI_VIDEO_PROCESSOR_STREAM const *paStream); 750 void vboxDXDestroyVideoDecoder(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODER pVideoDecoder); 751 void vboxDXDestroyVideoDecoderOutputView(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEODECODEROUTPUTVIEW pVideoDecoderOutputView); 752 void vboxDXDestroyVideoProcessor(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor); 753 void vboxDXDestroyVideoProcessorInputView(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSORINPUTVIEW pVideoProcessorInputView); 754 void vboxDXDestroyVideoProcessorOutputView(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOROUTPUTVIEW pVideoProcessorOutputView); 755 void vboxDXVideoProcessorSetOutputTargetRect(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, BOOL Enable, RECT const *pOutputRect); 756 void vboxDXVideoProcessorSetOutputBackgroundColor(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, BOOL YCbCr, D3D11_1DDI_VIDEO_COLOR const *pColor); 757 void vboxDXVideoProcessorSetOutputColorSpace(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, D3D11_1DDI_VIDEO_PROCESSOR_COLOR_SPACE const *pColorSpace); 758 void vboxDXVideoProcessorSetOutputAlphaFillMode(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, D3D11_1DDI_VIDEO_PROCESSOR_ALPHA_FILL_MODE FillMode, UINT StreamIndex); 759 void vboxDXVideoProcessorSetOutputConstriction(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, BOOL Enabled, SIZE ConstrictonSize); 760 void vboxDXVideoProcessorSetOutputStereoMode(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, BOOL Enable); 761 void vboxDXVideoProcessorSetStreamFrameFormat(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, D3D11_1DDI_VIDEO_FRAME_FORMAT Format); 762 void vboxDXVideoProcessorSetStreamColorSpace(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, D3D11_1DDI_VIDEO_PROCESSOR_COLOR_SPACE const *pColorSpace); 763 void vboxDXVideoProcessorSetStreamOutputRate(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, 764 D3D11_1DDI_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, BOOL RepeatFrame, DXGI_RATIONAL const *pCustomRate); 765 void vboxDXVideoProcessorSetStreamSourceRect(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, 766 BOOL Enable, RECT const *pSourceRect); 767 void vboxDXVideoProcessorSetStreamDestRect(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, 768 BOOL Enable, RECT const *pDestRect); 769 void vboxDXVideoProcessorSetStreamAlpha(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, 770 BOOL Enable, FLOAT Alpha); 771 void vboxDXVideoProcessorSetStreamPixelAspectRatio(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, 772 BOOL Enable, DXGI_RATIONAL const *pSourceRatio, DXGI_RATIONAL const *pDestRatio); 773 void vboxDXVideoProcessorSetStreamLumaKey(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, 774 BOOL Enable, FLOAT Lower, FLOAT Upper); 775 void vboxDXVideoProcessorSetStreamStereoFormat(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, BOOL Enable, 776 D3D11_1DDI_VIDEO_PROCESSOR_STEREO_FORMAT StereoFormat, BOOL LeftViewFrame0, BOOL BaseViewFrame0, 777 D3D11_1DDI_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, int MonoOffset); 778 void vboxDXVideoProcessorSetStreamAutoProcessingMode(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, BOOL Enable); 779 void vboxDXVideoProcessorSetStreamFilter(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, BOOL Enable, 780 D3D11_1DDI_VIDEO_PROCESSOR_FILTER Filter, int Level); 781 void vboxDXVideoProcessorSetStreamRotation(PVBOXDX_DEVICE pDevice, PVBOXDXVIDEOPROCESSOR pVideoProcessor, UINT StreamIndex, BOOL Enable, 782 D3D11_1DDI_VIDEO_PROCESSOR_ROTATION Rotation); 783 534 784 DECLINLINE(void) vboxDXDeviceSetError(PVBOXDX_DEVICE pDevice, HRESULT hr) 535 785 { -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.cpp
r100065 r102145 1543 1543 return VINF_SUCCESS; 1544 1544 } 1545 1546 1547 int vgpu10DefineVideoProcessor(PVBOXDX_DEVICE pDevice, 1548 uint32 videoProcessorId, 1549 VBSVGA3dVideoProcessorDesc const &desc, 1550 uint32 RateConversionCapsIndex) 1551 { 1552 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DEFINE_VIDEO_PROCESSOR, 1553 sizeof(VBSVGA3dCmdDXDefineVideoProcessor), 0); 1554 if (!pvCmd) 1555 return VERR_NO_MEMORY; 1556 1557 VBSVGA3dCmdDXDefineVideoProcessor *cmd = (VBSVGA3dCmdDXDefineVideoProcessor *)pvCmd; 1558 SET_CMD_FIELD(videoProcessorId); 1559 SET_CMD_FIELD(desc); 1560 SET_CMD_FIELD(RateConversionCapsIndex); 1561 1562 vboxDXCommandBufferCommit(pDevice); 1563 return VINF_SUCCESS; 1564 } 1565 1566 1567 int vgpu10DefineVideoDecoderOutputView(PVBOXDX_DEVICE pDevice, 1568 VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId, 1569 D3DKMT_HANDLE hAllocation, 1570 VBSVGA3dVDOVDesc const &desc) 1571 { 1572 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DEFINE_VIDEO_DECODER_OUTPUT_VIEW, 1573 sizeof(VBSVGA3dCmdDXDefineVideoDecoderOutputView), 1); 1574 if (!pvCmd) 1575 return VERR_NO_MEMORY; 1576 1577 VBSVGA3dCmdDXDefineVideoDecoderOutputView *cmd = (VBSVGA3dCmdDXDefineVideoDecoderOutputView *)pvCmd; 1578 SET_CMD_FIELD(videoDecoderOutputViewId); 1579 cmd->sid = SVGA3D_INVALID_ID; 1580 SET_CMD_FIELD(desc); 1581 vboxDXStorePatchLocation(pDevice, &cmd->sid, VBOXDXALLOCATIONTYPE_SURFACE, 1582 hAllocation, 0, true); 1583 1584 vboxDXCommandBufferCommit(pDevice); 1585 return VINF_SUCCESS; 1586 } 1587 1588 1589 int vgpu10DefineVideoDecoder(PVBOXDX_DEVICE pDevice, 1590 VBSVGA3dVideoDecoderId videoDecoderId, 1591 VBSVGA3dVideoDecoderDesc const &desc, 1592 VBSVGA3dVideoDecoderConfig const &config) 1593 { 1594 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DEFINE_VIDEO_DECODER, 1595 sizeof(VBSVGA3dCmdDXDefineVideoDecoder), 0); 1596 if (!pvCmd) 1597 return VERR_NO_MEMORY; 1598 1599 VBSVGA3dCmdDXDefineVideoDecoder *cmd = (VBSVGA3dCmdDXDefineVideoDecoder *)pvCmd; 1600 SET_CMD_FIELD(videoDecoderId); 1601 SET_CMD_FIELD(desc); 1602 SET_CMD_FIELD(config); 1603 1604 vboxDXCommandBufferCommit(pDevice); 1605 return VINF_SUCCESS; 1606 } 1607 1608 1609 int vgpu10VideoDecoderBeginFrame(PVBOXDX_DEVICE pDevice, 1610 VBSVGA3dVideoDecoderId videoDecoderId, 1611 VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId) 1612 { 1613 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_DECODER_BEGIN_FRAME, 1614 sizeof(VBSVGA3dCmdDXVideoDecoderBeginFrame), 0); 1615 if (!pvCmd) 1616 return VERR_NO_MEMORY; 1617 1618 VBSVGA3dCmdDXVideoDecoderBeginFrame *cmd = (VBSVGA3dCmdDXVideoDecoderBeginFrame *)pvCmd; 1619 SET_CMD_FIELD(videoDecoderId); 1620 SET_CMD_FIELD(videoDecoderOutputViewId); 1621 1622 vboxDXCommandBufferCommit(pDevice); 1623 return VINF_SUCCESS; 1624 } 1625 1626 1627 int vgpu10VideoDecoderSubmitBuffers(PVBOXDX_DEVICE pDevice, 1628 VBSVGA3dVideoDecoderId videoDecoderId, 1629 uint32 bufferCount, 1630 D3DKMT_HANDLE const *pahAllocation, 1631 VBSVGA3dVideoDecoderBufferDesc const *paBufferDesc) 1632 { 1633 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_DECODER_SUBMIT_BUFFERS, 1634 sizeof(VBSVGA3dCmdDXVideoDecoderSubmitBuffers) 1635 + bufferCount * sizeof(VBSVGA3dVideoDecoderBufferDesc), 1636 bufferCount); 1637 if (!pvCmd) 1638 return VERR_NO_MEMORY; 1639 1640 VBSVGA3dCmdDXVideoDecoderSubmitBuffers *cmd = (VBSVGA3dCmdDXVideoDecoderSubmitBuffers *)pvCmd; 1641 SET_CMD_FIELD(videoDecoderId); 1642 1643 VBSVGA3dVideoDecoderBufferDesc *paCmdBufferDesc = (VBSVGA3dVideoDecoderBufferDesc *)&cmd[1]; 1644 memcpy(paCmdBufferDesc, paBufferDesc, bufferCount * sizeof(VBSVGA3dVideoDecoderBufferDesc)); 1645 1646 for (uint32_t i = 0; i < bufferCount; ++i) 1647 { 1648 vboxDXStorePatchLocation(pDevice, &paCmdBufferDesc[i].sidBuffer, VBOXDXALLOCATIONTYPE_SURFACE, 1649 pahAllocation[i], 0, false); 1650 } 1651 1652 vboxDXCommandBufferCommit(pDevice); 1653 return VINF_SUCCESS; 1654 } 1655 1656 1657 int vgpu10VideoDecoderEndFrame(PVBOXDX_DEVICE pDevice, 1658 VBSVGA3dVideoDecoderId videoDecoderId) 1659 { 1660 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_DECODER_END_FRAME, 1661 sizeof(VBSVGA3dCmdDXVideoDecoderEndFrame), 0); 1662 if (!pvCmd) 1663 return VERR_NO_MEMORY; 1664 1665 VBSVGA3dCmdDXVideoDecoderEndFrame *cmd = (VBSVGA3dCmdDXVideoDecoderEndFrame *)pvCmd; 1666 SET_CMD_FIELD(videoDecoderId); 1667 1668 vboxDXCommandBufferCommit(pDevice); 1669 return VINF_SUCCESS; 1670 } 1671 1672 1673 int vgpu10DefineVideoProcessorInputView(PVBOXDX_DEVICE pDevice, 1674 VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId, 1675 D3DKMT_HANDLE hAllocation, 1676 VBSVGA3dVideoProcessorDesc const &contentDesc, 1677 VBSVGA3dVPIVDesc const &desc) 1678 { 1679 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DEFINE_VIDEO_PROCESSOR_INPUT_VIEW, 1680 sizeof(VBSVGA3dCmdDXDefineVideoProcessorInputView), 1); 1681 if (!pvCmd) 1682 return VERR_NO_MEMORY; 1683 1684 VBSVGA3dCmdDXDefineVideoProcessorInputView *cmd = (VBSVGA3dCmdDXDefineVideoProcessorInputView *)pvCmd; 1685 SET_CMD_FIELD(videoProcessorInputViewId); 1686 cmd->sid = SVGA3D_INVALID_ID; 1687 SET_CMD_FIELD(contentDesc); 1688 SET_CMD_FIELD(desc); 1689 vboxDXStorePatchLocation(pDevice, &cmd->sid, VBOXDXALLOCATIONTYPE_SURFACE, 1690 hAllocation, 0, true); 1691 1692 vboxDXCommandBufferCommit(pDevice); 1693 return VINF_SUCCESS; 1694 } 1695 1696 1697 int vgpu10DefineVideoProcessorOutputView(PVBOXDX_DEVICE pDevice, 1698 VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId, 1699 D3DKMT_HANDLE hAllocation, 1700 VBSVGA3dVideoProcessorDesc const &contentDesc, 1701 VBSVGA3dVPOVDesc const &desc) 1702 { 1703 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DEFINE_VIDEO_PROCESSOR_OUTPUT_VIEW, 1704 sizeof(VBSVGA3dCmdDXDefineVideoProcessorOutputView), 1); 1705 if (!pvCmd) 1706 return VERR_NO_MEMORY; 1707 1708 VBSVGA3dCmdDXDefineVideoProcessorOutputView *cmd = (VBSVGA3dCmdDXDefineVideoProcessorOutputView *)pvCmd; 1709 SET_CMD_FIELD(videoProcessorOutputViewId); 1710 cmd->sid = SVGA3D_INVALID_ID; 1711 SET_CMD_FIELD(contentDesc); 1712 SET_CMD_FIELD(desc); 1713 vboxDXStorePatchLocation(pDevice, &cmd->sid, VBOXDXALLOCATIONTYPE_SURFACE, 1714 hAllocation, 0, true); 1715 1716 vboxDXCommandBufferCommit(pDevice); 1717 return VINF_SUCCESS; 1718 } 1719 1720 int vgpu10VideoProcessorBlt(PVBOXDX_DEVICE pDevice, 1721 VBSVGA3dVideoProcessorId videoProcessorId, 1722 VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId, 1723 uint32 outputFrame, 1724 uint32 streamCount, 1725 uint32 cbVideoProcessorStreams, 1726 VBSVGA3dVideoProcessorStream *pVideoProcessorStreams) 1727 { 1728 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_BLT, 1729 sizeof(VBSVGA3dCmdDXVideoProcessorBlt) + cbVideoProcessorStreams, 0); 1730 if (!pvCmd) 1731 return VERR_NO_MEMORY; 1732 1733 VBSVGA3dCmdDXVideoProcessorBlt *cmd = (VBSVGA3dCmdDXVideoProcessorBlt *)pvCmd; 1734 SET_CMD_FIELD(videoProcessorId); 1735 SET_CMD_FIELD(videoProcessorOutputViewId); 1736 SET_CMD_FIELD(outputFrame); 1737 SET_CMD_FIELD(streamCount); 1738 memcpy(&cmd[1], pVideoProcessorStreams, cbVideoProcessorStreams); 1739 1740 vboxDXCommandBufferCommit(pDevice); 1741 return VINF_SUCCESS; 1742 } 1743 1744 1745 int vgpu10DestroyVideoDecoder(PVBOXDX_DEVICE pDevice, 1746 VBSVGA3dVideoDecoderId videoDecoderId) 1747 { 1748 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DESTROY_VIDEO_DECODER, 1749 sizeof(VBSVGA3dCmdDXDestroyVideoDecoder), 0); 1750 if (!pvCmd) 1751 return VERR_NO_MEMORY; 1752 1753 VBSVGA3dCmdDXDestroyVideoDecoder *cmd = (VBSVGA3dCmdDXDestroyVideoDecoder *)pvCmd; 1754 SET_CMD_FIELD(videoDecoderId); 1755 1756 vboxDXCommandBufferCommit(pDevice); 1757 return VINF_SUCCESS; 1758 } 1759 1760 1761 int vgpu10DestroyVideoDecoderOutputView(PVBOXDX_DEVICE pDevice, 1762 VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId) 1763 { 1764 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DESTROY_VIDEO_DECODER_OUTPUT_VIEW, 1765 sizeof(VBSVGA3dCmdDXDestroyVideoDecoderOutputView), 0); 1766 if (!pvCmd) 1767 return VERR_NO_MEMORY; 1768 1769 VBSVGA3dCmdDXDestroyVideoDecoderOutputView *cmd = (VBSVGA3dCmdDXDestroyVideoDecoderOutputView *)pvCmd; 1770 SET_CMD_FIELD(videoDecoderOutputViewId); 1771 1772 vboxDXCommandBufferCommit(pDevice); 1773 return VINF_SUCCESS; 1774 } 1775 1776 1777 int vgpu10DestroyVideoProcessor(PVBOXDX_DEVICE pDevice, 1778 VBSVGA3dVideoProcessorId videoProcessorId) 1779 { 1780 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DESTROY_VIDEO_PROCESSOR, 1781 sizeof(VBSVGA3dCmdDXDestroyVideoProcessor), 0); 1782 if (!pvCmd) 1783 return VERR_NO_MEMORY; 1784 1785 VBSVGA3dCmdDXDestroyVideoProcessor *cmd = (VBSVGA3dCmdDXDestroyVideoProcessor *)pvCmd; 1786 SET_CMD_FIELD(videoProcessorId); 1787 1788 vboxDXCommandBufferCommit(pDevice); 1789 return VINF_SUCCESS; 1790 } 1791 1792 1793 int vgpu10DestroyVideoProcessorInputView(PVBOXDX_DEVICE pDevice, 1794 VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId) 1795 { 1796 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DESTROY_VIDEO_PROCESSOR_INPUT_VIEW, 1797 sizeof(VBSVGA3dCmdDXDestroyVideoProcessorInputView), 0); 1798 if (!pvCmd) 1799 return VERR_NO_MEMORY; 1800 1801 VBSVGA3dCmdDXDestroyVideoProcessorInputView *cmd = (VBSVGA3dCmdDXDestroyVideoProcessorInputView *)pvCmd; 1802 SET_CMD_FIELD(videoProcessorInputViewId); 1803 1804 vboxDXCommandBufferCommit(pDevice); 1805 return VINF_SUCCESS; 1806 } 1807 1808 1809 int vgpu10DestroyVideoProcessorOutputView(PVBOXDX_DEVICE pDevice, 1810 VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId) 1811 { 1812 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_DESTROY_VIDEO_PROCESSOR_OUTPUT_VIEW, 1813 sizeof(VBSVGA3dCmdDXDestroyVideoProcessorOutputView), 0); 1814 if (!pvCmd) 1815 return VERR_NO_MEMORY; 1816 1817 VBSVGA3dCmdDXDestroyVideoProcessorOutputView *cmd = (VBSVGA3dCmdDXDestroyVideoProcessorOutputView *)pvCmd; 1818 SET_CMD_FIELD(videoProcessorOutputViewId); 1819 1820 vboxDXCommandBufferCommit(pDevice); 1821 return VINF_SUCCESS; 1822 } 1823 1824 1825 int vgpu10VideoProcessorSetOutputTargetRect(PVBOXDX_DEVICE pDevice, 1826 VBSVGA3dVideoProcessorId videoProcessorId, 1827 BOOL enable, 1828 RECT const &outputRect) 1829 { 1830 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_TARGET_RECT, 1831 sizeof(VBSVGA3dCmdDXVideoProcessorSetOutputTargetRect), 0); 1832 if (!pvCmd) 1833 return VERR_NO_MEMORY; 1834 1835 VBSVGA3dCmdDXVideoProcessorSetOutputTargetRect *cmd = (VBSVGA3dCmdDXVideoProcessorSetOutputTargetRect *)pvCmd; 1836 SET_CMD_FIELD(videoProcessorId); 1837 SET_CMD_FIELD(enable); 1838 cmd->outputRect.left = outputRect.left; 1839 cmd->outputRect.top = outputRect.top; 1840 cmd->outputRect.right = outputRect.right; 1841 cmd->outputRect.bottom = outputRect.bottom; 1842 1843 vboxDXCommandBufferCommit(pDevice); 1844 return VINF_SUCCESS; 1845 } 1846 1847 1848 int vgpu10VideoProcessorSetOutputBackgroundColor(PVBOXDX_DEVICE pDevice, 1849 VBSVGA3dVideoProcessorId videoProcessorId, 1850 BOOL ycbcr, 1851 D3D11_1DDI_VIDEO_COLOR const &color) 1852 { 1853 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_BACKGROUND_COLOR, 1854 sizeof(VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor), 0); 1855 if (!pvCmd) 1856 return VERR_NO_MEMORY; 1857 1858 VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor *cmd = (VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor *)pvCmd; 1859 SET_CMD_FIELD(videoProcessorId); 1860 SET_CMD_FIELD(ycbcr); 1861 cmd->color.r = color.RGBA.R; 1862 cmd->color.g = color.RGBA.G; 1863 cmd->color.b = color.RGBA.B; 1864 cmd->color.a = color.RGBA.A; 1865 1866 vboxDXCommandBufferCommit(pDevice); 1867 return VINF_SUCCESS; 1868 } 1869 1870 1871 int vgpu10VideoProcessorSetOutputColorSpace(PVBOXDX_DEVICE pDevice, 1872 VBSVGA3dVideoProcessorId videoProcessorId, 1873 VBSVGA3dVideoProcessorColorSpace const &colorSpace) 1874 { 1875 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_COLOR_SPACE, 1876 sizeof(VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace), 0); 1877 if (!pvCmd) 1878 return VERR_NO_MEMORY; 1879 1880 VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace *cmd = (VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace *)pvCmd; 1881 SET_CMD_FIELD(videoProcessorId); 1882 SET_CMD_FIELD(colorSpace); 1883 1884 vboxDXCommandBufferCommit(pDevice); 1885 return VINF_SUCCESS; 1886 } 1887 1888 1889 int vgpu10VideoProcessorSetOutputAlphaFillMode(PVBOXDX_DEVICE pDevice, 1890 VBSVGA3dVideoProcessorId videoProcessorId, 1891 VBSVGA3dVideoProcessorAlphaFillMode fillMode, 1892 uint32 streamIndex) 1893 { 1894 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_ALPHA_FILL_MODE, 1895 sizeof(VBSVGA3dCmdDXVideoProcessorSetOutputAlphaFillMode), 0); 1896 if (!pvCmd) 1897 return VERR_NO_MEMORY; 1898 1899 VBSVGA3dCmdDXVideoProcessorSetOutputAlphaFillMode *cmd = (VBSVGA3dCmdDXVideoProcessorSetOutputAlphaFillMode *)pvCmd; 1900 SET_CMD_FIELD(videoProcessorId); 1901 SET_CMD_FIELD(fillMode); 1902 SET_CMD_FIELD(streamIndex); 1903 1904 vboxDXCommandBufferCommit(pDevice); 1905 return VINF_SUCCESS; 1906 } 1907 1908 1909 int vgpu10VideoProcessorSetOutputConstriction(PVBOXDX_DEVICE pDevice, 1910 VBSVGA3dVideoProcessorId videoProcessorId, 1911 BOOL enabled, 1912 SIZE constrictonSize) 1913 { 1914 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_CONSTRICTION, 1915 sizeof(VBSVGA3dCmdDXVideoProcessorSetOutputConstriction), 0); 1916 if (!pvCmd) 1917 return VERR_NO_MEMORY; 1918 1919 VBSVGA3dCmdDXVideoProcessorSetOutputConstriction *cmd = (VBSVGA3dCmdDXVideoProcessorSetOutputConstriction *)pvCmd; 1920 SET_CMD_FIELD(videoProcessorId); 1921 SET_CMD_FIELD(enabled); 1922 cmd->width = constrictonSize.cx; 1923 cmd->height = constrictonSize.cy; 1924 1925 vboxDXCommandBufferCommit(pDevice); 1926 return VINF_SUCCESS; 1927 } 1928 1929 1930 int vgpu10VideoProcessorSetOutputStereoMode(PVBOXDX_DEVICE pDevice, 1931 VBSVGA3dVideoProcessorId videoProcessorId, 1932 BOOL enable) 1933 { 1934 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_STEREO_MODE, 1935 sizeof(VBSVGA3dCmdDXVideoProcessorSetOutputStereoMode), 0); 1936 if (!pvCmd) 1937 return VERR_NO_MEMORY; 1938 1939 VBSVGA3dCmdDXVideoProcessorSetOutputStereoMode *cmd = (VBSVGA3dCmdDXVideoProcessorSetOutputStereoMode *)pvCmd; 1940 SET_CMD_FIELD(videoProcessorId); 1941 SET_CMD_FIELD(enable); 1942 1943 vboxDXCommandBufferCommit(pDevice); 1944 return VINF_SUCCESS; 1945 } 1946 1947 1948 int vgpu10VideoProcessorSetStreamFrameFormat(PVBOXDX_DEVICE pDevice, 1949 VBSVGA3dVideoProcessorId videoProcessorId, 1950 uint32 streamIndex, 1951 VBSVGA3dVideoFrameFormat format) 1952 { 1953 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_FRAME_FORMAT, 1954 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamFrameFormat), 0); 1955 if (!pvCmd) 1956 return VERR_NO_MEMORY; 1957 1958 VBSVGA3dCmdDXVideoProcessorSetStreamFrameFormat *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamFrameFormat *)pvCmd; 1959 SET_CMD_FIELD(videoProcessorId); 1960 SET_CMD_FIELD(streamIndex); 1961 SET_CMD_FIELD(format); 1962 1963 vboxDXCommandBufferCommit(pDevice); 1964 return VINF_SUCCESS; 1965 } 1966 1967 1968 int vgpu10VideoProcessorSetStreamColorSpace(PVBOXDX_DEVICE pDevice, 1969 VBSVGA3dVideoProcessorId videoProcessorId, 1970 uint32 streamIndex, 1971 VBSVGA3dVideoProcessorColorSpace const &colorSpace) 1972 { 1973 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_COLOR_SPACE, 1974 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamColorSpace), 0); 1975 if (!pvCmd) 1976 return VERR_NO_MEMORY; 1977 1978 VBSVGA3dCmdDXVideoProcessorSetStreamColorSpace *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamColorSpace *)pvCmd; 1979 SET_CMD_FIELD(videoProcessorId); 1980 SET_CMD_FIELD(streamIndex); 1981 SET_CMD_FIELD(colorSpace); 1982 1983 vboxDXCommandBufferCommit(pDevice); 1984 return VINF_SUCCESS; 1985 } 1986 1987 1988 int vgpu10VideoProcessorSetStreamOutputRate(PVBOXDX_DEVICE pDevice, 1989 VBSVGA3dVideoProcessorId videoProcessorId, 1990 uint32 streamIndex, 1991 VBSVGA3dVideoProcessorOutputRate outputRate, 1992 uint8 repeatFrame, 1993 SVGA3dFraction64 const &customRate) 1994 { 1995 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_OUTPUT_RATE, 1996 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamOutputRate), 0); 1997 if (!pvCmd) 1998 return VERR_NO_MEMORY; 1999 2000 VBSVGA3dCmdDXVideoProcessorSetStreamOutputRate *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamOutputRate *)pvCmd; 2001 SET_CMD_FIELD(videoProcessorId); 2002 SET_CMD_FIELD(streamIndex); 2003 SET_CMD_FIELD(outputRate); 2004 SET_CMD_FIELD(repeatFrame); 2005 SET_CMD_FIELD(customRate); 2006 2007 vboxDXCommandBufferCommit(pDevice); 2008 return VINF_SUCCESS; 2009 } 2010 2011 2012 int vgpu10VideoProcessorSetStreamSourceRect(PVBOXDX_DEVICE pDevice, 2013 VBSVGA3dVideoProcessorId videoProcessorId, 2014 uint32 streamIndex, 2015 BOOL enable, 2016 RECT const *pSourceRect) 2017 { 2018 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_SOURCE_RECT, 2019 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamSourceRect), 0); 2020 if (!pvCmd) 2021 return VERR_NO_MEMORY; 2022 2023 VBSVGA3dCmdDXVideoProcessorSetStreamSourceRect *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamSourceRect *)pvCmd; 2024 SET_CMD_FIELD(videoProcessorId); 2025 SET_CMD_FIELD(streamIndex); 2026 SET_CMD_FIELD(enable); 2027 cmd->sourceRect.left = pSourceRect->left; 2028 cmd->sourceRect.top = pSourceRect->top; 2029 cmd->sourceRect.right = pSourceRect->right; 2030 cmd->sourceRect.bottom = pSourceRect->bottom; 2031 2032 vboxDXCommandBufferCommit(pDevice); 2033 return VINF_SUCCESS; 2034 } 2035 2036 2037 int vgpu10VideoProcessorSetStreamDestRect(PVBOXDX_DEVICE pDevice, 2038 VBSVGA3dVideoProcessorId videoProcessorId, 2039 uint32 streamIndex, 2040 BOOL enable, 2041 RECT const *pDestRect) 2042 { 2043 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_DEST_RECT, 2044 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamDestRect), 0); 2045 if (!pvCmd) 2046 return VERR_NO_MEMORY; 2047 2048 VBSVGA3dCmdDXVideoProcessorSetStreamDestRect *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamDestRect *)pvCmd; 2049 SET_CMD_FIELD(videoProcessorId); 2050 SET_CMD_FIELD(streamIndex); 2051 SET_CMD_FIELD(enable); 2052 cmd->destRect.left = pDestRect->left; 2053 cmd->destRect.top = pDestRect->top; 2054 cmd->destRect.right = pDestRect->right; 2055 cmd->destRect.bottom = pDestRect->bottom; 2056 2057 vboxDXCommandBufferCommit(pDevice); 2058 return VINF_SUCCESS; 2059 } 2060 2061 2062 int vgpu10VideoProcessorSetStreamAlpha(PVBOXDX_DEVICE pDevice, 2063 VBSVGA3dVideoProcessorId videoProcessorId, 2064 uint32 streamIndex, 2065 BOOL enable, 2066 float alpha) 2067 { 2068 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_ALPHA, 2069 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamAlpha), 0); 2070 if (!pvCmd) 2071 return VERR_NO_MEMORY; 2072 2073 VBSVGA3dCmdDXVideoProcessorSetStreamAlpha *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamAlpha *)pvCmd; 2074 SET_CMD_FIELD(videoProcessorId); 2075 SET_CMD_FIELD(streamIndex); 2076 SET_CMD_FIELD(enable); 2077 SET_CMD_FIELD(alpha); 2078 2079 vboxDXCommandBufferCommit(pDevice); 2080 return VINF_SUCCESS; 2081 } 2082 2083 2084 int vgpu10VideoProcessorSetStreamPixelAspectRatio(PVBOXDX_DEVICE pDevice, 2085 VBSVGA3dVideoProcessorId videoProcessorId, 2086 uint32 streamIndex, 2087 BOOL enable, 2088 SVGA3dFraction64 const &sourceRatio, 2089 SVGA3dFraction64 const &destRatio) 2090 { 2091 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_PIXEL_ASPECT_RATIO, 2092 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamPixelAspectRatio), 0); 2093 if (!pvCmd) 2094 return VERR_NO_MEMORY; 2095 2096 VBSVGA3dCmdDXVideoProcessorSetStreamPixelAspectRatio *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamPixelAspectRatio *)pvCmd; 2097 SET_CMD_FIELD(videoProcessorId); 2098 SET_CMD_FIELD(streamIndex); 2099 SET_CMD_FIELD(enable); 2100 SET_CMD_FIELD(sourceRatio); 2101 SET_CMD_FIELD(destRatio); 2102 2103 vboxDXCommandBufferCommit(pDevice); 2104 return VINF_SUCCESS; 2105 } 2106 2107 2108 int vgpu10VideoProcessorSetStreamLumaKey(PVBOXDX_DEVICE pDevice, 2109 VBSVGA3dVideoProcessorId videoProcessorId, 2110 uint32 streamIndex, 2111 BOOL enable, 2112 float lower, 2113 float upper) 2114 { 2115 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_LUMA_KEY, 2116 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamLumaKey), 0); 2117 if (!pvCmd) 2118 return VERR_NO_MEMORY; 2119 2120 VBSVGA3dCmdDXVideoProcessorSetStreamLumaKey *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamLumaKey *)pvCmd; 2121 SET_CMD_FIELD(videoProcessorId); 2122 SET_CMD_FIELD(streamIndex); 2123 SET_CMD_FIELD(enable); 2124 SET_CMD_FIELD(lower); 2125 SET_CMD_FIELD(upper); 2126 2127 vboxDXCommandBufferCommit(pDevice); 2128 return VINF_SUCCESS; 2129 } 2130 2131 2132 int vgpu10VideoProcessorSetStreamStereoFormat(PVBOXDX_DEVICE pDevice, 2133 VBSVGA3dVideoProcessorId videoProcessorId, 2134 uint32 streamIndex, 2135 BOOL enable, 2136 VBSVGA3dVideoProcessorStereoFormat stereoFormat, 2137 uint8 leftViewFrame0, 2138 uint8 baseViewFrame0, 2139 VBSVGA3dVideoProcessorStereoFlipMode flipMode, 2140 int monoOffset) 2141 { 2142 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_STEREO_FORMAT, 2143 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamStereoFormat), 0); 2144 if (!pvCmd) 2145 return VERR_NO_MEMORY; 2146 2147 VBSVGA3dCmdDXVideoProcessorSetStreamStereoFormat *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamStereoFormat *)pvCmd; 2148 SET_CMD_FIELD(videoProcessorId); 2149 SET_CMD_FIELD(streamIndex); 2150 SET_CMD_FIELD(enable); 2151 SET_CMD_FIELD(stereoFormat); 2152 SET_CMD_FIELD(leftViewFrame0); 2153 SET_CMD_FIELD(baseViewFrame0); 2154 SET_CMD_FIELD(flipMode); 2155 SET_CMD_FIELD(monoOffset); 2156 2157 vboxDXCommandBufferCommit(pDevice); 2158 return VINF_SUCCESS; 2159 } 2160 2161 2162 int vgpu10VideoProcessorSetStreamAutoProcessingMode(PVBOXDX_DEVICE pDevice, 2163 VBSVGA3dVideoProcessorId videoProcessorId, 2164 uint32 streamIndex, 2165 BOOL enable) 2166 { 2167 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_AUTO_PROCESSING_MODE, 2168 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamAutoProcessingMode), 0); 2169 if (!pvCmd) 2170 return VERR_NO_MEMORY; 2171 2172 VBSVGA3dCmdDXVideoProcessorSetStreamAutoProcessingMode *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamAutoProcessingMode *)pvCmd; 2173 SET_CMD_FIELD(videoProcessorId); 2174 SET_CMD_FIELD(streamIndex); 2175 SET_CMD_FIELD(enable); 2176 2177 vboxDXCommandBufferCommit(pDevice); 2178 return VINF_SUCCESS; 2179 } 2180 2181 2182 int vgpu10VideoProcessorSetStreamFilter(PVBOXDX_DEVICE pDevice, 2183 VBSVGA3dVideoProcessorId videoProcessorId, 2184 uint32 streamIndex, 2185 BOOL enable, 2186 VBSVGA3dVideoProcessorFilter filter, 2187 int level) 2188 { 2189 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_FILTER, 2190 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamFilter), 0); 2191 if (!pvCmd) 2192 return VERR_NO_MEMORY; 2193 2194 VBSVGA3dCmdDXVideoProcessorSetStreamFilter *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamFilter *)pvCmd; 2195 SET_CMD_FIELD(videoProcessorId); 2196 SET_CMD_FIELD(streamIndex); 2197 SET_CMD_FIELD(enable); 2198 SET_CMD_FIELD(filter); 2199 SET_CMD_FIELD(level); 2200 2201 vboxDXCommandBufferCommit(pDevice); 2202 return VINF_SUCCESS; 2203 } 2204 2205 2206 int vgpu10VideoProcessorSetStreamRotation(PVBOXDX_DEVICE pDevice, 2207 VBSVGA3dVideoProcessorId videoProcessorId, 2208 uint32 streamIndex, 2209 BOOL enable, 2210 VBSVGA3dVideoProcessorRotation rotation) 2211 { 2212 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_ROTATION, 2213 sizeof(VBSVGA3dCmdDXVideoProcessorSetStreamRotation), 0); 2214 if (!pvCmd) 2215 return VERR_NO_MEMORY; 2216 2217 VBSVGA3dCmdDXVideoProcessorSetStreamRotation *cmd = (VBSVGA3dCmdDXVideoProcessorSetStreamRotation *)pvCmd; 2218 SET_CMD_FIELD(videoProcessorId); 2219 SET_CMD_FIELD(streamIndex); 2220 SET_CMD_FIELD(enable); 2221 SET_CMD_FIELD(rotation); 2222 2223 vboxDXCommandBufferCommit(pDevice); 2224 return VINF_SUCCESS; 2225 } 2226 2227 2228 int vgpu10GetVideoCapability(PVBOXDX_DEVICE pDevice, 2229 VBSVGA3dVideoCapability capability, 2230 D3DKMT_HANDLE hAllocation, 2231 uint32 offsetInBytes, 2232 uint32 sizeInBytes, 2233 uint64 fenceValue) 2234 { 2235 void *pvCmd = vboxDXCommandBufferReserve(pDevice, VBSVGA_3D_CMD_DX_GET_VIDEO_CAPABILITY, 2236 sizeof(VBSVGA3dCmdDXGetVideoCapability), 1); 2237 if (!pvCmd) 2238 return VERR_NO_MEMORY; 2239 2240 VBSVGA3dCmdDXGetVideoCapability *cmd = (VBSVGA3dCmdDXGetVideoCapability *)pvCmd; 2241 SET_CMD_FIELD(capability); 2242 cmd->mobid = SVGA3D_INVALID_ID; 2243 SET_CMD_FIELD(offsetInBytes); 2244 SET_CMD_FIELD(sizeInBytes); 2245 SET_CMD_FIELD(fenceValue); 2246 2247 vboxDXStorePatchLocation(pDevice, &cmd->mobid, VBOXDXALLOCATIONTYPE_CO, 2248 hAllocation, offsetInBytes, true); 2249 2250 vboxDXCommandBufferCommit(pDevice); 2251 return VINF_SUCCESS; 2252 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.h
r100065 r102145 325 325 SVGA3dDXPresentBltMode mode); 326 326 327 int vgpu10DefineVideoProcessor(PVBOXDX_DEVICE pDevice, 328 uint32 uVideoProcessorId, 329 VBSVGA3dVideoProcessorDesc const &desc, 330 uint32 RateConversionCapsIndex); 331 int vgpu10DefineVideoDecoderOutputView(PVBOXDX_DEVICE pDevice, 332 VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId, 333 D3DKMT_HANDLE hAllocation, 334 VBSVGA3dVDOVDesc const &desc); 335 int vgpu10DefineVideoDecoder(PVBOXDX_DEVICE pDevice, 336 VBSVGA3dVideoDecoderId videoDecoderId, 337 VBSVGA3dVideoDecoderDesc const &desc, 338 VBSVGA3dVideoDecoderConfig const &config); 339 int vgpu10VideoDecoderBeginFrame(PVBOXDX_DEVICE pDevice, 340 VBSVGA3dVideoDecoderId videoDecoderId, 341 VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId); 342 int vgpu10VideoDecoderSubmitBuffers(PVBOXDX_DEVICE pDevice, 343 VBSVGA3dVideoDecoderId videoDecoderId, 344 uint32 bufferCount, 345 D3DKMT_HANDLE const *pahAllocation, 346 VBSVGA3dVideoDecoderBufferDesc const *paBufferDesc); 347 int vgpu10VideoDecoderEndFrame(PVBOXDX_DEVICE pDevice, 348 VBSVGA3dVideoDecoderId videoDecoderId); 349 int vgpu10DefineVideoProcessorInputView(PVBOXDX_DEVICE pDevice, 350 VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId, 351 D3DKMT_HANDLE hAllocation, 352 VBSVGA3dVideoProcessorDesc const &contentDesc, 353 VBSVGA3dVPIVDesc const &desc); 354 int vgpu10DefineVideoProcessorOutputView(PVBOXDX_DEVICE pDevice, 355 VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId, 356 D3DKMT_HANDLE hAllocation, 357 VBSVGA3dVideoProcessorDesc const &contentDesc, 358 VBSVGA3dVPOVDesc const &desc); 359 int vgpu10VideoProcessorBlt(PVBOXDX_DEVICE pDevice, 360 VBSVGA3dVideoProcessorId videoProcessorId, 361 VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId, 362 uint32 OutputFrame, 363 uint32 StreamCount, 364 uint32 cbVideoProcessorStreams, 365 VBSVGA3dVideoProcessorStream *paVideoProcessorStreams); 366 int vgpu10DestroyVideoDecoder(PVBOXDX_DEVICE pDevice, 367 VBSVGA3dVideoDecoderId videoDecoderId); 368 int vgpu10DestroyVideoDecoderOutputView(PVBOXDX_DEVICE pDevice, 369 VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId); 370 int vgpu10DestroyVideoProcessor(PVBOXDX_DEVICE pDevice, 371 VBSVGA3dVideoProcessorId videoProcessorId); 372 int vgpu10DestroyVideoProcessorInputView(PVBOXDX_DEVICE pDevice, 373 VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId); 374 int vgpu10DestroyVideoProcessorOutputView(PVBOXDX_DEVICE pDevice, 375 VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId); 376 int vgpu10VideoProcessorSetOutputTargetRect(PVBOXDX_DEVICE pDevice, 377 VBSVGA3dVideoProcessorId videoProcessorId, 378 BOOL enable, 379 RECT const &outputRect); 380 int vgpu10VideoProcessorSetOutputBackgroundColor(PVBOXDX_DEVICE pDevice, 381 VBSVGA3dVideoProcessorId videoProcessorId, 382 BOOL ycbcr, 383 D3D11_1DDI_VIDEO_COLOR const &color); 384 int vgpu10VideoProcessorSetOutputColorSpace(PVBOXDX_DEVICE pDevice, 385 VBSVGA3dVideoProcessorId videoProcessorId, 386 VBSVGA3dVideoProcessorColorSpace const &colorSpace); 387 int vgpu10VideoProcessorSetOutputAlphaFillMode(PVBOXDX_DEVICE pDevice, 388 VBSVGA3dVideoProcessorId videoProcessorId, 389 VBSVGA3dVideoProcessorAlphaFillMode fillMode, 390 uint32 streamIndex); 391 int vgpu10VideoProcessorSetOutputConstriction(PVBOXDX_DEVICE pDevice, 392 VBSVGA3dVideoProcessorId videoProcessorId, 393 BOOL enabled, 394 SIZE constrictonSize); 395 int vgpu10VideoProcessorSetOutputStereoMode(PVBOXDX_DEVICE pDevice, 396 VBSVGA3dVideoProcessorId videoProcessorId, 397 BOOL enable); 398 int vgpu10VideoProcessorSetStreamFrameFormat(PVBOXDX_DEVICE pDevice, 399 VBSVGA3dVideoProcessorId videoProcessorId, 400 uint32 streamIndex, 401 VBSVGA3dVideoFrameFormat format); 402 int vgpu10VideoProcessorSetStreamColorSpace(PVBOXDX_DEVICE pDevice, 403 VBSVGA3dVideoProcessorId videoProcessorId, 404 uint32 streamIndex, 405 VBSVGA3dVideoProcessorColorSpace const &colorSpace); 406 int vgpu10VideoProcessorSetStreamOutputRate(PVBOXDX_DEVICE pDevice, 407 VBSVGA3dVideoProcessorId videoProcessorId, 408 uint32 streamIndex, 409 VBSVGA3dVideoProcessorOutputRate outputRate, 410 uint8 repeatFrame, 411 SVGA3dFraction64 const &customRate); 412 int vgpu10VideoProcessorSetStreamSourceRect(PVBOXDX_DEVICE pDevice, 413 VBSVGA3dVideoProcessorId videoProcessorId, 414 uint32 streamIndex, 415 BOOL enable, 416 RECT const *pSourceRect); 417 int vgpu10VideoProcessorSetStreamDestRect(PVBOXDX_DEVICE pDevice, 418 VBSVGA3dVideoProcessorId videoProcessorId, 419 uint32 streamIndex, 420 BOOL enable, 421 RECT const *pDestRect); 422 int vgpu10VideoProcessorSetStreamAlpha(PVBOXDX_DEVICE pDevice, 423 VBSVGA3dVideoProcessorId videoProcessorId, 424 uint32 streamIndex, 425 BOOL enable, 426 float alpha); 427 int vgpu10VideoProcessorSetStreamPixelAspectRatio(PVBOXDX_DEVICE pDevice, 428 VBSVGA3dVideoProcessorId videoProcessorId, 429 uint32 streamIndex, 430 BOOL enable, 431 SVGA3dFraction64 const &sourceRatio, 432 SVGA3dFraction64 const &destRatio); 433 int vgpu10VideoProcessorSetStreamLumaKey(PVBOXDX_DEVICE pDevice, 434 VBSVGA3dVideoProcessorId videoProcessorId, 435 uint32 streamIndex, 436 BOOL enable, 437 float lower, 438 float upper); 439 int vgpu10VideoProcessorSetStreamStereoFormat(PVBOXDX_DEVICE pDevice, 440 VBSVGA3dVideoProcessorId videoProcessorId, 441 uint32 streamIndex, 442 BOOL enable, 443 VBSVGA3dVideoProcessorStereoFormat stereoFormat, 444 uint8 leftViewFrame0, 445 uint8 baseViewFrame0, 446 VBSVGA3dVideoProcessorStereoFlipMode flipMode, 447 int monoOffset); 448 int vgpu10VideoProcessorSetStreamAutoProcessingMode(PVBOXDX_DEVICE pDevice, 449 VBSVGA3dVideoProcessorId videoProcessorId, 450 uint32 streamIndex, 451 BOOL enable); 452 int vgpu10VideoProcessorSetStreamFilter(PVBOXDX_DEVICE pDevice, 453 VBSVGA3dVideoProcessorId videoProcessorId, 454 uint32 streamIndex, 455 BOOL enable, 456 VBSVGA3dVideoProcessorFilter filter, 457 int level); 458 int vgpu10VideoProcessorSetStreamRotation(PVBOXDX_DEVICE pDevice, 459 VBSVGA3dVideoProcessorId videoProcessorId, 460 uint32 streamIndex, 461 BOOL enable, 462 VBSVGA3dVideoProcessorRotation rotation); 463 int vgpu10GetVideoCapability(PVBOXDX_DEVICE pDevice, 464 VBSVGA3dVideoCapability capability, 465 D3DKMT_HANDLE hAllocation, 466 uint32 offsetInBytes, 467 uint32 sizeInBytes, 468 uint64 fenceValue); 469 327 470 #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_wddm_dx_VBoxDXCmd_h */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXDDI.cpp
r100065 r102145 4023 4023 ) 4024 4024 { 4025 //DEBUG_BREAKPOINT_TEST(); 4025 RT_NOREF(OutputParamSize, pOutputParamsBuffer); 4026 4026 4027 PVBOXDX_DEVICE pDevice = (PVBOXDX_DEVICE)hDevice.pDrvPrivate; 4027 4028 LogFlowFunc(("pDevice 0x%p, SubDeviceID %u, ParamSize %u, OutputParamSize %u", pDevice, SubDeviceID, ParamSize, OutputParamSize)); 4028 4029 4029 AssertReturn(SubDeviceID == D3D11_1DDI_VIDEO_FUNCTIONS, E_INVALIDARG); 4030 4031 RT_NOREF(pDevice, ParamSize, pParams, OutputParamSize, pOutputParamsBuffer); 4030 if (SubDeviceID == D3D11_1DDI_VIDEO_FUNCTIONS) 4031 { 4032 AssertReturn(ParamSize >= sizeof(D3D11_1DDI_VIDEO_INPUT), E_INVALIDARG); 4033 4034 #if 0 4035 D3D11_1DDI_VIDEO_INPUT *pVideoInput = (D3D11_1DDI_VIDEO_INPUT *)pParams; 4036 return ddi11_1RetrieveVideoFunctions(pDevice, pVideoInput); 4037 #else 4038 RT_NOREF(pDevice, pParams); 4039 #endif 4040 } 4041 4042 DEBUG_BREAKPOINT_TEST(); 4032 4043 return E_FAIL; 4033 4044 }
Note:
See TracChangeset
for help on using the changeset viewer.