Capability to create multiple Regular BCS contexts per engine.

Related-To: NEO-7618

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-01-19 08:57:27 +00:00
committed by Compute-Runtime-Automation
parent 286c672ef4
commit 5a5596957a
9 changed files with 93 additions and 12 deletions

View File

@@ -52,6 +52,7 @@ class MockDevice : public RootDevice {
using Device::createDeviceInternals;
using Device::createEngine;
using Device::createSubDevices;
using Device::defaultBcsEngineIndex;
using Device::deviceBitfield;
using Device::deviceInfo;
using Device::engineInstanced;

View File

@@ -495,4 +495,5 @@ OverrideUserFenceStartValue = -1
DirectSubmissionRelaxedOrderingQueueSizeLimit = -1
ExperimentalForceCopyThroughLock = -1
NumberOfRegularContextsPerEngine = -1
EnableMultipleRegularContextForBcs = -1
AppendAubStreamContextFlags = -1

View File

@@ -715,3 +715,20 @@ TEST(FailDeviceTest, GivenMidThreadPreemptionAndFailedDeviceWhenCreatingDeviceTh
EXPECT_EQ(nullptr, pDevice);
}
TEST_F(DeviceTests, whenInitializingDeviceThenSetCorrectDefaultBcsEngineIndex) {
if (!defaultHwInfo->capabilityTable.blitterOperationsSupported) {
GTEST_SKIP();
}
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
executionEnvironment.incRefInternal();
UltDeviceFactory deviceFactory{1, 0, executionEnvironment};
auto device = deviceFactory.rootDevices[0];
auto &engine = device->allEngines[device->defaultBcsEngineIndex];
EXPECT_EQ(aub_stream::EngineType::ENGINE_BCS, engine.getEngineType());
EXPECT_EQ(EngineUsage::Regular, engine.getEngineUsage());
}