From de4c88d5aafd9d178aa728124355f99453fc15fe Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 28 Sep 2018 19:40:53 +0200 Subject: [PATCH] [d3d11] Skip CopyResource when src and dst resource are the same --- src/d3d11/d3d11_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 735686762..4a6025570 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -511,7 +511,7 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11DeviceContext::CopyResource( ID3D11Resource* pDstResource, ID3D11Resource* pSrcResource) { - if (!pDstResource || !pSrcResource) + if (!pDstResource || !pSrcResource || (pDstResource == pSrcResource)) return; D3D11_RESOURCE_DIMENSION dstResourceDim = D3D11_RESOURCE_DIMENSION_UNKNOWN;