From 3204411aca03cd9fd39840e598e8a4f21a0add6a Mon Sep 17 00:00:00 2001 From: Mateusz Hoppe Date: Fri, 11 Apr 2025 13:42:49 +0000 Subject: [PATCH] refactor: use deviceBitfield from CSR when creating engine Signed-off-by: Mateusz Hoppe --- shared/source/command_stream/command_stream_receiver.h | 1 + shared/source/device/device.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/source/command_stream/command_stream_receiver.h b/shared/source/command_stream/command_stream_receiver.h index e0647800d1..e2575105be 100644 --- a/shared/source/command_stream/command_stream_receiver.h +++ b/shared/source/command_stream/command_stream_receiver.h @@ -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 { diff --git a/shared/source/device/device.cpp b/shared/source/device/device.cpp index d0f8c8bac4..3167dec64f 100644 --- a/shared/source/device/device.cpp +++ b/shared/source/device/device.cpp @@ -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();