mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Pass EngineUsage to getEngine
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Related-To: NEO-5610
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
274d2ff4b4
commit
3f5b9df122
@@ -270,11 +270,11 @@ size_t Device::getIndexOfNonEmptyEngineGroup(EngineGroupType engineGroupType) co
|
||||
return result;
|
||||
}
|
||||
|
||||
EngineControl &Device::getEngine(aub_stream::EngineType engineType, bool lowPriority, bool internalUsage) {
|
||||
EngineControl &Device::getEngine(aub_stream::EngineType engineType, EngineUsage engineUsage) {
|
||||
for (auto &engine : engines) {
|
||||
if (engine.osContext->getEngineType() == engineType &&
|
||||
engine.osContext->isLowPriority() == lowPriority &&
|
||||
engine.osContext->isInternalEngine() == internalUsage) {
|
||||
engine.osContext->isLowPriority() == (engineUsage == EngineUsage::LowPriority) &&
|
||||
engine.osContext->isInternalEngine() == (engineUsage == EngineUsage::Internal)) {
|
||||
return engine;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
bool getHostTimer(uint64_t *hostTimestamp) const;
|
||||
const HardwareInfo &getHardwareInfo() const;
|
||||
const DeviceInfo &getDeviceInfo() const;
|
||||
EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority, bool internalUsage);
|
||||
EngineControl &getEngine(aub_stream::EngineType engineType, EngineUsage engineUsage);
|
||||
std::vector<std::vector<EngineControl>> &getEngineGroups() {
|
||||
return this->engineGroups;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,6 +18,6 @@ EngineControl &Device::getInternalEngine() {
|
||||
|
||||
auto engineType = getChosenEngineType(getHardwareInfo());
|
||||
|
||||
return this->getDeviceById(0)->getEngine(engineType, false, true);
|
||||
return this->getDeviceById(0)->getEngine(engineType, EngineUsage::Internal);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user