refactor: add method to adjust regular context count

Related-To: NEO-12258

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-09-25 12:26:47 +00:00
committed by Compute-Runtime-Automation
parent 2f4d240779
commit 8000133b2a
4 changed files with 17 additions and 1 deletions

View File

@@ -1701,7 +1701,13 @@ HWTEST_F(DeviceTests, givenCopyEnginesWhenCreatingSecondaryContextsThenUseCopyTy
if (supportedRegular || supportedHp) {
auto usage = supportedRegular ? EngineUsage::regular : EngineUsage::highPriority;
EXPECT_NE(device->secondaryEngines.end(), device->secondaryEngines.find(engineType));
EXPECT_EQ(5u, device->secondaryEngines[engineType].engines.size());
auto expectedEngineCount = 5u;
if (supportedRegular) {
gfxCoreHelper.adjustCopyEngineRegularContextCount(device->secondaryEngines[engineType].engines.size(), expectedEngineCount);
}
EXPECT_EQ(expectedEngineCount, device->secondaryEngines[engineType].engines.size());
auto engine = device->getSecondaryEngineCsr({engineType, usage}, false);
ASSERT_NE(nullptr, engine);