aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-09-08 15:30:59 +1200
committerChris Forbes <chrisforbes@google.com>2016-09-09 14:55:32 +1200
commit48c9304283e3fa12f79e304410ffe1650f39c375 (patch)
tree3ec6cedb911da6ef7e6f7c2a1de29d9f425d4e5f /layers/core_validation.cpp
parentd777c6edeab70b31ca0359cdf76adbaa31af3866 (diff)
downloadusermoji-48c9304283e3fa12f79e304410ffe1650f39c375.tar.xz
layers: Add VK_ATTACHMENT_UNUSED warning case for CmdClearAttachments
This is a pointless clear, but well-defined. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index b25eea89..a6da35ee 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -8109,6 +8109,13 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui
"vkCmdClearAttachments() color attachment index %d out of range for active subpass %d; ignored",
attachment->colorAttachment, pCB->activeSubpass);
}
+ else if (pSD->pColorAttachments[attachment->colorAttachment].attachment == VK_ATTACHMENT_UNUSED) {
+ skip_call |= log_msg(
+ 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() color attachment index %d is VK_ATTACHMENT_UNUSED; ignored",
+ attachment->colorAttachment);
+ }
} else if (attachment->aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
if (!pSD->pDepthStencilAttachment || // Says no DS will be used in active subpass
(pSD->pDepthStencilAttachment->attachment ==