Skip to content

Commit

Permalink
Set Vulkan currentPass renderArea if dynamic rendering is active
Browse files Browse the repository at this point in the history
This is in addition to setting the currentPass renderArea if there is an active render pass
  • Loading branch information
Zorro666 committed Oct 25, 2023
1 parent 3ca187d commit 3856017
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions renderdoc/driver/vulkan/vk_replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1866,11 +1866,6 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
const VkOffset2D &o = state.fragmentDensityMapOffsets[i];
ret.currentPass.renderpass.fragmentDensityOffsets[i] = Offset(o.x, o.y);
}

ret.currentPass.renderArea.x = state.renderArea.offset.x;
ret.currentPass.renderArea.y = state.renderArea.offset.y;
ret.currentPass.renderArea.width = state.renderArea.extent.width;
ret.currentPass.renderArea.height = state.renderArea.extent.height;
}
else
{
Expand All @@ -1891,6 +1886,14 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
ret.currentPass.framebuffer.attachments.clear();
}

if(state.GetRenderPass() != ResourceId() || (state.dynamicRendering.active))
{
ret.currentPass.renderArea.x = state.renderArea.offset.x;
ret.currentPass.renderArea.y = state.renderArea.offset.y;
ret.currentPass.renderArea.width = state.renderArea.extent.width;
ret.currentPass.renderArea.height = state.renderArea.extent.height;
}

ret.currentPass.colorFeedbackAllowed = (state.feedbackAspects & VK_IMAGE_ASPECT_COLOR_BIT) != 0;
ret.currentPass.depthFeedbackAllowed = (state.feedbackAspects & VK_IMAGE_ASPECT_DEPTH_BIT) != 0;
ret.currentPass.stencilFeedbackAllowed = (state.feedbackAspects & VK_IMAGE_ASPECT_STENCIL_BIT) != 0;
Expand Down

0 comments on commit 3856017

Please sign in to comment.