aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 6fec80d1..d9793683 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -10700,17 +10700,25 @@ CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *p
}
}
if (clear_op_size > pRenderPassBegin->clearValueCount) {
- skip_call |=
- log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT,
- reinterpret_cast<uint64_t &>(renderPass), __LINE__, VALIDATION_ERROR_00442, "DS",
- "In vkCmdBeginRenderPass() the VkRenderPassBeginInfo struct has a clearValueCount of %u but there must "
- "be at least %u "
- "entries in pClearValues array to account for the highest index attachment in renderPass 0x%" PRIx64
- " that uses VK_ATTACHMENT_LOAD_OP_CLEAR is %u. Note that the pClearValues array "
- "is indexed by attachment number so even if some pClearValues entries between 0 and %u correspond to "
- "attachments that aren't cleared they will be ignored. %s",
- pRenderPassBegin->clearValueCount, clear_op_size, reinterpret_cast<uint64_t &>(renderPass),
- clear_op_size, clear_op_size - 1, validation_error_map[VALIDATION_ERROR_00442]);
+ skip_call |= log_msg(
+ dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT,
+ reinterpret_cast<uint64_t &>(renderPass), __LINE__, VALIDATION_ERROR_00442,
+ "DS", "In vkCmdBeginRenderPass() the VkRenderPassBeginInfo struct has a clearValueCount of %u but there must "
+ "be at least %u entries in pClearValues array to account for the highest index attachment in renderPass "
+ "0x%" PRIx64 " that uses VK_ATTACHMENT_LOAD_OP_CLEAR is %u. Note that the pClearValues array "
+ "is indexed by attachment number so even if some pClearValues entries between 0 and %u correspond to "
+ "attachments that aren't cleared they will be ignored. %s",
+ pRenderPassBegin->clearValueCount, clear_op_size, reinterpret_cast<uint64_t &>(renderPass), clear_op_size,
+ clear_op_size - 1, validation_error_map[VALIDATION_ERROR_00442]);
+ }
+ if (clear_op_size < pRenderPassBegin->clearValueCount) {
+ skip_call |= log_msg(
+ dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT,
+ reinterpret_cast<uint64_t &>(renderPass), __LINE__, DRAWSTATE_RENDERPASS_TOO_MANY_CLEAR_VALUES, "DS",
+ "In vkCmdBeginRenderPass() the VkRenderPassBeginInfo struct has a clearValueCount of %u but only first %u "
+ "entries in pClearValues array are used. The highest index attachment in renderPass 0x%" PRIx64
+ " that uses VK_ATTACHMENT_LOAD_OP_CLEAR is %u - other pClearValues are ignored.",
+ pRenderPassBegin->clearValueCount, clear_op_size, reinterpret_cast<uint64_t &>(renderPass), clear_op_size);
}
skip_call |= VerifyRenderAreaBounds(dev_data, pRenderPassBegin);
skip_call |= VerifyFramebufferAndRenderPassLayouts(dev_data, cb_node, pRenderPassBegin);