Skip to content

Commit f3f5c70

Browse files
committed
rsx/zcull: Use partial MM flush for report sync
1 parent 344ea82 commit f3f5c70

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

rpcs3/Emu/RSX/RSXZCULL.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ namespace rsx
156156

157157
if (m_pending_writes.empty())
158158
{
159+
// Immediate write, flush MM queue
160+
rsx::mm_flush();
161+
159162
// No need to queue this if there is no pending request in the pipeline anyway
160163
write(sink, ptimer->timestamp(), type, m_statistics_map[m_statistics_tag_id].result);
161164
return;
@@ -174,6 +177,7 @@ namespace rsx
174177
It->counter_tag = m_statistics_tag_id;
175178
It->sink = sink;
176179
It->type = type;
180+
It->sync_tag = rsx::get_shared_tag();
177181

178182
if (forwarder != &(*It))
179183
{
@@ -363,16 +367,16 @@ namespace rsx
363367
break;
364368
}
365369

366-
// Reports are strongly ordered.
367-
rsx::mm_flush();
368-
369370
rsx::reservation_lock<true> lock(sink, 16);
370371
auto report = vm::get_super_ptr<atomic_t<CellGcmReportData>>(sink);
371372
report->store({timestamp, value, 0});
372373
}
373374

374375
void ZCULL_control::write(queued_report_write* writer, u64 timestamp, u32 value)
375376
{
377+
// Reports are strongly ordered.
378+
rsx::mm_flush_partial(writer->sync_tag);
379+
376380
write(writer->sink, timestamp, writer->type, value);
377381
on_report_completed(writer->sink);
378382

rpcs3/Emu/RSX/RSXZCULL.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ namespace rsx
4646
{
4747
u32 type = CELL_GCM_ZPASS_PIXEL_CNT;
4848
u32 counter_tag;
49+
u64 sync_tag;
4950
occlusion_query_info* query;
5051
queued_report_write* forwarder;
5152

0 commit comments

Comments
 (0)