diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2018-04-16 08:15:59 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2018-04-16 13:23:59 -0600 |
| commit | 9a162f5e65e6d34cec22d2e0d4796bcdc68d3cf0 (patch) | |
| tree | 2b80ab58e871cdec65e09f8a900cd616188da88d /layers/buffer_validation.cpp | |
| parent | b61d11652ad7effb146d14e1906748c119b72305 (diff) | |
| download | usermoji-9a162f5e65e6d34cec22d2e0d4796bcdc68d3cf0.tar.xz | |
header: Update to version 1.1.73 of the Vulkan hdr
- update json files
- update vk.xml
- update vulkan_core.h
- update validusage.json
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp
- removed checks for the following deprecated VUIDs related to
ImageCreateInfo and FormatProperties:
- VALIDATION_ERROR_09e007ae
- VALIDATION_ERROR_09e007b4
- VALIDATION_ERROR_09e007ac
- VALIDATION_ERROR_09e007a6
- VALIDATION_ERROR_09e007b2
- VALIDATION_ERROR_09e007a4
- VALIDATION_ERROR_09e007aa
- VALIDATION_ERROR_09e007a8
- VALIDATION_ERROR_09e007a2
- VALIDATION_ERROR_09e007b0
- modified CreateImageFormatSupportErrors test to remove killed checks
- modified ImageLayerUnsupportedFormat test to remove killed check
Change-Id: I8f1577747d87fdeb6f68b9db0340443a83c44630
Diffstat (limited to 'layers/buffer_validation.cpp')
| -rw-r--r-- | layers/buffer_validation.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index 0b9e1f1e..6880e4c8 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -707,66 +707,7 @@ 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 (0 == features) { - std::stringstream ss; - 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, vuid, "%s.", - ss.str().c_str()); - return skip; - } - - // TODO: Add checks for EXTENDED_USAGE images to validate images are compatible - // For EXTENDED_USAGE images, any usage bit set for any format compatible with image format becomes legal - // For now we'll just avoid the usage bit checks for EXTENDED_USAGE images, pending an implementation of - // an exhaustive search of compatible formats - if (!GetDeviceExtensions(device_data)->vk_khr_maintenance2 || !(pCreateInfo->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR)) { - if ((pCreateInfo->usage & VK_IMAGE_USAGE_SAMPLED_BIT) && !(features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { - std::stringstream ss; - 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, vuid, "%s.", - ss.str().c_str()); - } - - 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, vuid, "%s.", - ss.str().c_str()); - } - - // Validate that format supports usage as color attachment - 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, vuid, "%s.", - ss.str().c_str()); - } - - // Validate that format supports usage as depth/stencil attachment - 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, vuid, "%s.", - ss.str().c_str()); - } - } if ((pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) && (VK_IMAGE_TYPE_2D != pCreateInfo->imageType)) { std::stringstream ss; |
