Skip to content

Commit 86b2773

Browse files
committed
rsx: Clean up after vertex cache changes
1 parent 11a9011 commit 86b2773

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

rpcs3/Emu/RSX/rsx_cache.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ namespace rsx
517517
vertex_ranges.erase(key);
518518
return nullptr;
519519
}
520+
520521
return std::addressof(found->second);
521522
}
522523

@@ -526,15 +527,12 @@ namespace rsx
526527
v.data_length = data_length;
527528
v.local_address = local_addr;
528529
v.offset_in_heap = offset_in_heap;
529-
v.fingerprint = 0;
530530

531-
if (data_length >= 8)
531+
if (auto sudo_ptr = vm::get_super_ptr<char>(local_addr); data_length >= 8)
532532
{
533-
// Uses get_super_ptr to access vm memory safely
534-
// and bless to avoid endian conversion and circumvent compiler strict aliasing rules.
535-
auto sudo_ptr = vm::get_super_ptr<char>(local_addr);
536533
v.fingerprint = *utils::bless<u64>(sudo_ptr);
537534
}
535+
538536
const auto key = hash(local_addr, data_length);
539537
vertex_ranges[key] = v;
540538
}

0 commit comments

Comments
 (0)