diff --git a/projects/clr/rocclr/runtime/device/pal/palgpuopen.cpp b/projects/clr/rocclr/runtime/device/pal/palgpuopen.cpp index 0e1c21fdc6..b9399d805a 100644 --- a/projects/clr/rocclr/runtime/device/pal/palgpuopen.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palgpuopen.cpp @@ -149,7 +149,8 @@ bool RgpCaptureMgr::Init(Pal::IPlatform* platform) // ================================================================================================ // This function finds out all the queues in the device that we have to synchronize for RGP-traced // frames and initializes resources for them. -bool RgpCaptureMgr::RegisterTimedQueue(VirtualGPU* gpu, bool* debug_vmid) const +bool RgpCaptureMgr::RegisterTimedQueue( + uint32_t queue_id, Pal::IQueue* iQueue, bool* debug_vmid) const { bool result = true; @@ -157,14 +158,14 @@ bool RgpCaptureMgr::RegisterTimedQueue(VirtualGPU* gpu, bool* debug_vmid) const // it may be optional for Vulkan, but we provide it anyway if available). Pal::KernelContextInfo kernelContextInfo = {}; - Pal::Result palResult = gpu->queue(MainEngine).iQueue_->QueryKernelContextInfo(&kernelContextInfo); + Pal::Result palResult = iQueue->QueryKernelContextInfo(&kernelContextInfo); // Ensure we've acquired the debug VMID (note that some platforms do not // implement this function, so don't fail the whole trace if so) *debug_vmid = kernelContextInfo.flags.hasDebugVmid; // Register the queue with the GPA session class for timed queue operation support. - if (trace_.gpa_session_->RegisterTimedQueue(gpu->queue(MainEngine).iQueue_, gpu->index(), + if (trace_.gpa_session_->RegisterTimedQueue(iQueue, queue_id, kernelContextInfo.contextIdentifier) != Pal::Result::Success) { result = false; } diff --git a/projects/clr/rocclr/runtime/device/pal/palgpuopen.hpp b/projects/clr/rocclr/runtime/device/pal/palgpuopen.hpp index cf1f0efec6..9b8051fbe9 100644 --- a/projects/clr/rocclr/runtime/device/pal/palgpuopen.hpp +++ b/projects/clr/rocclr/runtime/device/pal/palgpuopen.hpp @@ -312,7 +312,7 @@ public: void WriteBarrierStartMarker(const Pal::Developer::BarrierData& data) const; void WriteBarrierEndMarker(const Pal::Developer::BarrierData& data) const; - bool RegisterTimedQueue(VirtualGPU* gpu, bool* debug_vmid) const; + bool RegisterTimedQueue(uint32_t queue_id, Pal::IQueue* iQueue, bool* debug_vmid) const; Pal::Result TimedQueueSubmit( Pal::IQueue* queue, uint64_t cmdId, const Pal::SubmitInfo& submitInfo) const; diff --git a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp index 79789efde9..1328922512 100644 --- a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp @@ -914,7 +914,8 @@ bool VirtualGPU::create(bool profiling, uint deviceQueueSize, uint rtCUs, if ((index() != 0) && dev().rgpCaptureMgr() != nullptr) { bool dbg_vmid = false; state_.rgpCaptureEnabled_ = true; - dev().rgpCaptureMgr()->RegisterTimedQueue(this, &dbg_vmid); + dev().rgpCaptureMgr()->RegisterTimedQueue(2 * index(), queue(MainEngine).iQueue_, &dbg_vmid); + dev().rgpCaptureMgr()->RegisterTimedQueue(2 * index() + 1, queue(SdmaEngine).iQueue_, &dbg_vmid); } return true;