Skip to content

Commit 25fcaa2

Browse files
committed
layers: Improve err msg for dynamic rendering
1 parent d9f007c commit 25fcaa2

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

layers/core_checks/cc_render_pass.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4099,12 +4099,24 @@ bool CoreChecks::ValidateBeginRenderingDepthAndStencilAttachment(VkCommandBuffer
40994099
// Flags validation error if the associated call is made inside a render pass. The apiName routine should ONLY be called outside a
41004100
// render pass.
41014101
bool CoreChecks::InsideRenderPass(const vvl::CommandBuffer &cb_state, const Location &loc, const char *vuid) const {
4102-
bool inside = false;
4102+
bool skip = false;
41034103
if (cb_state.active_render_pass) {
4104-
inside = LogError(vuid, cb_state.Handle(), loc, "It is invalid to issue this call inside an active %s.",
4105-
FormatHandle(cb_state.active_render_pass->Handle()).c_str());
4104+
if (cb_state.active_render_pass->use_dynamic_rendering) {
4105+
skip =
4106+
LogError(vuid, cb_state.Handle(), loc,
4107+
"It is invalid to issue this call inside an active render pass instance begun with vkCmdBeginRendering.");
4108+
} else if (cb_state.active_render_pass->use_dynamic_rendering_inherited) {
4109+
skip |=
4110+
LogError(vuid, cb_state.Handle(), loc,
4111+
"It is invalid to issue this call inside this secondary command buffer as it was begun with "
4112+
"VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT and viewed as being inside a render pass instance begun "
4113+
"with vkCmdBeginRendering.");
4114+
} else {
4115+
skip = LogError(vuid, cb_state.Handle(), loc, "It is invalid to issue this call inside an active %s.",
4116+
FormatHandle(cb_state.active_render_pass->Handle()).c_str());
4117+
}
41064118
}
4107-
return inside;
4119+
return skip;
41084120
}
41094121

41104122
// Flags validation error if the associated call is made outside a render pass. The apiName

0 commit comments

Comments
 (0)