Changeset 30622 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jul 5, 2010 3:17:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r30603 r30622 34 34 35 35 #define VBOXWDDMDISP_WITH_TMPWORKAROUND 1 36 #define VBOXDISP_TMP_NEWCREATEDEVICE 1 36 37 37 38 #define VBOXWDDMOVERLAY_TEST … … 3577 3578 { 3578 3579 Assert(pDevice->pDevice9If); 3580 #if 1 3581 hr = pDevice->pDevice9If->Present(NULL, /* CONST RECT * pSourceRect */ 3582 NULL, /* CONST RECT * pDestRect */ 3583 NULL, /* HWND hDestWindowOverride */ 3584 NULL /*CONST RGNDATA * pDirtyRegion */ 3585 ); 3586 Assert(hr == S_OK); 3587 #endif 3588 } 3589 #if 0 3590 else 3591 #endif 3592 { 3593 D3DDDICB_PRESENT DdiPresent = {0}; 3594 if (pData->hSrcResource) 3595 { 3596 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hSrcResource; 3597 Assert(pRc->hKMResource); 3598 Assert(pRc->cAllocations > pData->SrcSubResourceIndex); 3599 PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->SrcSubResourceIndex]; 3600 Assert(pAlloc->hAllocation); 3601 DdiPresent.hSrcAllocation = pAlloc->hAllocation; 3602 } 3603 if (pData->hDstResource) 3604 { 3605 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hDstResource; 3606 Assert(pRc->hKMResource); 3607 Assert(pRc->cAllocations > pData->DstSubResourceIndex); 3608 PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->DstSubResourceIndex]; 3609 Assert(pAlloc->hAllocation); 3610 DdiPresent.hDstAllocation = pAlloc->hAllocation; 3611 } 3612 DdiPresent.hContext = pDevice->DefaultContext.ContextInfo.hContext; 3613 // DdiPresent.BroadcastContextCount; 3614 // DdiPresent.BroadcastContext[D3DDDI_MAX_BROADCAST_CONTEXT]; 3615 3616 hr = pDevice->RtCallbacks.pfnPresentCb(pDevice->hDevice, &DdiPresent); 3617 Assert(hr == S_OK); 3618 } 3619 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr)); 3620 return hr; 3621 } 3622 static HRESULT APIENTRY vboxWddmDDevFlush(HANDLE hDevice) 3623 { 3624 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3625 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3626 Assert(pDevice); 3627 HRESULT hr = S_OK; 3628 if (VBOXDISPMODE_IS_3D(pDevice->pAdapter)) 3629 { 3630 Assert(pDevice->pDevice9If); 3579 3631 #if 0 3580 3632 hr = pDevice->pDevice9If->Present(NULL, /* CONST RECT * pSourceRect */ … … 3585 3637 Assert(hr == S_OK); 3586 3638 #endif 3587 }3588 #if 03589 else3590 #endif3591 {3592 D3DDDICB_PRESENT DdiPresent = {0};3593 if (pData->hSrcResource)3594 {3595 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hSrcResource;3596 Assert(pRc->hKMResource);3597 Assert(pRc->cAllocations > pData->SrcSubResourceIndex);3598 PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->SrcSubResourceIndex];3599 Assert(pAlloc->hAllocation);3600 DdiPresent.hSrcAllocation = pAlloc->hAllocation;3601 }3602 if (pData->hDstResource)3603 {3604 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hDstResource;3605 Assert(pRc->hKMResource);3606 Assert(pRc->cAllocations > pData->DstSubResourceIndex);3607 PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->DstSubResourceIndex];3608 Assert(pAlloc->hAllocation);3609 DdiPresent.hDstAllocation = pAlloc->hAllocation;3610 }3611 DdiPresent.hContext = pDevice->DefaultContext.ContextInfo.hContext;3612 // DdiPresent.BroadcastContextCount;3613 // DdiPresent.BroadcastContext[D3DDDI_MAX_BROADCAST_CONTEXT];3614 3615 hr = pDevice->RtCallbacks.pfnPresentCb(pDevice->hDevice, &DdiPresent);3616 Assert(hr == S_OK);3617 }3618 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));3619 return hr;3620 }3621 static HRESULT APIENTRY vboxWddmDDevFlush(HANDLE hDevice)3622 {3623 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));3624 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice;3625 Assert(pDevice);3626 HRESULT hr = S_OK;3627 if (VBOXDISPMODE_IS_3D(pDevice->pAdapter))3628 {3629 Assert(pDevice->pDevice9If);3630 hr = pDevice->pDevice9If->Present(NULL, /* CONST RECT * pSourceRect */3631 NULL, /* CONST RECT * pDestRect */3632 NULL, /* HWND hDestWindowOverride */3633 NULL /*CONST RGNDATA * pDirtyRegion */3634 );3635 Assert(hr == S_OK);3636 3639 } 3637 3640 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
Note:
See TracChangeset
for help on using the changeset viewer.