Changeset 100065 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jun 4, 2023 10:31:42 AM (22 months ago)
- svn:sync-xref-src-repo-rev:
- 157745
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.cpp
r99857 r100065 2431 2431 } 2432 2432 2433 /* Readback for read access. */ 2434 if (DDIMap == D3D10_DDI_MAP_READ || DDIMap == D3D10_DDI_MAP_READWRITE) 2435 { 2436 vgpu10ReadbackSubResource(pDevice, vboxDXGetAllocation(pResource), Subresource); 2437 vboxDXFlush(pDevice, true); 2438 /* DXGK now knows that the allocation is in use. So pfnLockCb waits until the data is ready. */ 2439 } 2440 2433 2441 HRESULT hr; 2434 2442 D3DDDICB_LOCK ddiLock; … … 2444 2452 /// @todo ddiLock.Flags.Discard = DDIMap == D3D10_DDI_MAP_WRITE_DISCARD; 2445 2453 /** @todo Other flags? */ 2446 2447 /** @todo Readback for read access. */2448 2454 2449 2455 hr = pDevice->pRTCallbacks->pfnLockCb(pDevice->hRTDevice.handle, &ddiLock); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.cpp
r99857 r100065 1104 1104 1105 1105 1106 int vgpu10ReadbackSubResource(PVBOXDX_DEVICE pDevice, 1107 D3DKMT_HANDLE hAllocation, 1108 uint32 subResource) 1109 { 1110 void *pvCmd = vboxDXCommandBufferReserve(pDevice, SVGA_3D_CMD_DX_READBACK_SUBRESOURCE, 1111 sizeof(SVGA3dCmdDXReadbackSubResource), 1); 1112 if (!pvCmd) 1113 return VERR_NO_MEMORY; 1114 1115 SVGA3dCmdDXReadbackSubResource *cmd = (SVGA3dCmdDXReadbackSubResource *)pvCmd; 1116 cmd->sid = SVGA3D_INVALID_ID; 1117 SET_CMD_FIELD(subResource); 1118 1119 /* fWriteOperation == true should make sure that DXGK waits until the command is completed 1120 * before getting the allocation data in pfnLockCb. 1121 */ 1122 vboxDXStorePatchLocation(pDevice, &cmd->sid, VBOXDXALLOCATIONTYPE_SURFACE, 1123 hAllocation, 0, true); 1124 1125 vboxDXCommandBufferCommit(pDevice); 1126 return VINF_SUCCESS; 1127 } 1128 1129 1106 1130 int vgpu10TransferFromBuffer(PVBOXDX_DEVICE pDevice, 1107 1131 D3DKMT_HANDLE hSrcAllocation, -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.h
r98103 r100065 239 239 uint32 subResource, 240 240 const SVGA3dBox *pBox); 241 int vgpu10ReadbackSubResource(PVBOXDX_DEVICE pDevice, 242 D3DKMT_HANDLE hAllocation, 243 uint32 subResource); 241 244 int vgpu10TransferFromBuffer(PVBOXDX_DEVICE pDevice, 242 245 D3DKMT_HANDLE hSrcAllocation, -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXDDI.cpp
r100055 r100065 103 103 { 104 104 /* The host does not support DX. */ 105 return E_FAIL;105 AssertFailedReturn(E_FAIL); 106 106 } 107 107 … … 3787 3787 PVBOXDX_RESOURCE pSrcResource = (PVBOXDX_RESOURCE)pPresentArg->hSurfaceToPresent; 3788 3788 PVBOXDX_RESOURCE pDstResource = (PVBOXDX_RESOURCE)pPresentArg->hDstResource; 3789 LogFlowFunc(("pDevice 0x%p, pSrcResource 0x%p[ d], pDstResource 0x%p[d], pDXGIContext %p, Flags 0x%08X, FlipInterval %d",3789 LogFlowFunc(("pDevice 0x%p, pSrcResource 0x%p[%d], pDstResource 0x%p[%d], pDXGIContext %p, Flags 0x%08X, FlipInterval %d", 3790 3790 pDevice, pSrcResource, pPresentArg->SrcSubResourceIndex, 3791 3791 pDstResource, pPresentArg->DstSubResourceIndex, pPresentArg->pDXGIContext, … … 3808 3808 } 3809 3809 3810 HRESULT APIENTRY vboxDXGIGetGammaCaps(DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS *) 3811 { 3812 DEBUG_BREAKPOINT_TEST(); 3813 LogFlowFuncEnter(); 3810 static HRESULT APIENTRY dxgiGetGammaCaps(DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS *pGammaArg) 3811 { 3812 //DEBUG_BREAKPOINT_TEST(); 3813 PVBOXDX_DEVICE pDevice = (PVBOXDX_DEVICE)pGammaArg->hDevice; 3814 LogFlowFunc(("pDevice 0x%p\n", pDevice)); 3815 RT_NOREF(pDevice); 3816 3817 pGammaArg->pGammaCapabilities->ScaleAndOffsetSupported = FALSE; 3818 pGammaArg->pGammaCapabilities->MaxConvertedValue = 0.0f; 3819 pGammaArg->pGammaCapabilities->MinConvertedValue = 0.0f; 3820 pGammaArg->pGammaCapabilities->NumGammaControlPoints = 0; 3821 RT_ZERO(pGammaArg->pGammaCapabilities->ControlPointPositions); 3822 3814 3823 return S_OK; 3815 3824 } … … 4659 4668 DXGI1_2_DDI_BASE_FUNCTIONS *pDXGIFuncs = pCreateData->DXGIBaseDDI.pDXGIDDIBaseFunctions3; 4660 4669 pDXGIFuncs->pfnPresent = dxgiPresent; 4661 pDXGIFuncs->pfnGetGammaCaps = vboxDXGIGetGammaCaps;4670 pDXGIFuncs->pfnGetGammaCaps = dxgiGetGammaCaps; 4662 4671 pDXGIFuncs->pfnSetDisplayMode = dxgiSetDisplayMode; 4663 4672 pDXGIFuncs->pfnSetResourcePriority = vboxDXGISetResourcePriority; … … 4679 4688 DXGI1_1_DDI_BASE_FUNCTIONS *pDXGIFuncs = pCreateData->DXGIBaseDDI.pDXGIDDIBaseFunctions2; 4680 4689 pDXGIFuncs->pfnPresent = dxgiPresent; 4681 pDXGIFuncs->pfnGetGammaCaps = vboxDXGIGetGammaCaps;4690 pDXGIFuncs->pfnGetGammaCaps = dxgiGetGammaCaps; 4682 4691 pDXGIFuncs->pfnSetDisplayMode = dxgiSetDisplayMode; 4683 4692 pDXGIFuncs->pfnSetResourcePriority = vboxDXGISetResourcePriority; … … 4691 4700 DXGI_DDI_BASE_FUNCTIONS *pDXGIFuncs = pCreateData->DXGIBaseDDI.pDXGIDDIBaseFunctions; 4692 4701 pDXGIFuncs->pfnPresent = dxgiPresent; 4693 pDXGIFuncs->pfnGetGammaCaps = vboxDXGIGetGammaCaps;4702 pDXGIFuncs->pfnGetGammaCaps = dxgiGetGammaCaps; 4694 4703 pDXGIFuncs->pfnSetDisplayMode = dxgiSetDisplayMode; 4695 4704 pDXGIFuncs->pfnSetResourcePriority = vboxDXGISetResourcePriority;
Note:
See TracChangeset
for help on using the changeset viewer.