diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-13 09:11:48 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-13 09:11:48 +0100 |
commit | 682d82faf3bfc96603bf9b2c77436b1b23af24e0 (patch) | |
tree | ecab4e35e5f74d078746708cc76cea8a4a470930 | |
parent | Merge pull request #5741 from ReinUsesLisp/new-bufcache (diff) | |
download | yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.tar yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.tar.gz yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.tar.bz2 yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.tar.lz yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.tar.xz yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.tar.zst yuzu-682d82faf3bfc96603bf9b2c77436b1b23af24e0.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_stream_buffer.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_stream_buffer.cpp b/src/video_core/renderer_opengl/gl_stream_buffer.cpp index bfb992a79..77b3ee0fe 100644 --- a/src/video_core/renderer_opengl/gl_stream_buffer.cpp +++ b/src/video_core/renderer_opengl/gl_stream_buffer.cpp @@ -40,7 +40,7 @@ std::pair<std::span<u8>, size_t> StreamBuffer::Request(size_t size) noexcept { glClientWaitSync(fences[region].handle, 0, GL_TIMEOUT_IGNORED); fences[region].Release(); } - if (iterator + size > free_iterator) { + if (iterator + size >= free_iterator) { free_iterator = iterator + size; } if (iterator + size > STREAM_BUFFER_SIZE) { diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index dfd8c8e5a..9b5786fcb 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp @@ -153,7 +153,7 @@ StagingBufferRef StagingBufferPool::GetStreamBuffer(size_t size) { used_iterator = iterator; free_iterator = std::max(free_iterator, iterator + size); - if (iterator + size > STREAM_BUFFER_SIZE) { + if (iterator + size >= STREAM_BUFFER_SIZE) { std::fill(sync_ticks.begin() + Region(used_iterator), sync_ticks.begin() + NUM_SYNCS, current_tick); used_iterator = 0; |