diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-08-06 20:49:34 +0200 |
---|---|---|
committer | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-08-06 20:54:58 +0200 |
commit | b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61 (patch) | |
tree | eab3d5b675ddac021b1c2c31c6f3d2cea41ef569 /src/video_core/texture_cache/texture_cache.h | |
parent | Compute Replicate (diff) | |
download | yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.gz yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.bz2 yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.lz yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.xz yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.zst yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 4457b366f..6b87987de 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1021,8 +1021,18 @@ void TextureCache<P>::UploadImageContents(Image& image, StagingBuffer& staging) const GPUVAddr gpu_addr = image.gpu_addr; if (True(image.flags & ImageFlagBits::AcceleratedUpload)) { - gpu_memory->ReadBlock(gpu_addr, mapped_span.data(), mapped_span.size_bytes(), - VideoCommon::CacheType::NoTextureCache); + static u64 last_size = 0; + bool has_run = false; + if (last_size == image.unswizzled_size_bytes) { + has_run = true; + } + last_size = image.unswizzled_size_bytes; + + if (!has_run) { + LOG_ERROR(Debug, "Called"); + gpu_memory->ReadBlock(gpu_addr, mapped_span.data(), mapped_span.size_bytes(), + VideoCommon::CacheType::NoTextureCache); + } const auto uploads = FullUploadSwizzles(image.info); runtime.AccelerateImageUpload(image, staging, uploads); return; |