From fcd6dd779c1d61a86bb4830cb148f293513e6e51 Mon Sep 17 00:00:00 2001 From: Petr Kraus Date: Tue, 13 Mar 2018 12:31:08 +0100 Subject: layers: Fix 1D height and depth extent check --- layers/parameter_validation_utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layers/parameter_validation_utils.cpp') 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 " -- cgit v1.2.3