diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-06-18 15:42:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-18 15:42:32 +0200 |
commit | 8acf728d5da0c8dca0d757e090591b21ebe6f3e8 (patch) | |
tree | 8431173824417b5c5ddaf618572aef712f9c80a3 /src/video_core/renderer_vulkan | |
parent | Merge pull request #10797 from lat9nq/tzdb-patch (diff) | |
parent | Synchronize vertex buffer even when it doesn't require binding (diff) | |
download | yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.tar yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.tar.gz yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.tar.bz2 yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.tar.lz yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.tar.xz yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.tar.zst yuzu-8acf728d5da0c8dca0d757e090591b21ebe6f3e8.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 8c33722d3..e30fcb1ed 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -516,15 +516,15 @@ void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bi buffer_handles.push_back(handle); } if (device.IsExtExtendedDynamicStateSupported()) { - scheduler.Record([bindings = bindings, - buffer_handles = buffer_handles](vk::CommandBuffer cmdbuf) { + scheduler.Record([bindings = std::move(bindings), + buffer_handles = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) { cmdbuf.BindVertexBuffers2EXT( bindings.min_index, bindings.max_index - bindings.min_index, buffer_handles.data(), bindings.offsets.data(), bindings.sizes.data(), bindings.strides.data()); }); } else { - scheduler.Record([bindings = bindings, - buffer_handles = buffer_handles](vk::CommandBuffer cmdbuf) { + scheduler.Record([bindings = std::move(bindings), + buffer_handles = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) { cmdbuf.BindVertexBuffers(bindings.min_index, bindings.max_index - bindings.min_index, buffer_handles.data(), bindings.offsets.data()); }); @@ -561,12 +561,12 @@ void BufferCacheRuntime::BindTransformFeedbackBuffers(VideoCommon::HostBindings< for (u32 index = 0; index < bindings.buffers.size(); ++index) { buffer_handles.push_back(bindings.buffers[index]->Handle()); } - scheduler.Record( - [bindings = bindings, buffer_handles = buffer_handles](vk::CommandBuffer cmdbuf) { - cmdbuf.BindTransformFeedbackBuffersEXT(0, static_cast<u32>(buffer_handles.size()), - buffer_handles.data(), bindings.offsets.data(), - bindings.sizes.data()); - }); + scheduler.Record([bindings = std::move(bindings), + buffer_handles = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) { + cmdbuf.BindTransformFeedbackBuffersEXT(0, static_cast<u32>(buffer_handles.size()), + buffer_handles.data(), bindings.offsets.data(), + bindings.sizes.data()); + }); } void BufferCacheRuntime::ReserveNullBuffer() { |