diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-26 21:19:15 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-27 03:55:38 +0100 |
commit | 3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef (patch) | |
tree | 0e13cc5e2595d7019f8e9e80fe0279dc6a2b1d4c /src/video_core/renderer_vulkan | |
parent | core: Prepare various classes for memory read/write migration (diff) | |
download | yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.gz yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.bz2 yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.lz yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.xz yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.zst yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 959638747..46da81aaa 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -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; } |