diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2019-12-19 18:11:08 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2019-12-19 18:11:08 +0000 |
| commit | c32095993f3e5734b3b6a112aeef0a9536db8f7d (patch) | |
| tree | 998e0cf73c2417606913152cf53286cc22d4afde /Graphics/GraphicsEngineD3D12 | |
| parent | Added CopyTexture tests (diff) | |
| download | DiligentCore-c32095993f3e5734b3b6a112aeef0a9536db8f7d.tar.gz DiligentCore-c32095993f3e5734b3b6a112aeef0a9536db8f7d.zip | |
Added ClearRenderTarget test; fixed issue with bound render targets in D3D12 and Vk backends
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index 5b5b10cb..7812afe0 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -1260,6 +1260,13 @@ void DeviceContextD3D12Impl::CopyTextureRegion(TextureD3D12Impl* pS Uint32 DstZ, RESOURCE_STATE_TRANSITION_MODE DstTextureTransitionMode) { + // We must unbind the textures from framebuffer because + // we will transition their states. If we later try to commit + // them as render targets (e.g. from SetPipelineState()), a + // state mismatch error will occur. + UnbindTextureFromFramebuffer(pSrcTexture, true); + UnbindTextureFromFramebuffer(pDstTexture, true); + auto& CmdCtx = GetCmdContext(); if (pSrcTexture->GetDesc().Usage == USAGE_STAGING) { |
