Changeset 82583 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
- Timestamp:
- Dec 13, 2019 9:29:51 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135463
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
r82431 r82583 3904 3904 /* Save for vm state save/restore. */ 3905 3905 pContext->state.aRenderTargets[type] = target.sid; 3906 /** @todo Also save target.face and target.mipmap */ 3906 3907 3907 3908 if (target.sid == SVGA3D_INVALID_ID) … … 4800 4801 uint32_t stencil, uint32_t cRects, SVGA3dRect *pRect) 4801 4802 { 4803 /* From SVGA3D_BeginClear comments: 4804 * 4805 * Clear is not affected by clipping, depth test, or other 4806 * render state which affects the fragment pipeline. 4807 * 4808 * Therefore this code must ignore the current scissor rect. 4809 */ 4810 4802 4811 DWORD clearFlagD3D = 0; 4803 4812 D3DRECT *pRectD3D = NULL; … … 4812 4821 AssertRCReturn(rc, rc); 4813 4822 4823 PVMSVGA3DSURFACE pRT; 4824 rc = vmsvga3dSurfaceFromSid(pState, pContext->state.aRenderTargets[SVGA3D_RT_COLOR0], &pRT); 4825 AssertRCReturn(rc, rc); 4826 4814 4827 if (clearFlag & SVGA3D_CLEAR_COLOR) 4815 4828 clearFlagD3D |= D3DCLEAR_TARGET; … … 4834 4847 } 4835 4848 4849 RECT currentScissorRect; 4850 pContext->pDevice->GetScissorRect(¤tScissorRect); 4851 4852 RECT clearScissorRect; 4853 clearScissorRect.left = 0; 4854 clearScissorRect.top = 0; 4855 clearScissorRect.right = pRT->paMipmapLevels[0].mipmapSize.width; 4856 clearScissorRect.bottom = pRT->paMipmapLevels[0].mipmapSize.height; 4857 pContext->pDevice->SetScissorRect(&clearScissorRect); 4858 4836 4859 hr = pContext->pDevice->Clear(cRects, pRectD3D, clearFlagD3D, (D3DCOLOR)color, depth, stencil); 4860 4837 4861 if (pRectD3D) 4838 4862 RTMemFree(pRectD3D); 4863 4864 pContext->pDevice->SetScissorRect(¤tScissorRect); 4839 4865 4840 4866 AssertMsgReturn(hr == D3D_OK, ("Clear failed with %x\n", hr), VERR_INTERNAL_ERROR);
Note:
See TracChangeset
for help on using the changeset viewer.