From ea78e4d636d421273df2eaff090b8b64fa8bfaa7 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:24:45 +0200 Subject: [PATCH] liverpool: queue::pop takes the front element --- src/video_core/amdgpu/liverpool.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 2a7125ef2..246c8c947 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -93,17 +93,14 @@ void Liverpool::Process(std::stop_token stoken) { // Process incoming commands with high priority while (num_commands) { - Common::UniqueFunction callback{}; { std::unique_lock lk{submit_mutex}; - callback = std::move(command_queue.back()); + callback = std::move(command_queue.front()); command_queue.pop(); + --num_commands; } - callback(); - - --num_commands; } curr_qid = (curr_qid + 1) % num_mapped_queues;