From 63f3a40c10f2c26b6a85b4fb984cf4f1426797ae Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Mon, 29 Jan 2018 13:39:56 -0700 Subject: [PATCH] layers: Add CreateImage valid usage checks Adds 17 valid usage checks of ImageCreateInfo struct. 13 in core validation, 4 in parameter validation. Change-Id: I4bfe195f88d5e14237c1b01c5aca2de7c578aa67 --- layers/buffer_validation.cpp | 238 ++++++++++++++++++++------------ layers/core_validation.cpp | 11 +- layers/core_validation_types.h | 5 +- layers/parameter_validation_utils.cpp | 56 +++++++- layers/vk_validation_error_database.txt | 36 ++--- 5 files changed, 224 insertions(+), 122 deletions(-) diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index 44db3a6..2cecf87 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -620,7 +620,7 @@ void TransitionFinalSubpassLayouts(layer_data *device_data, GLOBAL_CB_NODE *pCB, } } } - + bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage) { bool skip = false; @@ -634,141 +634,197 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo return skip; } + bool optimal_tiling = (VK_IMAGE_TILING_OPTIMAL == pCreateInfo->tiling); + const char *tiling_string = string_VkImageTiling(pCreateInfo->tiling); + const char *format_string = string_VkFormat(pCreateInfo->format); VkFormatProperties properties = GetFormatProperties(device_data, pCreateInfo->format); + VkFormatFeatureFlags features = (optimal_tiling ? properties.optimalTilingFeatures : properties.linearTilingFeatures); - if ((pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) && (properties.linearTilingFeatures == 0)) { + if (0 == features) { std::stringstream ss; - ss << "vkCreateImage format parameter (" << string_VkFormat(pCreateInfo->format) << ") is an unsupported format"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007a2, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007a2]); - + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007ac : VALIDATION_ERROR_09e007a2); + ss << "vkCreateImage format parameter " << format_string << " is an unsupported format"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); return skip; } - if ((pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL) && (properties.optimalTilingFeatures == 0)) { + if ((pCreateInfo->usage & VK_IMAGE_USAGE_SAMPLED_BIT) && !(features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { std::stringstream ss; - ss << "vkCreateImage format parameter (" << string_VkFormat(pCreateInfo->format) << ") is an unsupported format"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007ac, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007ac]); + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007ae : VALIDATION_ERROR_09e007a4); + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_SAMPLED_BIT is not supported for format " << format_string << " with tiling " + << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); + } - return skip; + if ((pCreateInfo->usage & VK_IMAGE_USAGE_STORAGE_BIT) && !(features & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) { + std::stringstream ss; + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b0 : VALIDATION_ERROR_09e007a6); + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_STORAGE_BIT is not supported for format " << format_string << " with tiling " + << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); } // TODO: Add checks for EXTENDED_USAGE images to validate images are compatible // For EXTENDED_USAGE images, format can match any image COMPATIBLE with original image if (!GetDeviceExtensions(device_data)->vk_khr_maintenance2 || !(pCreateInfo->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR)) { // Validate that format supports usage as color attachment - if (pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) { - if ((pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL) && - ((properties.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) == 0)) { - std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_OPTIMAL image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_COLOR_ATTACHMENT"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007b2, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007b2]); - } - if ((pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) && - ((properties.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) == 0)) { - std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_LINEAR image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_COLOR_ATTACHMENT"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007a8, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007a8]); - } + if ((pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) && + (0 == (features & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT))) { + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b2 : VALIDATION_ERROR_09e007a8); + std::stringstream ss; + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_COLOR_ATTACHMENT is not supported for format " << format_string + << " with tiling " << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); } // Validate that format supports usage as depth/stencil attachment - if (pCreateInfo->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) { - if ((pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL) && - ((properties.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) == 0)) { + if ((pCreateInfo->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) && + (0 == (features & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT))) { + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b4 : VALIDATION_ERROR_09e007aa); + std::stringstream ss; + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT is not supported for format " << format_string + << " with tiling " << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); + } + } + + if ((pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) && (VK_IMAGE_TYPE_2D != pCreateInfo->imageType)) { + std::stringstream ss; + ss << "vkCreateImage: Image type must be VK_IMAGE_TYPE_2D when VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT flag bit is set"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0076a, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0076a]); + } + + const VkPhysicalDeviceLimits *device_limits = &(GetPhysicalDeviceProperties(device_data)->limits); + VkImageFormatProperties format_limits; // Format limits may exceed general device limits + VkResult err = GetImageFormatProperties(device_data, pCreateInfo, &format_limits); + if (VK_SUCCESS != err) { + std::stringstream ss; + ss << "vkCreateImage: The combination of format, type, tiling, usage and flags supplied in the VkImageCreateInfo struct is " + "reported by vkGetPhysicalDeviceImageFormatProperties() as unsupported"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00758, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00758]); + return skip; + } + + if ((VK_IMAGE_TYPE_1D == pCreateInfo->imageType) && + (pCreateInfo->extent.width > std::max(device_limits->maxImageDimension1D, format_limits.maxExtent.width))) { + std::stringstream ss; + ss << "vkCreateImage: 1D image width exceeds maximum supported width for format " << format_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0076e, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0076e]); + } + + if (VK_IMAGE_TYPE_2D == pCreateInfo->imageType) { + if (0 == (pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)) { + if (pCreateInfo->extent.width > std::max(device_limits->maxImageDimension2D, format_limits.maxExtent.width) || + pCreateInfo->extent.height > std::max(device_limits->maxImageDimension2D, format_limits.maxExtent.height)) { std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_OPTIMAL image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT"; + ss << "vkCreateImage: 2D image extent exceeds maximum supported width or height for format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007b4, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007b4]); + VALIDATION_ERROR_09e00770, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00770]); } - if ((pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) && - ((properties.linearTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) == 0)) { + } else { + if (pCreateInfo->extent.width > std::max(device_limits->maxImageDimensionCube, format_limits.maxExtent.width) || + pCreateInfo->extent.height > std::max(device_limits->maxImageDimensionCube, format_limits.maxExtent.height)) { std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_LINEAR image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT"; + ss << "vkCreateImage: 2D image extent exceeds maximum supported width or height for cube-compatible images with " + "format " + << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007aa, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007aa]); + VALIDATION_ERROR_09e00772, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00772]); } } } - VkImageFormatProperties ImageFormatProperties = GetImageFormatProperties( - device_data, pCreateInfo->format, pCreateInfo->imageType, pCreateInfo->tiling, pCreateInfo->usage, pCreateInfo->flags); + if (VK_IMAGE_TYPE_3D == pCreateInfo->imageType) { + if ((pCreateInfo->extent.width > std::max(device_limits->maxImageDimension3D, format_limits.maxExtent.width)) || + (pCreateInfo->extent.height > std::max(device_limits->maxImageDimension3D, format_limits.maxExtent.height)) || + (pCreateInfo->extent.depth > std::max(device_limits->maxImageDimension3D, format_limits.maxExtent.depth))) { + std::stringstream ss; + ss << "vkCreateImage: 3D image extent exceeds maximum supported width, height, or depth for format " << format_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00776, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00776]); + } + } - VkDeviceSize imageGranularity = GetPhysicalDeviceProperties(device_data)->limits.bufferImageGranularity; - imageGranularity = imageGranularity == 1 ? 0 : imageGranularity; + // NOTE: As of 1/30/2018 the spec VU language is as in the commented code below. I believe this is an + // error in the spec, and have submitted Gitlab Vulkan issue #1151 to have it changed to match the + // implementation shown. DJH + // + // if ((pCreateInfo->mipLevels > format_limits.maxMipLevels) && + // (std::max({ pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth }) > + // device_limits->maxImageDimension3D)) { + if (pCreateInfo->mipLevels > format_limits.maxMipLevels) { + std::stringstream ss; + ss << "vkCreateImage: Image mip levels exceed image format maxMipLevels for format " << format_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0077e, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0077e]); + } - // TODO: VALIDATION_ERROR_09e00770 VALIDATION_ERROR_09e00772 VALIDATION_ERROR_09e00776 VALIDATION_ERROR_09e0076e - // All these extent-related VUs should be checked here - if ((pCreateInfo->extent.depth > ImageFormatProperties.maxExtent.depth) || - (pCreateInfo->extent.width > ImageFormatProperties.maxExtent.width) || - (pCreateInfo->extent.height > ImageFormatProperties.maxExtent.height)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", - "CreateImage extents exceed allowable limits for format: " - "Width = %d Height = %d Depth = %d: Limits for Width = %d Height = %d Depth = %d for format %s.", - pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth, - ImageFormatProperties.maxExtent.width, ImageFormatProperties.maxExtent.height, - ImageFormatProperties.maxExtent.depth, string_VkFormat(pCreateInfo->format)); + VkImageUsageFlags attach_flags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | + VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; + if ((pCreateInfo->usage & attach_flags) && (pCreateInfo->extent.width > device_limits->maxFramebufferWidth)) { + std::stringstream ss; + ss << "vkCreateImage: Image usage flags include a frame buffer attachment bit and image width exceeds device " + "maxFramebufferWidth"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00788, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00788]); } - uint64_t totalSize = - ((uint64_t)pCreateInfo->extent.width * (uint64_t)pCreateInfo->extent.height * (uint64_t)pCreateInfo->extent.depth * - (uint64_t)pCreateInfo->arrayLayers * (uint64_t)pCreateInfo->samples * (uint64_t)FormatSize(pCreateInfo->format) + - (uint64_t)imageGranularity) & - ~(uint64_t)imageGranularity; + if ((pCreateInfo->usage & attach_flags) && (pCreateInfo->extent.height > device_limits->maxFramebufferHeight)) { + std::stringstream ss; + ss << "vkCreateImage: Image usage flags include a frame buffer attachment bit and image height exceeds device " + "maxFramebufferHeight"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0078a, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0078a]); + } + + uint64_t total_size = (uint64_t)pCreateInfo->extent.width * (uint64_t)pCreateInfo->extent.height * + (uint64_t)pCreateInfo->extent.depth * (uint64_t)pCreateInfo->arrayLayers * + (uint64_t)pCreateInfo->samples * (uint64_t)FormatSize(pCreateInfo->format); + + // Round up to imageGranularity boundary + VkDeviceSize imageGranularity = GetPhysicalDeviceProperties(device_data)->limits.bufferImageGranularity; + uint64_t ig_mask = imageGranularity - 1; + total_size = (total_size + ig_mask) & ~ig_mask; - if (totalSize > ImageFormatProperties.maxResourceSize) { + if (total_size > format_limits.maxResourceSize) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", "CreateImage resource size exceeds allowable maximum " "Image resource size = 0x%" PRIxLEAST64 ", maximum resource size = 0x%" PRIxLEAST64 " ", - totalSize, ImageFormatProperties.maxResourceSize); + total_size, format_limits.maxResourceSize); } - // TODO: VALIDATION_ERROR_09e0077e - if (pCreateInfo->mipLevels > ImageFormatProperties.maxMipLevels) { + if (pCreateInfo->arrayLayers > format_limits.maxArrayLayers) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", - "CreateImage mipLevels=%d exceeds allowable maximum supported by format of %d", pCreateInfo->mipLevels, - ImageFormatProperties.maxMipLevels); - } - - if (pCreateInfo->arrayLayers > ImageFormatProperties.maxArrayLayers) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - VALIDATION_ERROR_09e00780, "Image", - "CreateImage arrayLayers=%d exceeds allowable maximum supported by format of %d. %s", pCreateInfo->arrayLayers, - ImageFormatProperties.maxArrayLayers, validation_error_map[VALIDATION_ERROR_09e00780]); + VALIDATION_ERROR_09e00780, "Image", + "CreateImage arrayLayers=%d exceeds allowable maximum supported by format of %d. %s", + pCreateInfo->arrayLayers, format_limits.maxArrayLayers, validation_error_map[VALIDATION_ERROR_09e00780]); } - if ((pCreateInfo->samples & ImageFormatProperties.sampleCounts) == 0) { + if ((pCreateInfo->samples & format_limits.sampleCounts) == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, VALIDATION_ERROR_09e0078e, "Image", "CreateImage samples %s is not supported by format 0x%.8X. %s", - string_VkSampleCountFlagBits(pCreateInfo->samples), ImageFormatProperties.sampleCounts, + string_VkSampleCountFlagBits(pCreateInfo->samples), format_limits.sampleCounts, validation_error_map[VALIDATION_ERROR_09e0078e]); } - if (pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_UNDEFINED && pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_PREINITIALIZED) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - VALIDATION_ERROR_09e0b801, "Image", - "vkCreateImage parameter, pCreateInfo->initialLayout, must be VK_IMAGE_LAYOUT_UNDEFINED or " - "VK_IMAGE_LAYOUT_PREINITIALIZED. %s", - validation_error_map[VALIDATION_ERROR_09e0b801]); - } - if ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) && (!GetEnabledFeatures(device_data)->sparseBinding)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00792, "DS", diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index ee5f60d..69449b1 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -4532,14 +4532,13 @@ VkFormatProperties GetFormatProperties(core_validation::layer_data *device_data, return format_properties; } -VkImageFormatProperties GetImageFormatProperties(core_validation::layer_data *device_data, VkFormat format, VkImageType image_type, - VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags) { - VkImageFormatProperties image_format_properties; +VkResult GetImageFormatProperties(core_validation::layer_data *device_data, const VkImageCreateInfo *image_ci, + VkImageFormatProperties *pImageFormatProperties) { instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(device_data->instance_data->instance), instance_layer_data_map); - instance_data->dispatch_table.GetPhysicalDeviceImageFormatProperties(device_data->physical_device, format, image_type, tiling, - usage, flags, &image_format_properties); - return image_format_properties; + return instance_data->dispatch_table.GetPhysicalDeviceImageFormatProperties( + device_data->physical_device, image_ci->format, image_ci->imageType, image_ci->tiling, image_ci->usage, image_ci->flags, + pImageFormatProperties); } const debug_report_data *GetReportData(const core_validation::layer_data *device_data) { return device_data->report_data; } diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index d87012c..c63d452 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -852,9 +852,8 @@ bool ValidateCmd(layer_data *dev_data, const GLOBAL_CB_NODE *cb_state, const CMD // Prototypes for layer_data accessor functions. These should be in their own header file at some point VkFormatProperties GetFormatProperties(core_validation::layer_data *device_data, VkFormat format); -VkImageFormatProperties GetImageFormatProperties(core_validation::layer_data *device_data, VkFormat format, - VkImageType image_type, VkImageTiling tiling, VkImageUsageFlags usage, - VkImageCreateFlags flags); +VkResult GetImageFormatProperties(core_validation::layer_data *device_data, const VkImageCreateInfo *image_ci, + VkImageFormatProperties *image_format_properties); const debug_report_data *GetReportData(const layer_data *); const VkPhysicalDeviceProperties *GetPhysicalDeviceProperties(layer_data *); const CHECK_DISABLED *GetDisables(layer_data *); diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp index 817c150..e724d03 100644 --- a/layers/parameter_validation_utils.cpp +++ b/layers/parameter_validation_utils.cpp @@ -770,13 +770,22 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= ValidateGreaterThanZero(pCreateInfo->mipLevels, "pCreateInfo->mipLevels", VALIDATION_ERROR_09e00766, log_misc); skip |= ValidateGreaterThanZero(pCreateInfo->arrayLayers, "pCreateInfo->arrayLayers", VALIDATION_ERROR_09e00768, log_misc); + // InitialLayout must be PREINITIALIZED or UNDEFINED + if ((pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_UNDEFINED) && (pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_PREINITIALIZED)) + { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e007c2, LayerName, + "vkCreateImage(): initialLayout is %s, must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED. %s", + string_VkImageLayout(pCreateInfo->initialLayout), validation_error_map[VALIDATION_ERROR_09e007c2]); + } + // 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)) { 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 pCreateInfo->extent.depth must be 1. %s", - validation_error_map[VALIDATION_ERROR_09e00778]); + VALIDATION_ERROR_09e00778, LayerName, + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_1D, both " + "pCreateInfo->extent.height and pCreateInfo->extent.depth must be 1. %s", + validation_error_map[VALIDATION_ERROR_09e00778]); } if (pCreateInfo->imageType == VK_IMAGE_TYPE_2D) { @@ -801,6 +810,45 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con } } + // 3D image may have only 1 layer + if ((pCreateInfo->imageType == VK_IMAGE_TYPE_3D) && (pCreateInfo->arrayLayers != 1)) { + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00782, LayerName, + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_3D, pCreateInfo->arrayLayers must be 1. %s", + validation_error_map[VALIDATION_ERROR_09e00782]); + } + + // If multi-sample, validate type, usage, tiling and mip levels. + if ((pCreateInfo->samples != VK_SAMPLE_COUNT_1_BIT) && + ((pCreateInfo->imageType != VK_IMAGE_TYPE_2D) || (pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) || + (pCreateInfo->tiling != VK_IMAGE_TILING_OPTIMAL) || (pCreateInfo->mipLevels != 1))) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00784, LayerName, + "vkCreateImage(): Multi-sample image with incompatible type, usage, tiling, or mips. %s", + validation_error_map[VALIDATION_ERROR_09e00784]); + } + + if (0 != (pCreateInfo->usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { + VkImageUsageFlags legal_flags = (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | + VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT); + // At least one of the legal attachment bits must be set + if (0 == (pCreateInfo->usage & legal_flags)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0078c, LayerName, + "vkCreateImage(): Transient attachment image without a compatible attachment flag set. %s", + validation_error_map[VALIDATION_ERROR_09e0078c]); + } + // No flags other than the legal attachment bits may be set + legal_flags |= VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + if (0 != (pCreateInfo->usage & ~legal_flags)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00786, LayerName, + "vkCreateImage(): Transient attachment image with incompatible usage flags set. %s", + validation_error_map[VALIDATION_ERROR_09e00786]); + } + } + // mipLevels must be less than or equal to floor(log2(max(extent.width,extent.height,extent.depth)))+1 uint32_t maxDim = std::max(std::max(pCreateInfo->extent.width, pCreateInfo->extent.height), pCreateInfo->extent.depth); if (maxDim > 0 && pCreateInfo->mipLevels > (floor(log2(maxDim)) + 1)) { diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index bd683ef..7cc673a 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -689,7 +689,7 @@ VALIDATION_ERROR_09c00d8a~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-0 VALIDATION_ERROR_09c00d8c~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01734~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, "_422" image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01734)~^~ VALIDATION_ERROR_09c07a01~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstSubresource-parameter~^~core~^~The spec valid usage text states 'dstSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstSubresource-parameter)~^~implicit VALIDATION_ERROR_09c2d601~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcSubresource-parameter~^~core~^~The spec valid usage text states 'srcSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcSubresource-parameter)~^~implicit -VALIDATION_ERROR_09e00758~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-00940~^~core~^~The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)~^~ +VALIDATION_ERROR_09e00758~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-00940~^~core~^~The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)~^~ VALIDATION_ERROR_09e0075a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sharingMode-00941~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00941)~^~ VALIDATION_ERROR_09e0075c~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sharingMode-00942~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00942)~^~ VALIDATION_ERROR_09e0075e~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-00943~^~core~^~The spec valid usage text states 'format must not be VK_FORMAT_UNDEFINED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00943)~^~ @@ -698,24 +698,24 @@ VALIDATION_ERROR_09e00762~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~ VALIDATION_ERROR_09e00764~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00946~^~core~^~The spec valid usage text states 'extent::depth must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00946)~^~ VALIDATION_ERROR_09e00766~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-mipLevels-00947~^~core~^~The spec valid usage text states 'mipLevels must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-mipLevels-00947)~^~ VALIDATION_ERROR_09e00768~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-arrayLayers-00948~^~core~^~The spec valid usage text states 'arrayLayers must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00948)~^~ -VALIDATION_ERROR_09e0076a~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00949~^~core~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, imageType must be VK_IMAGE_TYPE_2D' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00949)~^~ +VALIDATION_ERROR_09e0076a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00949~^~core~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, imageType must be VK_IMAGE_TYPE_2D' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00949)~^~ VALIDATION_ERROR_09e0076c~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00950~^~(VK_KHR_maintenance1)~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, imageType must be VK_IMAGE_TYPE_3D' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-00950)~^~ -VALIDATION_ERROR_09e0076e~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00951~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension1D, or VkImageFormatProperties::maxExtent.width (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00951)~^~ -VALIDATION_ERROR_09e00770~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00952~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags does not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension2D, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00952)~^~ -VALIDATION_ERROR_09e00772~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00953~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimensionCube, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00953)~^~ +VALIDATION_ERROR_09e0076e~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00951~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension1D, or VkImageFormatProperties::maxExtent.width (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00951)~^~ +VALIDATION_ERROR_09e00770~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00952~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags does not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension2D, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00952)~^~ +VALIDATION_ERROR_09e00772~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00953~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimensionCube, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00953)~^~ VALIDATION_ERROR_09e00774~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00954~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be equal and arrayLayers must be greater than or equal to 6' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00954)~^~ -VALIDATION_ERROR_09e00776~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00955~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, extent.width, extent.height and extent.depth must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension3D, or VkImageFormatProperties::maxExtent.width/height/depth (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00955)~^~ +VALIDATION_ERROR_09e00776~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00955~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, extent.width, extent.height and extent.depth must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension3D, or VkImageFormatProperties::maxExtent.width/height/depth (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00955)~^~ VALIDATION_ERROR_09e00778~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00956~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00956)~^~ VALIDATION_ERROR_09e0077a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00957~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D, extent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00957)~^~ VALIDATION_ERROR_09e0077c~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-mipLevels-00958~^~core~^~The spec valid usage text states 'mipLevels must be less than or equal to {lfloor}log2(max(extent.width, extent.height, extent.depth)){rfloor} + 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-mipLevels-00958)~^~ -VALIDATION_ERROR_09e0077e~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00959~^~core~^~The spec valid usage text states 'If any of extent.width, extent.height, or extent.depth are greater than the equivalently named members of VkPhysicalDeviceLimits::maxImageDimension3D, mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)~^~ +VALIDATION_ERROR_09e0077e~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00959~^~core~^~The spec valid usage text states 'If any of extent.width, extent.height, or extent.depth are greater than the equivalently named members of VkPhysicalDeviceLimits::maxImageDimension3D, mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)~^~ VALIDATION_ERROR_09e00780~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-arrayLayers-00960~^~core~^~The spec valid usage text states 'arrayLayers must be less than or equal to VkImageFormatProperties::maxArrayLayers (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00960)~^~ -VALIDATION_ERROR_09e00782~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00961~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00961)~^~ -VALIDATION_ERROR_09e00784~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00962~^~core~^~The spec valid usage text states 'If samples is not VK_SAMPLE_COUNT_1_BIT, imageType must be VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, tiling must be VK_IMAGE_TILING_OPTIMAL, and mipLevels must be equal to 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00962)~^~ -VALIDATION_ERROR_09e00786~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00963~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00963)~^~ -VALIDATION_ERROR_09e00788~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00964~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00964)~^~ -VALIDATION_ERROR_09e0078a~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00965~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00965)~^~ -VALIDATION_ERROR_09e0078c~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00966~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, usage must also contain at least one of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00966)~^~ +VALIDATION_ERROR_09e00782~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00961~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00961)~^~ +VALIDATION_ERROR_09e00784~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00962~^~core~^~The spec valid usage text states 'If samples is not VK_SAMPLE_COUNT_1_BIT, imageType must be VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, tiling must be VK_IMAGE_TILING_OPTIMAL, and mipLevels must be equal to 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00962)~^~ +VALIDATION_ERROR_09e00786~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00963~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00963)~^~ +VALIDATION_ERROR_09e00788~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00964~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00964)~^~ +VALIDATION_ERROR_09e0078a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00965~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00965)~^~ +VALIDATION_ERROR_09e0078c~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00966~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, usage must also contain at least one of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00966)~^~ VALIDATION_ERROR_09e0078e~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00967~^~core~^~The spec valid usage text states 'samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00967)~^~ VALIDATION_ERROR_09e00790~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00968~^~core~^~The spec valid usage text states 'If the multisampled storage images feature is not enabled, and usage contains VK_IMAGE_USAGE_STORAGE_BIT, samples must be VK_SAMPLE_COUNT_1_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00968)~^~ VALIDATION_ERROR_09e00792~^~Y~^~None~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00969~^~core~^~The spec valid usage text states 'If the sparse bindings feature is not enabled, flags must not contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00969)~^~ @@ -727,13 +727,13 @@ VALIDATION_ERROR_09e0079c~^~Y~^~SparseResidencyImageCreateUnsupportedSamples~^~v VALIDATION_ERROR_09e0079e~^~Y~^~SparseResidencyImageCreateUnsupportedSamples~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00975~^~core~^~The spec valid usage text states 'If the sparse residency for images with 8 samples feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_8_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00975)~^~ VALIDATION_ERROR_09e007a0~^~Y~^~SparseResidencyImageCreateUnsupportedSamples~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00976~^~core~^~The spec valid usage text states 'If the sparse residency for images with 16 samples feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_16_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00976)~^~ VALIDATION_ERROR_09e007a2~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00977~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, format must be a format that has at least one supported feature bit present in the value of VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00977)~^~ -VALIDATION_ERROR_09e007a4~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00978~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00978)~^~ -VALIDATION_ERROR_09e007a6~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00979~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00979)~^~ +VALIDATION_ERROR_09e007a4~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00978~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00978)~^~ +VALIDATION_ERROR_09e007a6~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00979~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00979)~^~ VALIDATION_ERROR_09e007a8~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00980~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00980)~^~ VALIDATION_ERROR_09e007aa~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00981~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00981)~^~ VALIDATION_ERROR_09e007ac~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00982~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, format must be a format that has at least one supported feature bit present in the value of VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00982)~^~ -VALIDATION_ERROR_09e007ae~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00983~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00983)~^~ -VALIDATION_ERROR_09e007b0~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00984~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00984)~^~ +VALIDATION_ERROR_09e007ae~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00983~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00983)~^~ +VALIDATION_ERROR_09e007b0~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00984~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00984)~^~ VALIDATION_ERROR_09e007b2~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00985~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00985)~^~ VALIDATION_ERROR_09e007b4~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00986~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00986)~^~ VALIDATION_ERROR_09e007b6~^~Y~^~SparseBindingImageBufferCreate~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00987~^~core~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00987)~^~ @@ -742,7 +742,7 @@ VALIDATION_ERROR_09e007ba~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo VALIDATION_ERROR_09e007bc~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00990~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::compatibleHandleTypes, as returned by vkGetPhysicalDeviceImageFormatProperties2KHR with format, imageType, tiling, usage, and flags equal to those in this structure, and with an instance of VkPhysicalDeviceExternalImageFormatInfoKHR in the pNext chain, with a handleType equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoKHR::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00990)~^~ VALIDATION_ERROR_09e007be~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00991~^~(VK_NV_external_memory+VK_NV_external_memory_capabilities)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoNV, its handleTypes member must only contain bits that are also in VkExternalImageFormatPropertiesNV::externalMemoryProperties::compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalImageFormatPropertiesNV with format, imageType, tiling, usage, and flags equal to those in this structure, and with externalHandleType equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoNV::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00991)~^~ VALIDATION_ERROR_09e007c0~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00992~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_BIND_SFR_BIT_KHX, then mipLevels must be one, arrayLayers must be one, imageType must be VK_IMAGE_TYPE_2D, and tiling must be VK_IMAGE_TILING_OPTIMAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-00992)~^~ -VALIDATION_ERROR_09e007c2~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-initialLayout-00993~^~core~^~The spec valid usage text states 'initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-initialLayout-00993)~^~ +VALIDATION_ERROR_09e007c2~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-initialLayout-00993~^~core~^~The spec valid usage text states 'initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-initialLayout-00993)~^~ VALIDATION_ERROR_09e00ae0~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-sharingMode-01392~^~!(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-01392)~^~ VALIDATION_ERROR_09e00b18~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-sharingMode-01420~^~(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-01420)~^~ VALIDATION_ERROR_09e00b1a~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-physicalDeviceCount-01421~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the logical device was created with VkDeviceGroupDeviceCreateInfoKHX::physicalDeviceCount equal to 1, flags must not contain VK_IMAGE_CREATE_BIND_SFR_BIT_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-physicalDeviceCount-01421)~^~ -- 2.7.4