Register csr's client at first submit

Related-To: NEO-7422, NEO-7458

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-02-15 10:52:39 +00:00
committed by Compute-Runtime-Automation
parent 2b06aa1129
commit 275bed2a31
8 changed files with 22 additions and 6 deletions

View File

@@ -50,7 +50,9 @@ CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr
}
ze_result_t CommandQueueImp::destroy() {
this->csr->unregisterClient();
if (this->clientId != std::numeric_limits<uint32_t>::max()) {
this->csr->unregisterClient();
}
if (commandStream.getCpuBase() != nullptr) {
commandStream.replaceGraphicsAllocation(nullptr);
@@ -215,7 +217,6 @@ CommandQueue *CommandQueue::create(uint32_t productFamily, Device *device, NEO::
}
csr->initializeResources();
csr->initDirectSubmission();
csr->registerClient();
return commandQueue;
}