Extended ForceBCSForInternalCopyEngine to apply to L0 internal cmd list
Related-To: NEO-7252 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
parent
a761003f4b
commit
02a2a5e641
|
@ -661,8 +661,15 @@ EngineControl *Device::getInternalCopyEngine() {
|
||||||
if (!getHardwareInfo().capabilityTable.blitterOperationsSupported) {
|
if (!getHardwareInfo().capabilityTable.blitterOperationsSupported) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto expectedEngine = aub_stream::ENGINE_BCS;
|
||||||
|
|
||||||
|
if (DebugManager.flags.ForceBCSForInternalCopyEngine.get() != -1) {
|
||||||
|
expectedEngine = EngineHelpers::mapBcsIndexToEngineType(DebugManager.flags.ForceBCSForInternalCopyEngine.get(), true);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto &engine : allEngines) {
|
for (auto &engine : allEngines) {
|
||||||
if (engine.osContext->getEngineType() == aub_stream::ENGINE_BCS &&
|
if (engine.osContext->getEngineType() == expectedEngine &&
|
||||||
engine.osContext->isInternalEngine()) {
|
engine.osContext->isInternalEngine()) {
|
||||||
return &engine;
|
return &engine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,38 @@ TEST(DeviceBlitterTest, whenBlitterOperationsSupportIsDisabledThenNoInternalCopy
|
||||||
EXPECT_EQ(nullptr, factory.rootDevices[0]->getInternalCopyEngine());
|
EXPECT_EQ(nullptr, factory.rootDevices[0]->getInternalCopyEngine());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(DeviceBlitterTest, givenForceBCSForInternalCopyEngineToIndexZeroWhenGetInternalCopyEngineIsCalledThenInternalMainCopyEngineIsReturned) {
|
||||||
|
DebugManagerStateRestore dbgRestorer;
|
||||||
|
DebugManager.flags.ForceBCSForInternalCopyEngine.set(0);
|
||||||
|
|
||||||
|
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||||
|
defaultHwInfo->capabilityTable.blitterOperationsSupported = true;
|
||||||
|
|
||||||
|
UltDeviceFactory factory{1, 0};
|
||||||
|
factory.rootDevices[0]->createEngine(0, {aub_stream::EngineType::ENGINE_BCS, EngineUsage::Internal});
|
||||||
|
auto engine = factory.rootDevices[0]->getInternalCopyEngine();
|
||||||
|
EXPECT_NE(nullptr, engine);
|
||||||
|
|
||||||
|
EXPECT_EQ(aub_stream::EngineType::ENGINE_BCS, engine->getEngineType());
|
||||||
|
EXPECT_EQ(EngineUsage::Internal, engine->getEngineUsage());
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(DeviceBlitterTest, givenForceBCSForInternalCopyEngineToIndexOneWhenGetInternalLinkCopyEngineIsCalledThenInternalLinkCopyEngineOneIsReturned) {
|
||||||
|
DebugManagerStateRestore dbgRestorer;
|
||||||
|
DebugManager.flags.ForceBCSForInternalCopyEngine.set(1);
|
||||||
|
|
||||||
|
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||||
|
defaultHwInfo->capabilityTable.blitterOperationsSupported = true;
|
||||||
|
|
||||||
|
UltDeviceFactory factory{1, 0};
|
||||||
|
factory.rootDevices[0]->createEngine(0, {aub_stream::EngineType::ENGINE_BCS1, EngineUsage::Internal});
|
||||||
|
auto engine = factory.rootDevices[0]->getInternalCopyEngine();
|
||||||
|
EXPECT_NE(nullptr, engine);
|
||||||
|
|
||||||
|
EXPECT_EQ(aub_stream::EngineType::ENGINE_BCS1, engine->getEngineType());
|
||||||
|
EXPECT_EQ(EngineUsage::Internal, engine->getEngineUsage());
|
||||||
|
}
|
||||||
|
|
||||||
TEST(DeviceBlitterTest, givenBlitterOperationsDisabledWhenCreatingBlitterEngineThenAbort) {
|
TEST(DeviceBlitterTest, givenBlitterOperationsDisabledWhenCreatingBlitterEngineThenAbort) {
|
||||||
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||||
defaultHwInfo->capabilityTable.blitterOperationsSupported = false;
|
defaultHwInfo->capabilityTable.blitterOperationsSupported = false;
|
||||||
|
|
Loading…
Reference in New Issue