aboutsummaryrefslogtreecommitdiff
path: root/layers/parameter_validation_utils.cpp
diff options
context:
space:
mode:
authorPetr Kraus <petr_kraus@email.cz>2018-03-13 12:31:08 +0100
committerMark Lobodzinski <mark@lunarg.com>2018-03-20 11:14:18 -0600
commitfcd6dd779c1d61a86bb4830cb148f293513e6e51 (patch)
treeda29fb6d1910b1c6aac2080e0640a2fad6efdefd /layers/parameter_validation_utils.cpp
parentecd3f85fc68c0e33e1340460839151a4fe178f90 (diff)
downloadusermoji-fcd6dd779c1d61a86bb4830cb148f293513e6e51.tar.xz
layers: Fix 1D height and depth extent check
Diffstat (limited to 'layers/parameter_validation_utils.cpp')
-rw-r--r--layers/parameter_validation_utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp
index e74a846a..583baf4a 100644
--- a/layers/parameter_validation_utils.cpp
+++ b/layers/parameter_validation_utils.cpp
@@ -896,7 +896,8 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con
}
// If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1
- if ((pCreateInfo->imageType == VK_IMAGE_TYPE_1D) && (pCreateInfo->extent.height != 1) && (pCreateInfo->extent.depth != 1)) {
+ if ((pCreateInfo->imageType == VK_IMAGE_TYPE_1D) &&
+ ((pCreateInfo->extent.height != 1) || (pCreateInfo->extent.depth != 1))) {
skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
VALIDATION_ERROR_09e00778, LayerName,
"vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_1D, both pCreateInfo->extent.height and "