summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-11-25 00:24:07 +0100
committerGitHub <noreply@github.com>2022-11-25 00:24:07 +0100
commit9d081a872903915a7a75b2634e310ea62d7b5dba (patch)
treee0e4808844a61b8b67f77ecbf0692c88a8c2673a /src/video_core/buffer_cache
parentMerge pull request #9299 from lioncash/cast (diff)
parentGPU: Fix buffer cache issue, engine upload not inlining memory in multiline and pessismistic invalidation. (diff)
downloadyuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.tar
yuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.tar.gz
yuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.tar.bz2
yuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.tar.lz
yuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.tar.xz
yuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.tar.zst
yuzu-9d081a872903915a7a75b2634e310ea62d7b5dba.zip
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 599551013..5d3a8293b 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -1742,12 +1742,12 @@ bool BufferCache<P>::InlineMemory(VAddr dest_address, size_t copy_size,
SynchronizeBuffer(buffer, dest_address, static_cast<u32>(copy_size));
if constexpr (USE_MEMORY_MAPS) {
+ auto upload_staging = runtime.UploadStagingBuffer(copy_size);
std::array copies{BufferCopy{
- .src_offset = 0,
+ .src_offset = upload_staging.offset,
.dst_offset = buffer.Offset(dest_address),
.size = copy_size,
}};
- auto upload_staging = runtime.UploadStagingBuffer(copy_size);
u8* const src_pointer = upload_staging.mapped_span.data();
std::memcpy(src_pointer, inlined_buffer.data(), copy_size);
runtime.CopyBuffer(buffer, upload_staging.buffer, copies);