tests: Fix existing tests that hit new VUs
authorDave Houlton <daveh@lunarg.com>
Tue, 30 Jan 2018 22:03:43 +0000 (15:03 -0700)
committerDave Houlton <daveh@lunarg.com>
Mon, 5 Feb 2018 23:57:03 +0000 (16:57 -0700)
Fix existing tests that were inadvertently triggering the
newly added valid usage checks.

Change-Id: I0a6baa4df36c2316070e73f8959d55b4ca6a30f8

layers/vk_validation_error_database.txt
tests/layer_validation_tests.cpp

index 7cc673a..63a6aa2 100644 (file)
@@ -701,22 +701,22 @@ VALIDATION_ERROR_09e00768~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~
 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~^~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_09e00770~^~Y~^~ImageFormatLimits~^~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~^~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~^~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_09e0077e~^~Y~^~ImageFormatLimits~^~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~^~ImageFormatLimits~^~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~^~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_09e0078e~^~Y~^~ImageFormatLimits~^~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)~^~
 VALIDATION_ERROR_09e00794~^~Y~^~SparseResidencyImageCreateUnsupportedTypes~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00970~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, 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-00970)~^~
@@ -757,7 +757,7 @@ VALIDATION_ERROR_09e00c52~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInf
 VALIDATION_ERROR_09e09001~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkImageCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-parameter)~^~implicit, TBD in parameter validation layer.
 VALIDATION_ERROR_09e09201~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-parameter~^~core~^~The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-parameter)~^~implicit
 VALIDATION_ERROR_09e0ac01~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-parameter~^~core~^~The spec valid usage text states 'imageType must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-parameter)~^~implicit
-VALIDATION_ERROR_09e0b801~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-initialLayout-parameter~^~core~^~The spec valid usage text states 'initialLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-initialLayout-parameter)~^~implicit
+VALIDATION_ERROR_09e0b801~^~Y~^~ImageFormatLimits~^~vkCreateImage~^~VUID-VkImageCreateInfo-initialLayout-parameter~^~core~^~The spec valid usage text states 'initialLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-initialLayout-parameter)~^~implicit
 VALIDATION_ERROR_09e1c40d~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationImageCreateInfoNV, VkExternalMemoryImageCreateInfoKHR, VkExternalMemoryImageCreateInfoNV, VkImageFormatListCreateInfoKHR, or VkImageSwapchainCreateInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-pNext-pNext)~^~implicit
 VALIDATION_ERROR_09e2b00b~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer.
 VALIDATION_ERROR_09e2b00f~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sType-unique~^~core~^~The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sType-unique)~^~implicit
index eb35ffb..31af03a 100644 (file)
@@ -2344,7 +2344,6 @@ TEST_F(VkLayerTest, InvalidUsageBits) {
         "Specify wrong usage for image then create conflicting view of image "
         "Initialize buffer with wrong usage then perform copy expecting errors "
         "from both the image and the buffer (2 calls)");
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Invalid usage flag for Image ");
 
     ASSERT_NO_FATAL_FAILURE(Init());
     auto format = FindSupportedDepthStencilFormat(gpu());
@@ -2354,8 +2353,8 @@ TEST_F(VkLayerTest, InvalidUsageBits) {
     }
 
     VkImageObj image(m_device);
-    // Initialize image with USAGE_TRANSIENT_ATTACHMENT
-    image.Init(128, 128, 1, format, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0);
+    // Initialize image with transfer source usage
+    image.Init(128, 128, 1, format, VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_TILING_OPTIMAL, 0);
     ASSERT_TRUE(image.initialized());
 
     VkImageView dsv;
@@ -2370,8 +2369,8 @@ TEST_F(VkLayerTest, InvalidUsageBits) {
     dsvci.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
 
     // Create a view with depth / stencil aspect for image with different usage
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Invalid usage flag for Image ");
     vkCreateImageView(m_device->device(), &dsvci, NULL, &dsv);
-
     m_errorMonitor->VerifyFound();
 
     // Initialize buffer with TRANSFER_DST usage
@@ -2391,8 +2390,8 @@ TEST_F(VkLayerTest, InvalidUsageBits) {
     m_commandBuffer->begin();
 
     // two separate errors from this call:
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Image should have VK_IMAGE_USAGE_TRANSFER_DST_BIT");
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Buffer should have VK_BUFFER_USAGE_TRANSFER_SRC_BIT");
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18e00162);
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18e0015c);
 
     vkCmdCopyBufferToImage(m_commandBuffer->handle(), buffer.handle(), image.handle(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1,
                            &region);
@@ -17742,7 +17741,7 @@ TEST_F(VkLayerTest, CreateImageLimitsViolationMaxWidth) {
     }
 
     VkImage image;
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "CreateImage extents exceed allowable limits for format");
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00770);
     vkCreateImage(m_device->device(), &info, NULL, &image);
     m_errorMonitor->VerifyFound();
 }
