Changeset 102408 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 30, 2023 9:59:50 PM (14 months ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.cpp
r102253 r102408 3462 3462 3463 3463 3464 void vboxDXClearView(PVBOXDX_DEVICE pDevice, D3D11DDI_HANDLETYPE ViewType, uint32_t ViewId, FLOAT const Color[4], D3D10_DDI_RECT const *pRect, UINT NumRects) 3465 { 3466 SVGAFifo3dCmdId enmCmdId = VBSVGA_3D_CMD_DX_CLEAR_RTV; 3467 switch (ViewType) 3468 { 3469 case D3D10DDI_HT_RENDERTARGETVIEW: 3470 break; 3471 case D3D11DDI_HT_UNORDEREDACCESSVIEW: 3472 enmCmdId = VBSVGA_3D_CMD_DX_CLEAR_UAV; 3473 break; 3474 case D3D11_1DDI_HT_VIDEODECODEROUTPUTVIEW: 3475 enmCmdId = VBSVGA_3D_CMD_DX_CLEAR_VDOV; 3476 break; 3477 case D3D11_1DDI_HT_VIDEOPROCESSORINPUTVIEW: 3478 enmCmdId = VBSVGA_3D_CMD_DX_CLEAR_VPIV; 3479 break; 3480 case D3D11_1DDI_HT_VIDEOPROCESSOROUTPUTVIEW: 3481 enmCmdId = VBSVGA_3D_CMD_DX_CLEAR_VPOV; 3482 break; 3483 default: 3484 AssertFailedReturnVoid(); 3485 } 3486 3487 vgpu10ClearView(pDevice, enmCmdId, ViewId, Color, pRect, NumRects); 3488 } 3489 3490 3464 3491 static void dxDeallocateStagingResources(PVBOXDX_DEVICE pDevice) 3465 3492 { -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.h
r102383 r102408 735 735 void vboxDXDrawInstancedIndirect(PVBOXDX_DEVICE pDevice, PVBOXDX_RESOURCE pResource, UINT AlignedByteOffsetForArgs); 736 736 void vboxDXCopyStructureCount(PVBOXDX_DEVICE pDevice, PVBOXDX_RESOURCE pDstBuffer, UINT DstAlignedByteOffset, PVBOXDXUNORDEREDACCESSVIEW pSrcView); 737 void vboxDXClearView(PVBOXDX_DEVICE pDevice, D3D11DDI_HANDLETYPE ViewType, uint32_t ViewId, FLOAT const Color[4], D3D10_DDI_RECT const *pRect, UINT NumRects); 737 738 HRESULT vboxDXBlt(PVBOXDX_DEVICE pDevice, PVBOXDX_RESOURCE pDstResource, UINT DstSubresource, 738 739 PVBOXDX_RESOURCE pSrcResource, UINT SrcSubresource, -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.cpp
r102295 r102408 921 921 } 922 922 923 924 int vgpu10ClearView(PVBOXDX_DEVICE pDevice, 925 SVGAFifo3dCmdId cmdId, 926 uint32_t viewId, 927 const float color[4], 928 const D3D10_DDI_RECT *paRects, 929 uint32_t cRects) 930 { 931 void *pvCmd = vboxDXCommandBufferReserve(pDevice, cmdId, 932 sizeof(VBSVGA3dCmdDXClearView) + cRects * sizeof(SVGASignedRect)); 933 if (!pvCmd) 934 return VERR_NO_MEMORY; 935 936 VBSVGA3dCmdDXClearView *cmd = (VBSVGA3dCmdDXClearView *)pvCmd; 937 SET_CMD_FIELD(viewId); 938 cmd->color.value[0] = color[0]; 939 cmd->color.value[1] = color[1]; 940 cmd->color.value[2] = color[2]; 941 cmd->color.value[3] = color[3]; 942 943 SVGASignedRect *paSvgaRects = (SVGASignedRect *)&cmd[1]; 944 for (uint32_t i = 0; i < cRects; ++i) 945 { 946 SVGASignedRect *d = &paSvgaRects[i]; 947 const D3D10_DDI_RECT *s = &paRects[i]; 948 d->left = s->left; 949 d->top = s->top; 950 d->right = s->right; 951 d->bottom = s->bottom; 952 } 953 954 vboxDXCommandBufferCommit(pDevice); 955 return VINF_SUCCESS; 956 } 957 958 923 959 int vgpu10DestroyRenderTargetView(PVBOXDX_DEVICE pDevice, 924 960 SVGA3dRenderTargetViewId renderTargetViewId) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.h
r102295 r102408 471 471 uint32 sizeInBytes, 472 472 uint64 fenceValue); 473 int vgpu10ClearView(PVBOXDX_DEVICE pDevice, 474 SVGAFifo3dCmdId cmdId, 475 uint32_t viewId, 476 const float color[4], 477 const D3D10_DDI_RECT *paRects, 478 uint32_t cRects); 473 479 474 480 #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_wddm_dx_VBoxDXCmd_h */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXDDI.cpp
r102383 r102408 3705 3705 PVBOXDX_DEVICE pDevice = (PVBOXDX_DEVICE)hDevice.pDrvPrivate; 3706 3706 LogFlowFunc(("pDevice 0x%p, ViewType %d, pView %p, pRect %p, NumRects %u", pDevice, ViewType, hView, pRect, NumRects)); 3707 3708 if (pDevice->pAdapter->fVBoxCaps & VBSVGA3D_CAP_VIDEO) 3709 { 3710 uint32_t ViewId = SVGA3D_INVALID_ID; 3711 3712 /* "Possible types are the following. 3713 * D3D10DDI_HT_RENDERTARGETVIEW 3714 * D3D11DDI_HT_UNORDEREDACCESSVIEW 3715 * Any D3D11_1DDI_HT_VIDEOXXX type" 3716 */ 3717 switch (ViewType) 3718 { 3719 case D3D10DDI_HT_RENDERTARGETVIEW: 3720 { 3721 PVBOXDXRENDERTARGETVIEW pRenderTargetView = (PVBOXDXRENDERTARGETVIEW)hView; 3722 ViewId = pRenderTargetView->uRenderTargetViewId; 3723 break; 3724 } 3725 case D3D11DDI_HT_UNORDEREDACCESSVIEW: 3726 { 3727 PVBOXDXUNORDEREDACCESSVIEW pUnorderedAccessView = (PVBOXDXUNORDEREDACCESSVIEW)hView; 3728 ViewId = pUnorderedAccessView->uUnorderedAccessViewId; 3729 break; 3730 } 3731 case D3D11_1DDI_HT_VIDEODECODEROUTPUTVIEW: 3732 { 3733 PVBOXDXVIDEODECODEROUTPUTVIEW pVideoDecoderOutputView = (PVBOXDXVIDEODECODEROUTPUTVIEW)hView; 3734 ViewId = pVideoDecoderOutputView->uVideoDecoderOutputViewId; 3735 break; 3736 } 3737 case D3D11_1DDI_HT_VIDEOPROCESSORINPUTVIEW: 3738 { 3739 PVBOXDXVIDEOPROCESSORINPUTVIEW pVideoProcessorInputView = (PVBOXDXVIDEOPROCESSORINPUTVIEW)hView; 3740 ViewId = pVideoProcessorInputView->uVideoProcessorInputViewId; 3741 break; 3742 } 3743 case D3D11_1DDI_HT_VIDEOPROCESSOROUTPUTVIEW: 3744 { 3745 PVBOXDXVIDEOPROCESSOROUTPUTVIEW pVideoProcessorOutputView = (PVBOXDXVIDEOPROCESSOROUTPUTVIEW)hView; 3746 ViewId = pVideoProcessorOutputView->uVideoProcessorOutputViewId; 3747 break; 3748 } 3749 default: 3750 { 3751 DEBUG_BREAKPOINT_TEST(); 3752 break; 3753 } 3754 } 3755 if (ViewId != SVGA3D_INVALID_ID) 3756 vboxDXClearView(pDevice, ViewType, ViewId, Color, pRect, NumRects); 3757 return; 3758 } 3759 3707 3760 if (ViewType == D3D10DDI_HT_RENDERTARGETVIEW) 3708 3761 {
Note:
See TracChangeset
for help on using the changeset viewer.