diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-06-07 20:03:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 20:03:57 +0200 |
commit | cfb76d8f3ed8862bc341afeaf6d25a401e2976cf (patch) | |
tree | 30098242f24010db0da3cd6152a4a716d739b20d /src/video_core/buffer_cache/buffer_cache.h | |
parent | Merge pull request #10583 from ameerj/ill-logic (diff) | |
parent | gl_staging_buffers: Optimization to reduce fence waiting (diff) | |
download | yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.tar yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.tar.gz yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.tar.bz2 yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.tar.lz yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.tar.xz yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.tar.zst yuzu-cfb76d8f3ed8862bc341afeaf6d25a401e2976cf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index f1ad5f7cb..2f281b370 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -478,7 +478,6 @@ void BufferCache<P>::CommitAsyncFlushesHigh() { if (committed_ranges.empty()) { if constexpr (IMPLEMENTS_ASYNC_DOWNLOADS) { - async_buffers.emplace_back(std::optional<Async_Buffer>{}); } return; @@ -539,7 +538,6 @@ void BufferCache<P>::CommitAsyncFlushesHigh() { committed_ranges.clear(); if (downloads.empty()) { if constexpr (IMPLEMENTS_ASYNC_DOWNLOADS) { - async_buffers.emplace_back(std::optional<Async_Buffer>{}); } return; @@ -691,7 +689,7 @@ void BufferCache<P>::BindHostIndexBuffer() { const u32 size = channel_state->index_buffer.size; const auto& draw_state = maxwell3d->draw_manager->GetDrawState(); if (!draw_state.inline_index_draw_indexes.empty()) [[unlikely]] { - if constexpr (USE_MEMORY_MAPS) { + if constexpr (USE_MEMORY_MAPS_FOR_UPLOADS) { auto upload_staging = runtime.UploadStagingBuffer(size); std::array<BufferCopy, 1> copies{ {BufferCopy{.src_offset = upload_staging.offset, .dst_offset = 0, .size = size}}}; @@ -1462,7 +1460,7 @@ bool BufferCache<P>::SynchronizeBufferNoModified(Buffer& buffer, VAddr cpu_addr, template <class P> void BufferCache<P>::UploadMemory(Buffer& buffer, u64 total_size_bytes, u64 largest_copy, std::span<BufferCopy> copies) { - if constexpr (USE_MEMORY_MAPS) { + if constexpr (USE_MEMORY_MAPS_FOR_UPLOADS) { MappedUploadMemory(buffer, total_size_bytes, copies); } else { ImmediateUploadMemory(buffer, largest_copy, copies); @@ -1473,7 +1471,7 @@ template <class P> void BufferCache<P>::ImmediateUploadMemory([[maybe_unused]] Buffer& buffer, [[maybe_unused]] u64 largest_copy, [[maybe_unused]] std::span<const BufferCopy> copies) { - if constexpr (!USE_MEMORY_MAPS) { + if constexpr (!USE_MEMORY_MAPS_FOR_UPLOADS) { std::span<u8> immediate_buffer; for (const BufferCopy& copy : copies) { std::span<const u8> upload_span; @@ -1532,7 +1530,7 @@ bool BufferCache<P>::InlineMemory(VAddr dest_address, size_t copy_size, auto& buffer = slot_buffers[buffer_id]; SynchronizeBuffer(buffer, dest_address, static_cast<u32>(copy_size)); - if constexpr (USE_MEMORY_MAPS) { + if constexpr (USE_MEMORY_MAPS_FOR_UPLOADS) { auto upload_staging = runtime.UploadStagingBuffer(copy_size); std::array copies{BufferCopy{ .src_offset = upload_staging.offset, |