Skip to content

Commit 7c27b7b

Browse files
committed
rsx: Do not consume draw call barrier iterator when executing deps
1 parent f3f1a2b commit 7c27b7b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

rpcs3/Emu/RSX/NV47/FW/draw_call.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ namespace rsx
183183
u32 draw_clause::execute_pipeline_dependencies(context* ctx, instanced_draw_config_t* instance_config) const
184184
{
185185
u32 result = 0u;
186-
for (;
187-
current_barrier_it != draw_command_barriers.end() && current_barrier_it->draw_id == current_range_index;
188-
current_barrier_it++)
186+
for (auto it = current_barrier_it;
187+
it != draw_command_barriers.end() && it->draw_id == current_range_index;
188+
it++)
189189
{
190-
const auto& barrier = *current_barrier_it;
190+
const auto& barrier = *it;
191191
switch (barrier.type)
192192
{
193193
case primitive_restart_barrier:

rpcs3/Emu/RSX/NV47/FW/draw_call.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ namespace rsx
252252
return false;
253253
}
254254

255+
// Advance barrier iterator so it always points to the current draw
256+
for (;
257+
current_barrier_it != draw_command_barriers.end() &&
258+
current_barrier_it->draw_id < current_range_index;
259+
++current_barrier_it);
260+
255261
if (draw_command_ranges[current_range_index].count == 0)
256262
{
257263
// Dangling execution barrier

0 commit comments

Comments
 (0)