diff options
author | bunnei <bunneidev@gmail.com> | 2019-07-10 22:35:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 22:35:48 +0200 |
commit | 7fb7054bc85c8e5d83c19b8c7861f466fb0411d4 (patch) | |
tree | 1d12b85eb60f3f98395aafd0c4168aa32ceba292 /src/video_core/renderer_vulkan/vk_stream_buffer.cpp | |
parent | Merge pull request #2700 from ogniK5377/GetFriendList (diff) | |
parent | vk_scheduler: Drop execution context in favor of views (diff) | |
download | yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.tar yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.tar.gz yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.tar.bz2 yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.tar.lz yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.tar.xz yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.tar.zst yuzu-7fb7054bc85c8e5d83c19b8c7861f466fb0411d4.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_stream_buffer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_stream_buffer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/renderer_vulkan/vk_stream_buffer.cpp b/src/video_core/renderer_vulkan/vk_stream_buffer.cpp index 58ffa42f2..62f1427f5 100644 --- a/src/video_core/renderer_vulkan/vk_stream_buffer.cpp +++ b/src/video_core/renderer_vulkan/vk_stream_buffer.cpp @@ -46,12 +46,12 @@ std::tuple<u8*, u64, bool> VKStreamBuffer::Reserve(u64 size) { return {mapped_pointer + offset, offset, invalidation_mark.has_value()}; } -VKExecutionContext VKStreamBuffer::Send(VKExecutionContext exctx, u64 size) { +void VKStreamBuffer::Send(u64 size) { ASSERT_MSG(size <= mapped_size, "Reserved size is too small"); if (invalidation_mark) { // TODO(Rodrigo): Find a better way to invalidate than waiting for all watches to finish. - exctx = scheduler.Flush(); + scheduler.Flush(); std::for_each(watches.begin(), watches.begin() + *invalidation_mark, [&](auto& resource) { resource->Wait(); }); invalidation_mark = std::nullopt; @@ -62,11 +62,9 @@ VKExecutionContext VKStreamBuffer::Send(VKExecutionContext exctx, u64 size) { ReserveWatches(WATCHES_RESERVE_CHUNK); } // Add a watch for this allocation. - watches[used_watches++]->Watch(exctx.GetFence()); + watches[used_watches++]->Watch(scheduler.GetFence()); offset += size; - - return exctx; } void VKStreamBuffer::CreateBuffers(VKMemoryManager& memory_manager, vk::BufferUsageFlags usage) { |