From 231b036bca486d7c39a637b776b154ccfdd8024a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= <Бранимир Караџић> Date: Sat, 3 Dec 2016 20:39:05 -0800 Subject: [PATCH] D3D12: Fixed texture update. --- src/renderer_d3d12.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index a52931eed..7238e8f27 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -4377,8 +4377,9 @@ data.NumQualityLevels = 0; , &totalBytes ); - ID3D12Resource* staging = createCommittedResource(s_renderD3D12->m_device, HeapProperty::Upload, totalBytes); + rowPitch = bx::strideAlign(uint32_t(rowPitch), D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); + ID3D12Resource* staging = createCommittedResource(s_renderD3D12->m_device, HeapProperty::Upload, totalBytes); uint8_t* data; DX_CHECK(staging->Map(0, NULL, (void**)&data) );