From 466dff5b223bd3f4af7963fec546ff179a745556 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 2 Dec 2018 09:39:49 -0800 Subject: Added explicit state transition control to UpdateBuffer and UpdateTexture commands --- Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp | 3 ++- Graphics/GraphicsTools/src/TextureUploaderGL.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsTools') diff --git a/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp b/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp index e45dfc0d..8d811cab 100644 --- a/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp +++ b/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp @@ -184,7 +184,8 @@ namespace Diligent Box DstBox; DstBox.MaxX = TexDesc.Width; DstBox.MaxY = TexDesc.Height; - pContext->UpdateTexture(OperationInfo.pDstTexture, OperationInfo.DstMip, OperationInfo.DstSlice, DstBox, SubResData); + pContext->UpdateTexture(OperationInfo.pDstTexture, OperationInfo.DstMip, OperationInfo.DstSlice, DstBox, + SubResData, RESOURCE_STATE_TRANSITION_MODE_TRANSITION, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); pBuffer->SignalCopyScheduled(); } break; diff --git a/Graphics/GraphicsTools/src/TextureUploaderGL.cpp b/Graphics/GraphicsTools/src/TextureUploaderGL.cpp index 26476a3c..01ce8fc2 100644 --- a/Graphics/GraphicsTools/src/TextureUploaderGL.cpp +++ b/Graphics/GraphicsTools/src/TextureUploaderGL.cpp @@ -206,7 +206,8 @@ namespace Diligent const auto &TexDesc = OperationInfo.pDstTexture->GetDesc(); DstBox.MaxX = TexDesc.Width; DstBox.MaxY = TexDesc.Height; - pContext->UpdateTexture(OperationInfo.pDstTexture, OperationInfo.DstMip, OperationInfo.DstSlice, DstBox, SubResData); + pContext->UpdateTexture(OperationInfo.pDstTexture, OperationInfo.DstMip, OperationInfo.DstSlice, DstBox, + SubResData, RESOURCE_STATE_TRANSITION_MODE_TRANSITION, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); pBuffer->SignalCopyScheduled(); } break; -- cgit v1.2.3