wsl/hsakmt: move amd_queue_rocr_ above aql_to_pm4_thread_

to avoid segfault

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/28>
This commit is contained in:
Flora Cui
2024-09-24 14:25:55 +08:00
committed by Frank Min
parent a2b449a370
commit 55fc454b9d
+1 -1
View File
@@ -269,8 +269,8 @@ ComputeQueue::ComputeQueue(WDDMDevice *device,
amd_queue_mem_ = gpu_mem->GetGpuMemoryHandle();
amd_queue_ = reinterpret_cast<amd_queue_t*>(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() {