tests:Update InvalidImageLayout test
Modify the expected error strings based on refactor.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 690a5d3..3b19665 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -11819,49 +11819,53 @@
copy_region.extent.height = 1;
copy_region.extent.depth = 1;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
- "Layout for input image should be TRANSFER_SRC_OPTIMAL instead of GENERAL.");
- m_errorMonitor->SetUnexpectedError("Layout for output image should be TRANSFER_DST_OPTIMAL instead of GENERAL.");
+ m_errorMonitor->SetDesiredFailureMsg(
+ VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
+ "For optimal performance image layout should be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL instead of GENERAL.");
+ m_errorMonitor->SetUnexpectedError(
+ "For optimal performance image layout should be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL instead of GENERAL.");
+
m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region);
m_errorMonitor->VerifyFound();
// Now cause error due to src image layout changing
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "Cannot copy from an image whose source layout is "
- "VK_IMAGE_LAYOUT_UNDEFINED and doesn't match the current "
- "layout VK_IMAGE_LAYOUT_GENERAL.");
+ "Cannot use an image with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match "
+ "the actual current layout VK_IMAGE_LAYOUT_GENERAL.");
m_errorMonitor->SetUnexpectedError(
"srcImageLayout must be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL");
m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_UNDEFINED, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region);
m_errorMonitor->VerifyFound();
// Final src error is due to bad layout type
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "Layout for input image is VK_IMAGE_LAYOUT_UNDEFINED but can only be TRANSFER_SRC_OPTIMAL or GENERAL.");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ "Layout for image is VK_IMAGE_LAYOUT_UNDEFINED but can only be "
+ "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL.");
m_errorMonitor->SetUnexpectedError(
- "Cannot copy from an image whose source layout is VK_IMAGE_LAYOUT_UNDEFINED and doesn't match the current layout "
+ "Cannot use an image with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match the actual current layout "
"VK_IMAGE_LAYOUT_GENERAL.");
m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_UNDEFINED, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region);
m_errorMonitor->VerifyFound();
// Now verify same checks for dst
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
- "Layout for output image should be TRANSFER_DST_OPTIMAL instead of GENERAL.");
- m_errorMonitor->SetUnexpectedError("Layout for input image should be TRANSFER_SRC_OPTIMAL instead of GENERAL.");
+ m_errorMonitor->SetDesiredFailureMsg(
+ VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
+ "For optimal performance image layout should be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL instead of GENERAL.");
+ m_errorMonitor->SetUnexpectedError(
+ "For optimal performance image layout should be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL instead of GENERAL.");
m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region);
m_errorMonitor->VerifyFound();
// Now cause error due to src image layout changing
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "Cannot copy from an image whose dest layout is "
- "VK_IMAGE_LAYOUT_UNDEFINED and doesn't match the current "
- "layout VK_IMAGE_LAYOUT_GENERAL.");
+ "Cannot use an image with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match "
+ "the actual current layout VK_IMAGE_LAYOUT_GENERAL.");
m_errorMonitor->SetUnexpectedError(
- "dstImageLayout must be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL");
+ "Layout for image is VK_IMAGE_LAYOUT_UNDEFINED but can only be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or "
+ "VK_IMAGE_LAYOUT_GENERAL.");
m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_UNDEFINED, 1, ©_region);
m_errorMonitor->VerifyFound();
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "Layout for output image is VK_IMAGE_LAYOUT_UNDEFINED but can only be TRANSFER_DST_OPTIMAL or GENERAL.");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ "Layout for image is VK_IMAGE_LAYOUT_UNDEFINED but can only be "
+ "VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL.");
m_errorMonitor->SetUnexpectedError(
- "Cannot copy from an image whose dest layout is VK_IMAGE_LAYOUT_UNDEFINED and doesn't match the current layout "
+ "Cannot use an image with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match the actual current layout "
"VK_IMAGE_LAYOUT_GENERAL.");
m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_UNDEFINED, 1, ©_region);
m_errorMonitor->VerifyFound();