vk: Invalidate renderpass key in post-cyclic-z barrier
- Post-Z renderpass split is crucial due to loss of writes. The failure to invalidate the renderpass key was an oversight.
This commit is contained in:
@@ -143,6 +143,17 @@ VkRenderPass VKGSRender::get_render_pass()
|
|||||||
return m_cached_renderpass;
|
return m_cached_renderpass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VKGSRender::invalidate_render_pass()
|
||||||
|
{
|
||||||
|
// Regenerate renderpass key for the next draw call
|
||||||
|
if (const auto key = vk::get_renderpass_key(m_fbo_images, m_current_renderpass_key);
|
||||||
|
key != m_current_renderpass_key)
|
||||||
|
{
|
||||||
|
m_current_renderpass_key = key;
|
||||||
|
m_cached_renderpass = VK_NULL_HANDLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void VKGSRender::update_draw_state()
|
void VKGSRender::update_draw_state()
|
||||||
{
|
{
|
||||||
m_profiler.start();
|
m_profiler.start();
|
||||||
@@ -514,12 +525,7 @@ void VKGSRender::load_texture_env()
|
|||||||
if (check_for_cyclic_refs)
|
if (check_for_cyclic_refs)
|
||||||
{
|
{
|
||||||
// Regenerate renderpass key
|
// Regenerate renderpass key
|
||||||
if (const auto key = vk::get_renderpass_key(m_fbo_images, m_current_renderpass_key);
|
invalidate_render_pass();
|
||||||
key != m_current_renderpass_key)
|
|
||||||
{
|
|
||||||
m_current_renderpass_key = key;
|
|
||||||
m_cached_renderpass = VK_NULL_HANDLE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backend_config.supports_asynchronous_compute)
|
if (backend_config.supports_asynchronous_compute)
|
||||||
@@ -1069,6 +1075,9 @@ void VKGSRender::end()
|
|||||||
// Since we're ending the subpass, might as well restore DCC/HiZ for extra performance
|
// Since we're ending the subpass, might as well restore DCC/HiZ for extra performance
|
||||||
ds->change_layout(*m_current_command_buffer, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
|
ds->change_layout(*m_current_command_buffer, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
|
||||||
ds->reset_surface_counters();
|
ds->reset_surface_counters();
|
||||||
|
|
||||||
|
// Regenerate render pass key
|
||||||
|
invalidate_render_pass();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ private:
|
|||||||
void begin_render_pass();
|
void begin_render_pass();
|
||||||
void close_render_pass();
|
void close_render_pass();
|
||||||
VkRenderPass get_render_pass();
|
VkRenderPass get_render_pass();
|
||||||
|
void invalidate_render_pass();
|
||||||
|
|
||||||
void update_draw_state();
|
void update_draw_state();
|
||||||
void check_present_status();
|
void check_present_status();
|
||||||
|
|||||||
Reference in New Issue
Block a user