diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-30 04:32:41 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-08 10:01:00 +0200 |
commit | c95c254f3eda75476ad221a4828033f4140a3470 (patch) | |
tree | b06f5db8c853d3b40d82439e4e739205146cf07a /src/video_core/texture_cache/surface_base.cpp | |
parent | Merge pull request #4034 from ReinUsesLisp/storage-texels (diff) | |
download | yuzu-c95c254f3eda75476ad221a4828033f4140a3470.tar yuzu-c95c254f3eda75476ad221a4828033f4140a3470.tar.gz yuzu-c95c254f3eda75476ad221a4828033f4140a3470.tar.bz2 yuzu-c95c254f3eda75476ad221a4828033f4140a3470.tar.lz yuzu-c95c254f3eda75476ad221a4828033f4140a3470.tar.xz yuzu-c95c254f3eda75476ad221a4828033f4140a3470.tar.zst yuzu-c95c254f3eda75476ad221a4828033f4140a3470.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/surface_base.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/surface_base.cpp b/src/video_core/texture_cache/surface_base.cpp index 715f39d0d..94d3a6ae5 100644 --- a/src/video_core/texture_cache/surface_base.cpp +++ b/src/video_core/texture_cache/surface_base.cpp @@ -248,12 +248,11 @@ void SurfaceBaseImpl::FlushBuffer(Tegra::MemoryManager& memory_manager, // Use an extra temporal buffer auto& tmp_buffer = staging_cache.GetBuffer(1); - // Special case for 3D Texture Segments - const bool must_read_current_data = - params.block_depth > 0 && params.target == VideoCore::Surface::SurfaceTarget::Texture2D; tmp_buffer.resize(guest_memory_size); host_ptr = tmp_buffer.data(); - if (must_read_current_data) { + + if (params.target == SurfaceTarget::Texture3D) { + // Special case for 3D texture segments memory_manager.ReadBlockUnsafe(gpu_addr, host_ptr, guest_memory_size); } |