1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

rsx: Fix fifo draw barriers

This commit is contained in:
kd-11 2018-10-28 16:23:32 +03:00 committed by kd-11
parent 2d88e41583
commit 435afcb865
3 changed files with 19 additions and 5 deletions

View File

@ -603,7 +603,7 @@ namespace rsx
{
m_internal_get = m_ctrl->get;
read_ahead(m_fifo_info, m_queue, m_internal_get);
optimize(m_fifo_info, m_queue);
//optimize(m_fifo_info, m_queue);
m_ctrl->get = m_internal_get;
m_ctrl_tag++;
@ -854,6 +854,7 @@ namespace rsx
if (command.value)
{
last_begin = &command;
command.reg = FIFO_DRAW_BARRIER;
}
else
{

View File

@ -1248,6 +1248,14 @@ namespace rsx
{
void draw_barrier(thread* rsx, u32, u32)
{
if (rsx->in_begin_end)
{
if (!method_registers.current_draw_clause.is_disjoint_primitive)
{
// Enable primitive barrier request
method_registers.current_draw_clause.primitive_barrier_enable = true;
}
}
}
}
@ -2762,7 +2770,7 @@ namespace rsx
bind<GCM_FLIP_COMMAND, flip_command>();
// FIFO
bind<FIFO::FIFO_DRAW_BARRIER, fifo::draw_barrier>();
bind<(FIFO::FIFO_DRAW_BARRIER >> 2), fifo::draw_barrier>();
return true;
}();

View File

@ -115,8 +115,9 @@ namespace rsx
primitive_type primitive;
draw_command command;
bool is_immediate_draw;
bool is_disjoint_primitive;
bool is_immediate_draw; // Set if part of the draw is submitted via push registers
bool is_disjoint_primitive; // Set if primitive type does not rely on adjacency information
bool primitive_barrier_enable; // Set once to signal that a primitive restart barrier can be inserted
simple_array<u32> inline_vertex_array;
@ -158,6 +159,9 @@ namespace rsx
void append(u32 first, u32 count)
{
const bool barrier_enable_flag = primitive_barrier_enable;
primitive_barrier_enable = false;
if (!draw_command_ranges.empty())
{
auto& last = draw_command_ranges.back();
@ -172,7 +176,7 @@ namespace rsx
if (last.first + last.count == first)
{
if (!is_disjoint_primitive)
if (!is_disjoint_primitive && barrier_enable_flag)
{
// Insert barrier
insert_command_barrier(primitive_restart_barrier, 0);
@ -260,6 +264,7 @@ namespace rsx
command = draw_command::none;
primitive = type;
primitive_barrier_enable = false;
draw_command_ranges.clear();
draw_command_barriers.clear();