layers: CmdClearAttachments colorAttachment is index into subpass
We were previously treating this as being an index into the renderpass
attachment descriptions, but that's nonsense. It's also well-defined
what happens if an out-of-range index is provided, so downgrade to a
warning.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 579f8ed..ce584de 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -11756,9 +11756,8 @@
TEST_DESCRIPTION("Points to a wrong colorAttachment index in a VkClearAttachment "
"structure passed to vkCmdClearAttachments");
ASSERT_NO_FATAL_FAILURE(InitState());
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "vkCmdClearAttachments() attachment index 1 not found in attachment "
- "reference array of active subpass 0");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_WARNING_BIT_EXT,
+ "vkCmdClearAttachments() color attachment index 1 out of range for active subpass 0; ignored");
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailCmdClearAttachments);
m_errorMonitor->VerifyFound();