1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 16:29:16 +01:00

[dxvk] Fix tracking of graphics pipeline side effects inside a render pass

Previously, we wouldn't track the first draw correctly in all cases because
the side effect flag would get reset when ending a previous render pass.
This commit is contained in:
Philip Rebohle 2025-03-07 12:03:25 +01:00
parent 33c997c2f3
commit f719d60706

View File

@ -6856,7 +6856,9 @@ namespace dxvk {
this->spillRenderPass(true);
}
if (m_flags.test(DxvkContextFlag::GpRenderPassSideEffects)) {
if (m_flags.test(DxvkContextFlag::GpRenderPassSideEffects)
|| m_state.gp.flags.any(DxvkGraphicsPipelineFlag::HasStorageDescriptors,
DxvkGraphicsPipelineFlag::HasTransformFeedback)) {
// If either the current pipeline has side effects or if there are pending
// writes from previous draws, check for hazards. This also tracks any
// resources written for the first time, but does not emit any barriers
@ -6864,6 +6866,9 @@ namespace dxvk {
// implicitly dirties all state for which we need to track resource access.
if (this->checkGraphicsHazards<Indexed, Indirect>())
this->spillRenderPass(true);
// The render pass flag gets reset when the render pass ends, so set it late
m_flags.set(DxvkContextFlag::GpRenderPassSideEffects);
}
// Start the render pass. This must happen before any render state