mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
Add ClientNotRegistered constexpr definition
Related-To: NEO-7422, NEO-7458 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
75a3f99685
commit
4e19807783
@@ -203,7 +203,7 @@ inline ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommand
|
||||
auto csr = static_cast<CommandQueueImp *>(cmdQ)->getCsr();
|
||||
auto lockCSR = csr->obtainUniqueOwnership();
|
||||
|
||||
if (cmdQ->getClientId() == std::numeric_limits<uint32_t>::max()) {
|
||||
if (cmdQ->getClientId() == CommandQueue::clientNotRegistered) {
|
||||
cmdQ->setClientId(csr->registerClient());
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr
|
||||
}
|
||||
|
||||
ze_result_t CommandQueueImp::destroy() {
|
||||
if (this->clientId != std::numeric_limits<uint32_t>::max()) {
|
||||
if (this->clientId != CommandQueue::clientNotRegistered) {
|
||||
this->csr->unregisterClient();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,10 +61,12 @@ struct CommandQueue : _ze_command_queue_handle_t {
|
||||
uint32_t getClientId() { return this->clientId; }
|
||||
void setClientId(uint32_t value) { this->clientId = value; }
|
||||
|
||||
static constexpr uint32_t clientNotRegistered = std::numeric_limits<uint32_t>::max();
|
||||
|
||||
protected:
|
||||
bool frontEndTrackingEnabled() const;
|
||||
|
||||
uint32_t clientId = std::numeric_limits<uint32_t>::max();
|
||||
uint32_t clientId = clientNotRegistered;
|
||||
uint32_t partitionCount = 1;
|
||||
uint32_t activeSubDevices = 1;
|
||||
bool preemptionCmdSyncProgramming = true;
|
||||
|
||||
@@ -67,7 +67,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
|
||||
|
||||
auto lockCSR = this->csr->obtainUniqueOwnership();
|
||||
|
||||
if (this->clientId == std::numeric_limits<uint32_t>::max()) {
|
||||
if (this->clientId == CommandQueue::clientNotRegistered) {
|
||||
this->clientId = this->csr->registerClient();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user