mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 17:38:02 -05:00
core/memory: Migrate over GetPointer()
With all of the interfaces ready for migration, it's trivial to migrate over GetPointer().
This commit is contained in:
@ -50,9 +50,9 @@ u64 VKBufferCache::UploadMemory(GPUVAddr gpu_addr, std::size_t size, u64 alignme
|
||||
// TODO: Figure out which size is the best for given games.
|
||||
cache &= size >= 2048;
|
||||
|
||||
const auto& host_ptr{Memory::GetPointer(*cpu_addr)};
|
||||
u8* const host_ptr{cpu_memory.GetPointer(*cpu_addr)};
|
||||
if (cache) {
|
||||
auto entry = TryGet(host_ptr);
|
||||
const auto entry = TryGet(host_ptr);
|
||||
if (entry) {
|
||||
if (entry->GetSize() >= size && entry->GetAlignment() == alignment) {
|
||||
return entry->GetOffset();
|
||||
@ -64,7 +64,7 @@ u64 VKBufferCache::UploadMemory(GPUVAddr gpu_addr, std::size_t size, u64 alignme
|
||||
AlignBuffer(alignment);
|
||||
const u64 uploaded_offset = buffer_offset;
|
||||
|
||||
if (!host_ptr) {
|
||||
if (host_ptr == nullptr) {
|
||||
return uploaded_offset;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user