diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-16 04:10:32 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-16 08:13:27 +0100 |
commit | fd62bdf37745bbddd3fe2824d312c9da7c49a3ca (patch) | |
tree | 796fbc3e4e283c7933fcfd7dfd495132da95b351 /src/video_core/texture_cache/surface_base.cpp | |
parent | Merge pull request #3401 from FernandoS27/synchronization (diff) | |
download | yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.gz yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.bz2 yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.lz yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.xz yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.zst yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.zip |
Diffstat (limited to 'src/video_core/texture_cache/surface_base.cpp')
-rw-r--r-- | src/video_core/texture_cache/surface_base.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/surface_base.cpp b/src/video_core/texture_cache/surface_base.cpp index 84469b7ba..002df414f 100644 --- a/src/video_core/texture_cache/surface_base.cpp +++ b/src/video_core/texture_cache/surface_base.cpp @@ -277,6 +277,10 @@ void SurfaceBaseImpl::FlushBuffer(Tegra::MemoryManager& memory_manager, SwizzleFunc(MortonSwizzleMode::LinearToMorton, host_ptr, params, staging_buffer.data() + host_offset, level); } + } else if (params.IsBuffer()) { + // Buffers don't have pitch or any fancy layout property. We can just memcpy them to guest + // memory. + std::memcpy(host_ptr, staging_buffer.data(), guest_memory_size); } else { ASSERT(params.target == SurfaceTarget::Texture2D); ASSERT(params.num_levels == 1); |