summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsTools
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-01-14 03:48:43 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-01-14 03:48:43 +0000
commit626dcef83c7ec18e32955c18eb2d3bb6738892a2 (patch)
treee17f2a04d6ee3c89b8d565a906287df2efde1468 /Graphics/GraphicsTools
parentFixed issue in resource barrier correctness debug checks in D3D12 backend (diff)
downloadDiligentCore-626dcef83c7ec18e32955c18eb2d3bb6738892a2.tar.gz
DiligentCore-626dcef83c7ec18e32955c18eb2d3bb6738892a2.zip
Fixed bug in TextureUploaderD3D12
Diffstat (limited to 'Graphics/GraphicsTools')
-rw-r--r--Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp b/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp
index f6ca8d8a..0905033e 100644
--- a/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp
+++ b/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp
@@ -179,11 +179,12 @@ namespace Diligent
{
case InternalData::PendingBufferOperation::Copy:
{
- TextureSubResData SubResData(pBuffer->GetStagingBuffer(), static_cast<Uint32>(pBuffer->GetRowStride()));
+ TextureSubResData SubResData(pBuffer->GetStagingBuffer(), 0, static_cast<Uint32>(pBuffer->GetRowStride()));
const auto &TexDesc = OperationInfo.pDstTexture->GetDesc();
Box DstBox;
DstBox.MaxX = TexDesc.Width;
DstBox.MaxY = TexDesc.Height;
+ // UpdateTexture() transitions dst subresource to COPY_DEST state and then transitions back to original state
pContext->UpdateTexture(OperationInfo.pDstTexture, OperationInfo.DstMip, OperationInfo.DstSlice, DstBox,
SubResData, RESOURCE_STATE_TRANSITION_MODE_TRANSITION, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);
pBuffer->SignalCopyScheduled();