summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp')
-rw-r--r--src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
index 9802b570..58aa8562 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
@@ -7902,7 +7902,14 @@ static DECLCALLBACK(int) vmsvga3dBackDXClearDepthStencilView(PVGASTATECC pThisCC
int rc = dxDefineDepthStencilView(pThisCC, pDXContext, depthStencilViewId, pEntry);
AssertRCReturn(rc, rc);
}
- pDevice->pImmediateContext->ClearDepthStencilView(pDXView->u.pDepthStencilView, flags, depth, stencil);
+
+ UINT ClearFlags = 0;
+ if (flags & SVGA3D_CLEAR_DEPTH)
+ ClearFlags |= D3D11_CLEAR_DEPTH;
+ if (flags & SVGA3D_CLEAR_STENCIL)
+ ClearFlags |= D3D11_CLEAR_STENCIL;
+
+ pDevice->pImmediateContext->ClearDepthStencilView(pDXView->u.pDepthStencilView, ClearFlags, depth, stencil);
return VINF_SUCCESS;
}