rsx: Clean up after vertex cache changes

This commit is contained in:
kd-11
2026-03-04 02:56:12 +03:00
committed by kd-11
parent 11a9011510
commit 86b2773c28
+3 -5
View File
@@ -517,6 +517,7 @@ namespace rsx
vertex_ranges.erase(key); vertex_ranges.erase(key);
return nullptr; return nullptr;
} }
return std::addressof(found->second); return std::addressof(found->second);
} }
@@ -526,15 +527,12 @@ namespace rsx
v.data_length = data_length; v.data_length = data_length;
v.local_address = local_addr; v.local_address = local_addr;
v.offset_in_heap = offset_in_heap; v.offset_in_heap = offset_in_heap;
v.fingerprint = 0;
if (data_length >= 8) if (auto sudo_ptr = vm::get_super_ptr<char>(local_addr); data_length >= 8)
{ {
// Uses get_super_ptr to access vm memory safely
// and bless to avoid endian conversion and circumvent compiler strict aliasing rules.
auto sudo_ptr = vm::get_super_ptr<char>(local_addr);
v.fingerprint = *utils::bless<u64>(sudo_ptr); v.fingerprint = *utils::bless<u64>(sudo_ptr);
} }
const auto key = hash(local_addr, data_length); const auto key = hash(local_addr, data_length);
vertex_ranges[key] = v; vertex_ranges[key] = v;
} }