layers: Make d/s CmdClearAttachments without d/s attachment warning
authorChris Forbes <chrisforbes@google.com>
Thu, 8 Sep 2016 03:35:36 +0000 (15:35 +1200)
committerChris Forbes <chrisforbes@google.com>
Fri, 9 Sep 2016 02:55:32 +0000 (14:55 +1200)
This is pointless, but well-defined. Rework warning message to not
reference the VkClearAttachment::colorAttachment, as it's only
meaningful for color clears.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
layers/core_validation.cpp

index a6da35e..aa6a908 100644 (file)
@@ -8122,13 +8122,9 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui
                      VK_ATTACHMENT_UNUSED)) { // Says no DS will be used in active subpass
 
                     skip_call |= log_msg(
-                        dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+                        dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
                         (uint64_t)commandBuffer, __LINE__, DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "DS",
-                        "vkCmdClearAttachments() attachment index %d does not match depthStencilAttachment.attachment (%d) found "
-                        "in active subpass %d",
-                        attachment->colorAttachment,
-                        (pSD->pDepthStencilAttachment) ? pSD->pDepthStencilAttachment->attachment : VK_ATTACHMENT_UNUSED,
-                        pCB->activeSubpass);
+                        "vkCmdClearAttachments() depth/stencil clear with no depth/stencil attachment in subpass; ignored");
                 }
             }
         }