diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-01-14 03:48:43 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-01-14 03:48:43 +0000 |
| commit | 626dcef83c7ec18e32955c18eb2d3bb6738892a2 (patch) | |
| tree | e17f2a04d6ee3c89b8d565a906287df2efde1468 /Graphics/GraphicsTools | |
| parent | Fixed issue in resource barrier correctness debug checks in D3D12 backend (diff) | |
| download | DiligentCore-626dcef83c7ec18e32955c18eb2d3bb6738892a2.tar.gz DiligentCore-626dcef83c7ec18e32955c18eb2d3bb6738892a2.zip | |
Fixed bug in TextureUploaderD3D12
Diffstat (limited to 'Graphics/GraphicsTools')
| -rw-r--r-- | Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp | 3 |
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(); |
