From 55fc454b9d0fb2d6d746977769ab745d5b4be471 Mon Sep 17 00:00:00 2001 From: Flora Cui Date: Tue, 24 Sep 2024 14:25:55 +0800 Subject: [PATCH] wsl/hsakmt: move amd_queue_rocr_ above aql_to_pm4_thread_ to avoid segfault Signed-off-by: Flora Cui Reviewed-by: Longlong Yao Part-of: --- wddm/queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wddm/queue.cpp b/wddm/queue.cpp index 12309e349e..bd622003f7 100644 --- a/wddm/queue.cpp +++ b/wddm/queue.cpp @@ -269,8 +269,8 @@ ComputeQueue::ComputeQueue(WDDMDevice *device, amd_queue_mem_ = gpu_mem->GetGpuMemoryHandle(); amd_queue_ = reinterpret_cast(gpu_mem->GpuAddress()); - aql_to_pm4_thread_ = std::thread(AqlToPm4Thread, this); amd_queue_rocr_ = (amd_queue_t*)((char*)ring_rptr - offsetof(amd_queue_t, read_dispatch_id)); + aql_to_pm4_thread_ = std::thread(AqlToPm4Thread, this); } ComputeQueue::~ComputeQueue() {