Skip to content

Commit

Permalink
layers: Fix dynamic rendering color format count
Browse files Browse the repository at this point in the history
  • Loading branch information
ncesario-lunarg committed Apr 8, 2022
1 parent 4153f0c commit 0c1e29e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layers/core_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,9 @@ bool CoreChecks::ValidatePipelineDrawtimeState(const LAST_BOUND_STATE &state, co
if (pCB->activeRenderPass->dynamic_rendering_begin_rendering_info.pColorAttachments[i].imageView != VK_NULL_HANDLE) {
auto view_state = Get<IMAGE_VIEW_STATE>(
pCB->activeRenderPass->dynamic_rendering_begin_rendering_info.pColorAttachments[i].imageView);
if (view_state->create_info.format !=
rp_state->dynamic_rendering_pipeline_create_info.pColorAttachmentFormats[i]) {
if ((rp_state->dynamic_rendering_pipeline_create_info.colorAttachmentCount > i) &&
view_state->create_info.format !=
rp_state->dynamic_rendering_pipeline_create_info.pColorAttachmentFormats[i]) {
skip |=
LogError(pCB->commandBuffer(), vuid.dynamic_rendering_color_formats,
"%s: Color attachment ([%" PRIu32
Expand Down

0 comments on commit 0c1e29e

Please sign in to comment.