From 430fab754cb3b6dbd9ac5d4a3543beccdc0e7ac8 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 29 Aug 2018 23:05:59 -0700 Subject: Fixed issue in DeviceContextVkImpl::UpdateTextureRegion() --- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index c9ffb87f..889e80aa 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -1170,7 +1170,7 @@ namespace Diligent VERIFY(UpdateRegionDepth == 1 || SrcDepthStride >= PlaneSize, "Source data depth stride (", SrcDepthStride, ") is below the image plane size (", PlaneSize, ")"); #endif const auto BufferDataStride = RowSize; - const auto BufferDataDepthStride = (UpdateRegionHeight / FmtAttribs.BlockHeight) * BufferDataStride; + const auto BufferDataDepthStride = RowCount * BufferDataStride; const auto MemorySize = UpdateRegionDepth * BufferDataDepthStride; size_t Alignment = 4; auto UploadSpace = AllocateDynamicSpace(MemorySize + static_cast(Alignment)); -- cgit v1.2.3