summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-08-29 07:03:51 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-08-29 07:03:51 +0000
commitabb16f0e2161ebb6754406a650d93a4101f94565 (patch)
tree8bdd34d513d6b5e89a948312fbf593742a8b20dc /Graphics/GraphicsEngineVulkan
parentFixed issue in update texture methods in Vk and D3D12; updated copy from buff... (diff)
downloadDiligentCore-abb16f0e2161ebb6754406a650d93a4101f94565.tar.gz
DiligentCore-abb16f0e2161ebb6754406a650d93a4101f94565.zip
Added few debug checks
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index d61b947f..b389141f 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -1141,6 +1141,8 @@ namespace Diligent
auto PixelSize = Uint32{FmtAttribs.ComponentSize} * Uint32{FmtAttribs.NumComponents};
auto BufferDataStride = UpdateRegionWidth * PixelSize;
auto BufferDataDepthStride = UpdateRegionHeight * BufferDataStride;
+ VERIFY(SrcStride >= UpdateRegionWidth * PixelSize, "Source data stride (", SrcStride, ") is below the image row width (", UpdateRegionWidth * PixelSize, ")");
+ VERIFY(SrcDepthStride == 0 || SrcDepthStride >= SrcStride * UpdateRegionHeight, "Source data depth stride (", SrcDepthStride, ") is below the image plane size (", SrcStride * UpdateRegionHeight, ")");
auto MemorySize = UpdateRegionDepth * BufferDataDepthStride;
size_t Alignment = 4;
auto UploadSpace = AllocateDynamicSpace(MemorySize + static_cast<Uint32>(Alignment));