Quick tests on payloads

This commit is contained in:
CamilleLaVey 2026-09-24 15:31:51 -04:00
parent 3ff00afd59
commit 98ad2d5e4c
2 changed files with 9 additions and 5 deletions

View file

@ -152,6 +152,10 @@ struct GPU::Impl {
/// Tick pending requests within the GPU.
void TickWork() {
if (last_sync_fence.load(std::memory_order_relaxed) ==
current_sync_fence.load(std::memory_order_relaxed)) {
return;
}
std::unique_lock lck{sync_request_mutex};
while (!sync_requests.empty()) {
auto request = std::move(sync_requests.front());
@ -328,7 +332,7 @@ struct GPU::Impl {
std::list<std::function<void()>> sync_requests;
std::atomic<u64> current_sync_fence{};
u64 last_sync_fence{};
std::atomic<u64> last_sync_fence{};
std::mutex sync_request_mutex;
std::condition_variable sync_request_cv;