diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-03 03:15:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 03:15:06 +0100 |
commit | 8ec32e975533fce7274157f5259a9c8ba4d78fc5 (patch) | |
tree | a12a8e1ddc74c61c270c95d2bfc63f424344108b /src/video_core/renderer_vulkan/vk_scheduler.h | |
parent | Merge pull request #7835 from bunnei/page-table-lock (diff) | |
parent | Vulkan: Fix Scheduler Chunks when their FuncType is 0. (diff) | |
download | yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.tar yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.tar.gz yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.tar.bz2 yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.tar.lz yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.tar.xz yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.tar.zst yuzu-8ec32e975533fce7274157f5259a9c8ba4d78fc5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.h b/src/video_core/renderer_vulkan/vk_scheduler.h index 1b06c9296..e69aa136b 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.h +++ b/src/video_core/renderer_vulkan/vk_scheduler.h @@ -146,6 +146,7 @@ private: using FuncType = TypedCommand<T>; static_assert(sizeof(FuncType) < sizeof(data), "Lambda is too large"); + recorded_counts++; command_offset = Common::AlignUp(command_offset, alignof(FuncType)); if (command_offset > sizeof(data) - sizeof(FuncType)) { return false; @@ -167,7 +168,7 @@ private: } bool Empty() const { - return command_offset == 0; + return recorded_counts == 0; } bool HasSubmit() const { @@ -178,6 +179,7 @@ private: Command* first = nullptr; Command* last = nullptr; + size_t recorded_counts = 0; size_t command_offset = 0; bool submit = false; alignas(std::max_align_t) std::array<u8, 0x8000> data{}; |