Set Vulkan currentPass renderArea if dynamic rendering is active

This is in addition to setting the currentPass renderArea if there is an active render pass
This commit is contained in:
Jake Turner
2023-10-25 15:47:25 +01:00
parent 3ca187d725
commit 3856017609
+8 -5
View File
@@ -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
{
@@ -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;