Changeset 30795 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jul 12, 2010 1:10:31 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r30719 r30795 1072 1072 if (hr == S_OK) 1073 1073 { 1074 Assert(pD3D9Surf); 1074 1075 Assert(pAlloc->enmD3DIfType == VBOXDISP_D3DIFTYPE_SURFACE); 1075 1076 if (pAlloc->pD3DIf) … … 1099 1100 } 1100 1101 1102 #ifdef VBOXWDDM_WITH_VISIBLE_FB 1101 1103 pAlloc = &pRc->aAllocations[iNewRTFB]; 1102 1104 HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, ~0UL /* <- for the frontbuffer */); 1103 1105 Assert(tmpHr == S_OK); 1106 #else 1107 pAlloc = &pRc->aAllocations[iNewRTFB]; 1108 if (pAlloc->pD3DIf) 1109 { 1110 pAlloc->pD3DIf->Release(); 1111 pAlloc->pD3DIf = NULL; 1112 } 1113 #endif 1114 1115 #ifdef DEBUG 1116 for (UINT i = 0; i < pRc->cAllocations; ++i) 1117 { 1118 pAlloc = &pRc->aAllocations[i]; 1119 for (UINT j = i+1; j < pRc->cAllocations; ++j) 1120 { 1121 PVBOXWDDMDISP_ALLOCATION pAllocJ = &pRc->aAllocations[j]; 1122 Assert(pAlloc->pD3DIf != pAllocJ->pD3DIf); 1123 } 1124 } 1125 #endif 1104 1126 return S_OK; 1105 1127 } … … 2382 2404 if (VBOXDISPMODE_IS_3D(pDevice->pAdapter)) 2383 2405 { 2406 Assert(pRc != pDevice->pRenderTargetRc || pDevice->iRenderTargetFrontBuf != pData->SubResourceIndex); 2407 2384 2408 if (pRc->aAllocations[0].enmD3DIfType == VBOXDISP_D3DIFTYPE_TEXTURE) 2385 2409 { … … 3325 3349 } 3326 3350 3351 #ifndef VBOXWDDM_WITH_VISIBLE_FB 3352 if (hr == S_OK) 3353 { 3354 IDirect3DSurface9* pD3D9Surf; 3355 hr = pDevice->pDevice9If->CreateRenderTarget(pRc->aAllocations[0].SurfDesc.width, 3356 pRc->aAllocations[0].SurfDesc.height, 3357 vboxDDI2D3DFormat(pResource->Format), 3358 vboxDDI2D3DMultiSampleType(pResource->MultisampleType), 3359 pResource->MultisampleQuality, 3360 !pResource->Flags.NotLockable /* BOOL Lockable */, 3361 &pD3D9Surf, 3362 NULL /* HANDLE* pSharedHandle */ 3363 ); 3364 Assert(hr == S_OK); 3365 if (hr == S_OK) 3366 { 3367 pDevice->pRenderTargetFbCopy = pD3D9Surf; 3368 } 3369 } 3370 #endif 3371 3327 3372 if (hr != S_OK) 3328 3373 { … … 3989 4034 Assert(pDstRc->cAllocations > pData->DstSubResourceIndex); 3990 4035 Assert(pSrcRc->cAllocations > pData->SrcSubResourceIndex); 4036 Assert(pDstRc != pDevice->pRenderTargetRc || pDevice->iRenderTargetFrontBuf != pData->DstSubResourceIndex); 3991 4037 HRESULT hr = S_OK; 3992 4038 /* try StretchRect */ 3993 4039 IDirect3DSurface9 *pSrcSurfIf = NULL; 3994 4040 IDirect3DSurface9 *pDstSurfIf = NULL; 3995 hr = vboxWddmSurfGet(p SrcRc, pData->SrcSubResourceIndex, &pSrcSurfIf);4041 hr = vboxWddmSurfGet(pDstRc, pData->DstSubResourceIndex, &pDstSurfIf); 3996 4042 Assert(hr == S_OK); 3997 4043 if (hr == S_OK) 3998 4044 { 3999 Assert(pSrcSurfIf); 4000 hr = vboxWddmSurfGet(pDstRc, pData->DstSubResourceIndex, &pDstSurfIf); 4001 Assert(hr == S_OK); 4002 if (hr == S_OK) 4003 { 4004 Assert(pDstSurfIf); 4005 /* we support only Point & Linear, we ignore [Begin|Continue|End]PresentToDwm */ 4006 Assert((pData->Flags.Value & (~(0x00000100 | 0x00000200 | 0x00000400 | 0x00000001 | 0x00000002))) == 0); 4007 hr = pDevice->pDevice9If->StretchRect(pSrcSurfIf, 4008 &pData->SrcRect, 4009 pDstSurfIf, 4010 &pData->DstRect, 4011 vboxDDI2D3DBltFlags(pData->Flags)); 4012 Assert(hr == S_OK); 4013 pDstSurfIf->Release(); 4014 } 4015 pSrcSurfIf->Release(); 4045 Assert(pDstSurfIf); 4046 do 4047 { 4048 #ifndef VBOXWDDM_WITH_VISIBLE_FB 4049 if (pSrcRc == pDevice->pRenderTargetRc && pDevice->iRenderTargetFrontBuf == pData->SrcSubResourceIndex) 4050 { 4051 PVBOXWDDMDISP_ALLOCATION pSrcAlloc = &pSrcRc->aAllocations[pData->SrcSubResourceIndex]; 4052 PVBOXWDDMDISP_ALLOCATION pDstAlloc = &pDstRc->aAllocations[pData->DstSubResourceIndex]; 4053 // Assert(pSrcAlloc->SurfDesc.width == pDstAlloc->SurfDesc.width); 4054 // Assert(pSrcAlloc->SurfDesc.height == pDstAlloc->SurfDesc.height); 4055 // Assert(pSrcAlloc->SurfDesc.format == pDstAlloc->SurfDesc.format); 4056 // Assert(pSrcAlloc->SurfDesc.bpp == pDstAlloc->SurfDesc.bpp); 4057 // Assert(pSrcAlloc->SurfDesc.pitch == pDstAlloc->SurfDesc.pitch); 4058 // Assert(pSrcAlloc->SurfDesc.depth == pDstAlloc->SurfDesc.depth); 4059 // Assert(pSrcAlloc->SurfDesc.slicePitch == pDstAlloc->SurfDesc.slicePitch); 4060 // Assert(pSrcAlloc->SurfDesc.cbSize == pDstAlloc->SurfDesc.cbSize); 4061 // Assert(pData->DstRect.left == 0); 4062 // Assert(pData->DstRect.top == 0); 4063 // Assert(pData->DstRect.right == pDstAlloc->SurfDesc.width); 4064 // Assert(pData->DstRect.bottom == pDstAlloc->SurfDesc.height); 4065 // Assert(pData->SrcRect.left == 0); 4066 // Assert(pData->SrcRect.top == 0); 4067 // Assert(pData->SrcRect.right == pSrcAlloc->SurfDesc.width); 4068 // Assert(pData->SrcRect.bottom == pSrcAlloc->SurfDesc.height); 4069 #if 0 4070 if (pData->DstRect.left == 0 && pData->DstRect.top == 0 4071 && pData->DstRect.right == pDstAlloc->SurfDesc.width 4072 && pData->DstRect.bottom == pDstAlloc->SurfDesc.height 4073 && pData->SrcRect.left == 0 && pData->SrcRect.top == 0 4074 && pData->SrcRect.right == pSrcAlloc->SurfDesc.width 4075 && pData->SrcRect.bottom == pSrcAlloc->SurfDesc.height 4076 && pSrcAlloc->SurfDesc.width == pDstAlloc->SurfDesc.width 4077 && pSrcAlloc->SurfDesc.height == pDstAlloc->SurfDesc.height 4078 && pSrcAlloc->SurfDesc.format == pDstAlloc->SurfDesc.format) 4079 { 4080 hr = pDevice->pDevice9If->GetFrontBufferData(0, pDstSurfIf); 4081 Assert(hr == S_OK); 4082 break; 4083 } 4084 else 4085 #endif 4086 { 4087 pSrcSurfIf = pDevice->pRenderTargetFbCopy; 4088 Assert(pSrcSurfIf); 4089 hr = pDevice->pDevice9If->GetFrontBufferData(0, pDevice->pRenderTargetFbCopy); 4090 Assert(hr == S_OK); 4091 if (hr == S_OK) 4092 { 4093 /* do pSrcSurfIf->AddRef since we do a Release in the following if (hr == S_OK) branch */ 4094 pSrcSurfIf->AddRef(); 4095 } 4096 } 4097 } 4098 else 4099 #endif 4100 { 4101 hr = vboxWddmSurfGet(pSrcRc, pData->SrcSubResourceIndex, &pSrcSurfIf); 4102 Assert(hr == S_OK); 4103 } 4104 4105 if (hr == S_OK) 4106 { 4107 Assert(pSrcSurfIf); 4108 /* we support only Point & Linear, we ignore [Begin|Continue|End]PresentToDwm */ 4109 Assert((pData->Flags.Value & (~(0x00000100 | 0x00000200 | 0x00000400 | 0x00000001 | 0x00000002))) == 0); 4110 hr = pDevice->pDevice9If->StretchRect(pSrcSurfIf, 4111 &pData->SrcRect, 4112 pDstSurfIf, 4113 &pData->DstRect, 4114 vboxDDI2D3DBltFlags(pData->Flags)); 4115 Assert(hr == S_OK); 4116 pSrcSurfIf->Release(); 4117 } 4118 } while (0); 4119 4120 pDstSurfIf->Release(); 4016 4121 } 4017 4122 … … 4404 4509 if (pDevice->pDevice9If) 4405 4510 { 4511 #ifndef VBOXWDDM_WITH_VISIBLE_FB 4512 pDevice->pRenderTargetFbCopy->Release(); 4513 #endif 4406 4514 pDevice->pDevice9If->Release(); 4407 4515 Assert(pDevice->hWnd); -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.h
r30657 r30795 102 102 D3DDDI_CREATEDEVICEFLAGS fFlags; 103 103 HWND hWnd; 104 #ifndef VBOXWDDM_WITH_VISIBLE_FB 105 IDirect3DSurface9 *pRenderTargetFbCopy; 106 #endif 104 107 struct VBOXWDDMDISP_RESOURCE *pRenderTargetRc; 105 108 uint32_t iRenderTargetFrontBuf; -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.cpp
r30686 r30795 337 337 { 338 338 bool bSend = false; 339 Assert(pCmd->fFlags.Value == 0);339 pCmd->fFlags.Value = 0; 340 340 pCmd->fFlags.bAddHiddenRects = 1; 341 341 if (pCurContext->pLastReportedRects)
Note:
See TracChangeset
for help on using the changeset viewer.