summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-03-14 16:16:51 -0600
committerTobin Ehlis <tobine@google.com>2017-03-22 10:19:45 -0600
commita28aa974649f7b79457f85bdb7c3a26955753c47 (patch)
treebac5008ab1d865e4319cde2cb55827cad56263e0 /tests
parentfab4fd84d0d187bc73b5bc6709d8ed6370bb7cc3 (diff)
tests:Update InvalidImageLayout test
Modify the expected error strings based on refactor.
Diffstat (limited to 'tests')
-rw-r--r--tests/layer_validation_tests.cpp46
1 files changed, 25 insertions, 21 deletions
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 690a5d3d..3b196653 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -11819,49 +11819,53 @@ TEST_F(VkLayerTest, InvalidImageLayout) {
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, &copy_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, &copy_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, &copy_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, &copy_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, &copy_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, &copy_region);
m_errorMonitor->VerifyFound();