aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cooper <tom.cooper@arm.com>2018-10-15 13:08:41 +0100
committerJohn Zulauf <32470354+jzulauf-lunarg@users.noreply.github.com>2018-10-16 11:15:57 -0600
commitb2550c765a0f8e503238730c245cafa3c77d80c8 (patch)
treea132d43b4c595aed0965e908a165884893c6467a
parent052796275affa81a3ce16f88c3a265f2e0ecf913 (diff)
downloadvulkan-validation-layers-b2550c765a0f8e503238730c245cafa3c77d80c8.tar.gz
layers: Handle texel block size for image to buffer copies
When checking buffer bounds in image to buffer copies, the required buffer size must account for the texel block size for compressed or single plane "_422" image formats. Change-Id: Id9de7debe9e66cba35e39762a67cfb7e3c35bc07
-rw-r--r--layers/buffer_validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp
index bbde62a3b..facd49daa 100644
--- a/layers/buffer_validation.cpp
+++ b/layers/buffer_validation.cpp
@@ -4383,7 +4383,7 @@ static inline bool ValidateBufferBounds(const debug_report_data *report_data, IM
}
}
- if (FormatIsCompressed(image_state->createInfo.format)) {
+ if (FormatIsCompressed(image_state->createInfo.format) || FormatIsSinglePlane_422(image_state->createInfo.format)) {
// Switch to texel block units, rounding up for any partially-used blocks
auto block_dim = FormatCompressedTexelBlockExtent(image_state->createInfo.format);
buffer_width = (buffer_width + block_dim.width - 1) / block_dim.width;