1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

rsx: Pipeline barriers fixed up

- Ensure barriers are invoked even if no draw occurs!
-- Ensures that deferred commands are executed eventually
This commit is contained in:
kd-11 2018-11-21 14:38:56 +03:00 committed by kd-11
parent 8a186bb97e
commit 5b6e1420f3
4 changed files with 32 additions and 4 deletions

View File

@ -188,6 +188,7 @@ void GLGSRender::end()
if (skip_frame || !framebuffer_status_valid ||
(conditional_render_enabled && conditional_render_test_failed))
{
execute_nop_draw();
rsx::thread::end();
return;
}
@ -386,6 +387,7 @@ void GLGSRender::end()
{
// Program is not ready, skip drawing this
std::this_thread::yield();
execute_nop_draw();
rsx::thread::end();
return;
}
@ -482,6 +484,14 @@ void GLGSRender::end()
m_vertex_layout = analyse_inputs_interleaved();
if (!m_vertex_layout.validate())
{
// Execute remainining pipeline barriers with NOP draw
do
{
rsx::method_registers.current_draw_clause.execute_pipeline_dependencies();
}
while (rsx::method_registers.current_draw_clause.next());
rsx::method_registers.current_draw_clause.end();
break;
}
}
@ -623,8 +633,6 @@ void GLGSRender::end()
}
} while (rsx::method_registers.current_draw_clause.next());
rsx::method_registers.current_draw_clause.post_execute_cleanup();
m_rtts.on_write();
m_attrib_ring_buffer->notify();

View File

@ -469,6 +469,8 @@ namespace rsx
in_begin_end = false;
m_draw_calls++;
method_registers.current_draw_clause.post_execute_cleanup();
m_graphics_state |= rsx::pipeline_state::framebuffer_reads_dirty;
ROP_sync_timestamp = get_system_time();
@ -492,6 +494,16 @@ namespace rsx
}
}
void thread::execute_nop_draw()
{
method_registers.current_draw_clause.begin();
do
{
method_registers.current_draw_clause.execute_pipeline_dependencies();
}
while (method_registers.current_draw_clause.next());
}
void thread::operator()()
{
try

View File

@ -544,6 +544,7 @@ namespace rsx
public:
virtual void begin();
virtual void end();
virtual void execute_nop_draw();
virtual void on_init_rsx() = 0;
virtual void on_init_thread() = 0;

View File

@ -1179,6 +1179,13 @@ void VKGSRender::emit_geometry(u32 sub_index)
if (!m_vertex_layout.validate())
{
// No vertex inputs enabled
// Execute remainining pipeline barriers with NOP draw
do
{
draw_call.execute_pipeline_dependencies();
}
while (draw_call.next());
draw_call.end();
return;
}
@ -1316,6 +1323,7 @@ void VKGSRender::end()
if (skip_frame || !framebuffer_status_valid || renderer_unavailable ||
(conditional_render_enabled && conditional_render_test_failed))
{
execute_nop_draw();
rsx::thread::end();
return;
}
@ -1556,6 +1564,7 @@ void VKGSRender::end()
{
// Program is not ready, skip drawing this
std::this_thread::yield();
execute_nop_draw();
rsx::thread::end();
return;
}
@ -1682,8 +1691,6 @@ void VKGSRender::end()
}
while (rsx::method_registers.current_draw_clause.next());
rsx::method_registers.current_draw_clause.post_execute_cleanup();
close_render_pass();
vk::leave_uninterruptible();