@@ -19134,7 +19133,6 @@ TEST_F(VkLayerTest, ImageFormatLimits) {
         }
     }
 
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "CreateImage extents exceed allowable limits for format");
     VkImageCreateInfo image_create_info = {};
     image_create_info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
     image_create_info.pNext = NULL;
@@ -19157,15 +19155,15 @@ TEST_F(VkLayerTest, ImageFormatLimits) {
                                              image_create_info.usage, image_create_info.flags, &imgFmtProps);
     image_create_info.extent.width = imgFmtProps.maxExtent.width + 1;
     // Expect INVALID_FORMAT_LIMITS_VIOLATION
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00770);
     vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg);
     m_errorMonitor->VerifyFound();
     image_create_info.extent.width = 1;
 
-    uint32_t maxDim =
-        std::max(std::max(image_create_info.extent.width, image_create_info.extent.height), image_create_info.extent.depth);
+    uint32_t maxDim = std::max({ image_create_info.extent.width, image_create_info.extent.height, image_create_info.extent.depth });
     // If max mip levels exceeds image extents, skip the max mip levels test
     if ((imgFmtProps.maxMipLevels + 1) <= (floor(log2(maxDim)) + 1)) {
-        m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "exceeds allowable maximum supported by format of");
+        m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0077e);
         image_create_info.mipLevels = imgFmtProps.maxMipLevels + 1;
         // Expect INVALID_FORMAT_LIMITS_VIOLATION
         vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg);
@@ -19173,26 +19171,29 @@ TEST_F(VkLayerTest, ImageFormatLimits) {
         image_create_info.mipLevels = 1;
     }
 
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "exceeds allowable maximum supported by format of");
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00780);
     image_create_info.arrayLayers = imgFmtProps.maxArrayLayers + 1;
     // Expect INVALID_FORMAT_LIMITS_VIOLATION
     vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg);
     m_errorMonitor->VerifyFound();
     image_create_info.arrayLayers = 1;
 
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0078e);
-    image_create_info.samples = VK_SAMPLE_COUNT_2_BIT;
-    // Expect INVALID_FORMAT_LIMITS_VIOLATION
-    vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg);
-    m_errorMonitor->VerifyFound();
-    image_create_info.samples = VK_SAMPLE_COUNT_1_BIT;
+    image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL;
+    vkGetPhysicalDeviceImageFormatProperties(gpu(), image_create_info.format, image_create_info.imageType, image_create_info.tiling,
+                                             image_create_info.usage, image_create_info.flags, &imgFmtProps);
+    if (0 == (imgFmtProps.sampleCounts & VK_SAMPLE_COUNT_64_BIT)) {
+        m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0078e);
+        image_create_info.samples = VK_SAMPLE_COUNT_64_BIT;
+        // Expect INVALID_FORMAT_LIMITS_VIOLATION
+        vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg);
+        m_errorMonitor->VerifyFound();
+        image_create_info.tiling = VK_IMAGE_TILING_LINEAR;
+        image_create_info.samples = VK_SAMPLE_COUNT_1_BIT;
+    }
 
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
-                                         "pCreateInfo->initialLayout, must be "
-                                         "VK_IMAGE_LAYOUT_UNDEFINED or "
-                                         "VK_IMAGE_LAYOUT_PREINITIALIZED");
-    image_create_info.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
-    // Expect INVALID_LAYOUT
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0b801);
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007c2);
+    image_create_info.initialLayout = VK_IMAGE_LAYOUT_MAX_ENUM; // Not a legal layout value
     vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg);
     m_errorMonitor->VerifyFound();
     image_create_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
@@ -22760,7 +22761,7 @@ TEST_F(VkPositiveLayerTest, BindSparse) {
     image_create_info.arrayLayers = 1;
     image_create_info.samples = VK_SAMPLE_COUNT_1_BIT;
     image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL;
-    image_create_info.usage = VK_IMAGE_USAGE_STORAGE_BIT;
+    image_create_info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
     image_create_info.flags = VK_IMAGE_CREATE_SPARSE_BINDING_BIT;
     VkResult err = vkCreateImage(m_device->device(), &image_create_info, NULL, &image);
     ASSERT_VK_SUCCESS(err);