rsx: Fix execution barrier insertion

- In case of element re-arrangement, the barrier should obey the current insertion pointer
This commit is contained in:
kd-11 2020-09-03 20:56:10 +03:00 committed by kd-11
parent 21f06e1074
commit 3c43d8fe05

View File

@ -148,20 +148,18 @@ namespace rsx
if (type == primitive_restart_barrier)
{
// Rasterization flow barrier
const auto& last = draw_command_ranges.back();
const auto& last = draw_command_ranges[current_range_index];
const auto address = last.first + last.count;
const auto command_index = draw_command_ranges.size() - 1;
_do_barrier_insert({ command_index, 0, address, arg, 0, type });
_do_barrier_insert({ current_range_index, 0, address, arg, 0, type });
}
else
{
// Execution dependency barrier
append_draw_command({});
const auto command_index = draw_command_ranges.size() - 1;
_do_barrier_insert({ command_index, get_system_time(), ~0u, arg, 0, type });
last_execution_barrier_index = command_index;
_do_barrier_insert({ current_range_index, get_system_time(), ~0u, arg, 0, type });
last_execution_barrier_index = current_range_index;
}
}