Debug flag to override Images support

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2022-07-26 09:46:40 +00:00
committed by Compute-Runtime-Automation
parent 1388818a0e
commit 0378f2e8b3
5 changed files with 29 additions and 2 deletions

View File

@ -106,6 +106,22 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied
hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
TEST_F(DeviceFactoryTest, givenDebugFlagSetWhenCreatingDevicesThenForceImagesSupport) {
DebugManagerStateRestore stateRestore;
for (int32_t flag : {0, 1}) {
DebugManager.flags.ForceImagesSupport.set(flag);
MockExecutionEnvironment mockExecutionEnvironment(defaultHwInfo.get());
auto success = DeviceFactory::prepareDeviceEnvironments(mockExecutionEnvironment);
ASSERT_TRUE(success);
auto hwInfo = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
EXPECT_EQ(!!flag, hwInfo->capabilityTable.supportsImages);
}
}
TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetWhenCreateDevicesThenProperNumberOfDevicesIsReturned) {
DebugManagerStateRestore restorer;
DebugManager.flags.CreateMultipleRootDevices.set(5);