mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +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:
parent
8a186bb97e
commit
5b6e1420f3
@ -188,6 +188,7 @@ void GLGSRender::end()
|
|||||||
if (skip_frame || !framebuffer_status_valid ||
|
if (skip_frame || !framebuffer_status_valid ||
|
||||||
(conditional_render_enabled && conditional_render_test_failed))
|
(conditional_render_enabled && conditional_render_test_failed))
|
||||||
{
|
{
|
||||||
|
execute_nop_draw();
|
||||||
rsx::thread::end();
|
rsx::thread::end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -386,6 +387,7 @@ void GLGSRender::end()
|
|||||||
{
|
{
|
||||||
// Program is not ready, skip drawing this
|
// Program is not ready, skip drawing this
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
|
execute_nop_draw();
|
||||||
rsx::thread::end();
|
rsx::thread::end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -482,6 +484,14 @@ void GLGSRender::end()
|
|||||||
m_vertex_layout = analyse_inputs_interleaved();
|
m_vertex_layout = analyse_inputs_interleaved();
|
||||||
if (!m_vertex_layout.validate())
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -623,8 +633,6 @@ void GLGSRender::end()
|
|||||||
}
|
}
|
||||||
} while (rsx::method_registers.current_draw_clause.next());
|
} while (rsx::method_registers.current_draw_clause.next());
|
||||||
|
|
||||||
rsx::method_registers.current_draw_clause.post_execute_cleanup();
|
|
||||||
|
|
||||||
m_rtts.on_write();
|
m_rtts.on_write();
|
||||||
|
|
||||||
m_attrib_ring_buffer->notify();
|
m_attrib_ring_buffer->notify();
|
||||||
|
@ -469,6 +469,8 @@ namespace rsx
|
|||||||
in_begin_end = false;
|
in_begin_end = false;
|
||||||
m_draw_calls++;
|
m_draw_calls++;
|
||||||
|
|
||||||
|
method_registers.current_draw_clause.post_execute_cleanup();
|
||||||
|
|
||||||
m_graphics_state |= rsx::pipeline_state::framebuffer_reads_dirty;
|
m_graphics_state |= rsx::pipeline_state::framebuffer_reads_dirty;
|
||||||
ROP_sync_timestamp = get_system_time();
|
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()()
|
void thread::operator()()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -544,6 +544,7 @@ namespace rsx
|
|||||||
public:
|
public:
|
||||||
virtual void begin();
|
virtual void begin();
|
||||||
virtual void end();
|
virtual void end();
|
||||||
|
virtual void execute_nop_draw();
|
||||||
|
|
||||||
virtual void on_init_rsx() = 0;
|
virtual void on_init_rsx() = 0;
|
||||||
virtual void on_init_thread() = 0;
|
virtual void on_init_thread() = 0;
|
||||||
|
@ -1179,6 +1179,13 @@ void VKGSRender::emit_geometry(u32 sub_index)
|
|||||||
if (!m_vertex_layout.validate())
|
if (!m_vertex_layout.validate())
|
||||||
{
|
{
|
||||||
// No vertex inputs enabled
|
// No vertex inputs enabled
|
||||||
|
// Execute remainining pipeline barriers with NOP draw
|
||||||
|
do
|
||||||
|
{
|
||||||
|
draw_call.execute_pipeline_dependencies();
|
||||||
|
}
|
||||||
|
while (draw_call.next());
|
||||||
|
|
||||||
draw_call.end();
|
draw_call.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1316,6 +1323,7 @@ void VKGSRender::end()
|
|||||||
if (skip_frame || !framebuffer_status_valid || renderer_unavailable ||
|
if (skip_frame || !framebuffer_status_valid || renderer_unavailable ||
|
||||||
(conditional_render_enabled && conditional_render_test_failed))
|
(conditional_render_enabled && conditional_render_test_failed))
|
||||||
{
|
{
|
||||||
|
execute_nop_draw();
|
||||||
rsx::thread::end();
|
rsx::thread::end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1556,6 +1564,7 @@ void VKGSRender::end()
|
|||||||
{
|
{
|
||||||
// Program is not ready, skip drawing this
|
// Program is not ready, skip drawing this
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
|
execute_nop_draw();
|
||||||
rsx::thread::end();
|
rsx::thread::end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1682,8 +1691,6 @@ void VKGSRender::end()
|
|||||||
}
|
}
|
||||||
while (rsx::method_registers.current_draw_clause.next());
|
while (rsx::method_registers.current_draw_clause.next());
|
||||||
|
|
||||||
rsx::method_registers.current_draw_clause.post_execute_cleanup();
|
|
||||||
|
|
||||||
close_render_pass();
|
close_render_pass();
|
||||||
vk::leave_uninterruptible();
|
vk::leave_uninterruptible();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user