mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
fix: pass rootDevice when creating secondary contexts
- fix initialization of gfxCoreHelper in drm and wddm Related-To: NEO-7824, NEO-8171 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a5ee3b640b
commit
9d052cd8ee
@@ -489,6 +489,8 @@ bool Device::createEngine(EngineTypeUsage engineTypeUsage) {
|
||||
osContext->setIsPrimaryEngine(isPrimaryEngine);
|
||||
osContext->setIsDefaultEngine(isDefaultEngine);
|
||||
|
||||
DEBUG_BREAK_IF(getDeviceBitfield().count() > 1 && !osContext->isRootDevice());
|
||||
|
||||
commandStreamReceiver->setupContext(*osContext);
|
||||
|
||||
if (osContext->isImmediateContextInitializationEnabled(isDefaultEngine)) {
|
||||
@@ -562,13 +564,15 @@ bool Device::createSecondaryEngine(CommandStreamReceiver *primaryCsr, EngineType
|
||||
return false;
|
||||
}
|
||||
|
||||
EngineDescriptor engineDescriptor(engineTypeUsage, getDeviceBitfield(), preemptionMode, false);
|
||||
EngineDescriptor engineDescriptor(engineTypeUsage, getDeviceBitfield(), preemptionMode, primaryCsr->getOsContext().isRootDevice());
|
||||
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterSecondaryOsContext(&primaryCsr->getOsContext(), commandStreamReceiver.get(), engineDescriptor);
|
||||
osContext->incRefInternal();
|
||||
commandStreamReceiver->setupContext(*osContext);
|
||||
commandStreamReceiver->setPrimaryCsr(primaryCsr);
|
||||
|
||||
DEBUG_BREAK_IF(getDeviceBitfield().count() > 1 && !osContext->isRootDevice());
|
||||
|
||||
EngineControl engine{commandStreamReceiver.get(), osContext};
|
||||
|
||||
secondaryEngines[engineTypeUsage.first].engines.push_back(engine);
|
||||
|
||||
@@ -468,6 +468,7 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl
|
||||
|
||||
rootDeviceEnvironment.initProductHelper();
|
||||
rootDeviceEnvironment.initGfxCoreHelper();
|
||||
rootDeviceEnvironment.initializeGfxCoreHelperFromProductHelper();
|
||||
rootDeviceEnvironment.initApiGfxCoreHelper();
|
||||
rootDeviceEnvironment.initCompilerProductHelper();
|
||||
rootDeviceEnvironment.initAilConfigurationHelper();
|
||||
|
||||
@@ -116,6 +116,7 @@ bool Wddm::init() {
|
||||
productHelper.adjustPlatformForProductFamily(hardwareInfo);
|
||||
rootDeviceEnvironment.initApiGfxCoreHelper();
|
||||
rootDeviceEnvironment.initGfxCoreHelper();
|
||||
rootDeviceEnvironment.initializeGfxCoreHelperFromProductHelper();
|
||||
rootDeviceEnvironment.initializeGfxCoreHelperFromHwInfo();
|
||||
rootDeviceEnvironment.initAilConfigurationHelper();
|
||||
if (false == rootDeviceEnvironment.initAilConfiguration()) {
|
||||
|
||||
Reference in New Issue
Block a user