Skip to content

Commit c686afd

Browse files
committed
rsx: Loosen the access ordering guarantees a bit
1 parent a2ffb37 commit c686afd

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

rpcs3/Emu/RSX/Common/texture_cache.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,9 +3740,12 @@ namespace rsx
37403740
}
37413741
}
37423742

3743-
// MM flush before commit below
3744-
const auto mm_flush_range = utils::address_range64::start_length(reinterpret_cast<u64>(dst.pixels), dst_payload_length);
3745-
rsx::mm_flush({ mm_flush_range });
3743+
// MM flush before commit below. For performance reasons, only flush when writing to CELL memory.
3744+
if (rsx::classify_location(dst.rsx_address) == CELL_GCM_LOCATION_MAIN)
3745+
{
3746+
const auto mm_flush_range = utils::address_range64::start_length(reinterpret_cast<u64>(dst.pixels), dst_payload_length);
3747+
rsx::mm_flush({ mm_flush_range });
3748+
}
37463749

37473750
// Commit any pending writes before we do the transfer. Writes will be done on super_ptr so locking beforehand is ok.
37483751
m_rtts.prepare_transfer_target(cmd, dst_subres.surface, rsx::surface_access::transfer_write, std::forward<Args>(extras)...);

0 commit comments

Comments
 (0)