Merge pull request #7668 from ameerj/fence-stop-token

gpu: Use std::stop_token in WaitFence for VSync thread
This commit is contained in:
bunnei 2022-01-03 16:40:36 -08:00 committed by GitHub
commit e773354477
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 15 deletions

View file

@ -266,10 +266,11 @@ void NVFlinger::Compose() {
auto& gpu = system.GPU();
const auto& multi_fence = buffer->get().multi_fence;
const auto stop_token = vsync_thread.get_stop_token();
guard->unlock();
for (u32 fence_id = 0; fence_id < multi_fence.num_fences; fence_id++) {
const auto& fence = multi_fence.fences[fence_id];
gpu.WaitFence(fence.id, fence.value);
gpu.WaitFence(fence.id, fence.value, stop_token);
}
guard->lock();