Changeset 81904 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 17, 2019 2:39:45 PM (5 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h
r80488 r81904 167 167 VBOXWDDMDISP_STREAM_SOURCE_INFO StreamSourceInfo[VBOXWDDMDISP_MAX_VERTEX_STREAMS]; 168 168 VBOXWDDMDISP_INDICES_INFO IndiciesInfo; 169 /* need to cache the ViewPort data because IDirect3DDevice9::SetViewport 170 * is split into two calls : SetViewport & SetZRange */ 169 /* Need to cache the ViewPort data because IDirect3DDevice9::SetViewport 170 * is split into two calls: SetViewport & SetZRange. 171 * Also the viewport must be restored after IDirect3DDevice9::SetRenderTarget. 172 */ 171 173 D3DVIEWPORT9 ViewPort; 174 /* The scissor rectangle must be restored after IDirect3DDevice9::SetRenderTarget. */ 175 RECT ScissorRect; 176 /* Whether the ViewPort field is valid, i.e. GaDdiSetViewport has been called. */ 177 bool fViewPort : 1; 178 /* Whether the ScissorRect field is valid, i.e. GaDdiSetScissorRect has been called. */ 179 bool fScissorRect : 1; 172 180 VBOXWDDMDISP_CONTEXT DefaultContext; 173 181 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/GaDdi.cpp
r81632 r81904 3170 3170 pDevice->ViewPort.Width = pData->Width; 3171 3171 pDevice->ViewPort.Height = pData->Height; 3172 pDevice->fViewPort = true; 3172 3173 3173 3174 HRESULT hr = pDevice9If->SetViewport(&pDevice->ViewPort); … … 3189 3190 pDevice->ViewPort.MinZ = pData->MinZ; 3190 3191 pDevice->ViewPort.MaxZ = pData->MaxZ; 3192 pDevice->fViewPort = true; 3191 3193 3192 3194 HRESULT hr = pDevice9If->SetViewport(&pDevice->ViewPort); … … 3457 3459 IDirect3DDevice9 *pDevice9If = VBOXDISP_D3DEV(pDevice); 3458 3460 3461 pDevice->ScissorRect = *pRect; 3462 pDevice->fScissorRect = true; 3463 3459 3464 HRESULT hr = pDevice9If->SetScissorRect(pRect); 3460 3465 Assert(hr == S_OK); … … 3833 3838 { 3834 3839 pDevice->apRTs[pData->RenderTargetIndex] = pAlloc; 3840 3841 /* IDirect3DDevice9::SetRenderTarget method resets the viewport and the scissor rectangle. */ 3842 if (pDevice->fViewPort) 3843 { 3844 pDevice9If->SetViewport(&pDevice->ViewPort); 3845 } 3846 if (pDevice->fScissorRect) 3847 { 3848 pDevice9If->SetScissorRect(&pDevice->ScissorRect); 3849 } 3835 3850 } 3836 3851 … … 4583 4598 pDevice->ViewPort.MinZ = 0.; 4584 4599 pDevice->ViewPort.MaxZ = 1.; 4600 pDevice->fViewPort = false; 4601 pDevice->fScissorRect = false; 4585 4602 4586 4603 /*
Note:
See TracChangeset
for help on using the changeset viewer.