diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-05-04 17:44:49 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-05-07 23:46:12 +0200 |
commit | 016c6feb49255792e4093be381e20509eb94e6d1 (patch) | |
tree | 274dd6a0d6f7d88918d612970ebbed4e5961cbef /src/video_core/texture_cache/texture_cache.h | |
parent | Buffer cache: always use async buffer downloads and fix regression. (diff) | |
download | yuzu-016c6feb49255792e4093be381e20509eb94e6d1.tar yuzu-016c6feb49255792e4093be381e20509eb94e6d1.tar.gz yuzu-016c6feb49255792e4093be381e20509eb94e6d1.tar.bz2 yuzu-016c6feb49255792e4093be381e20509eb94e6d1.tar.lz yuzu-016c6feb49255792e4093be381e20509eb94e6d1.tar.xz yuzu-016c6feb49255792e4093be381e20509eb94e6d1.tar.zst yuzu-016c6feb49255792e4093be381e20509eb94e6d1.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 762e8a52f..29ac01eb4 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -711,39 +711,16 @@ void TextureCache<P>::CommitAsyncFlushes() { } if (any_none_dma) { - bool all_pre_sync = true; auto download_map = runtime.DownloadStagingBuffer(total_size_bytes, true); for (const PendingDownload& download_info : download_ids) { if (download_info.is_swizzle) { Image& image = slot_images[download_info.object_id]; - all_pre_sync &= image.info.dma_downloaded; - image.info.dma_downloaded = true; const auto copies = FullDownloadCopies(image.info); image.DownloadMemory(download_map, copies); download_map.offset += Common::AlignUp(image.unswizzled_size_bytes, 64); } } - if (!all_pre_sync) { - runtime.Finish(); - auto it = download_ids.begin(); - while (it != download_ids.end()) { - const PendingDownload& download_info = *it; - if (download_info.is_swizzle) { - const ImageBase& image = slot_images[download_info.object_id]; - const auto copies = FullDownloadCopies(image.info); - download_map.offset -= Common::AlignUp(image.unswizzled_size_bytes, 64); - std::span<u8> download_span = - download_map.mapped_span.subspan(download_map.offset); - SwizzleImage(*gpu_memory, image.gpu_addr, image.info, copies, download_span, - swizzle_data_buffer); - it = download_ids.erase(it); - } else { - it++; - } - } - } else { - uncommitted_async_buffers.emplace_back(download_map); - } + uncommitted_async_buffers.emplace_back(download_map); } async_buffers.emplace_back(std::move(uncommitted_async_buffers)); |