summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-08-31 16:33:41 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-08-31 16:33:41 +0000
commitb9015d143f001cb2eb29f05e64afc1c383f23594 (patch)
tree87103abfdb07e771faf17aa01dcc18bd90e5cfe9 /Graphics/GraphicsEngineVulkan
parentMinor correction (diff)
downloadDiligentCore-b9015d143f001cb2eb29f05e64afc1c383f23594.tar.gz
DiligentCore-b9015d143f001cb2eb29f05e64afc1c383f23594.zip
Updated debug checks in texture update methods
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 889e80aa..6598b71e 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -1144,6 +1144,8 @@ namespace Diligent
{
// Align update region size by the block size. This is only necessary when updating
// coarse mip levels. Otherwise UpdateRegionWidth/Height should be multiples of block size
+ VERIFY_EXPR( (FmtAttribs.BlockWidth & (FmtAttribs.BlockWidth-1)) == 0 );
+ VERIFY_EXPR( (FmtAttribs.BlockHeight & (FmtAttribs.BlockHeight-1)) == 0 );
const auto BlockAlignedRegionWidth = (UpdateRegionWidth + (FmtAttribs.BlockWidth-1)) & ~(FmtAttribs.BlockWidth -1);
const auto BlockAlignedRegionHeight = (UpdateRegionHeight + (FmtAttribs.BlockHeight-1)) & ~(FmtAttribs.BlockHeight-1);
RowSize = BlockAlignedRegionWidth / Uint32{FmtAttribs.BlockWidth} * Uint32{FmtAttribs.ComponentSize};