refactor: use deviceBitfield from CSR when creating engine

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2025-04-11 13:42:49 +00:00
committed by Compute-Runtime-Automation
parent 5b20450162
commit 3204411aca
2 changed files with 2 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ class CommandStreamReceiver : NEO::NonCopyableAndNonMovableClass {
OSInterface *getOSInterface() const;
ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; }
GmmHelper *peekGmmHelper() const;
DeviceBitfield peekDeviceBitfield() const { return deviceBitfield; }
MOCKABLE_VIRTUAL void setTagAllocation(GraphicsAllocation *allocation);
GraphicsAllocation *getTagAllocation() const {

View File

@@ -588,7 +588,7 @@ bool Device::createSecondaryEngine(CommandStreamReceiver *primaryCsr, EngineType
return false;
}
EngineDescriptor engineDescriptor(engineTypeUsage, getDeviceBitfield(), preemptionMode, primaryCsr->getOsContext().isRootDevice());
EngineDescriptor engineDescriptor(engineTypeUsage, primaryCsr->peekDeviceBitfield(), preemptionMode, primaryCsr->getOsContext().isRootDevice());
auto osContext = executionEnvironment->memoryManager->createAndRegisterSecondaryOsContext(&primaryCsr->getOsContext(), commandStreamReceiver.get(), engineDescriptor);
osContext->incRefInternal();