mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Correct getGpgpuEngineInstances function
dont expose bcs engine if blitter operations not supported Related-To: NEO-6325 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e28fa14a7d
commit
c16eb0ff84
@@ -129,6 +129,7 @@ class MockDevice : public RootDevice {
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(pHwInfo);
|
||||
}
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
return executionEnvironment;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,3 +21,14 @@ TEST(DeviceTest, whenBlitterOperationsSupportIsDisabledThenNoInternalCopyEngineI
|
||||
UltDeviceFactory factory{1, 0};
|
||||
EXPECT_EQ(nullptr, factory.rootDevices[0]->getInternalCopyEngine());
|
||||
}
|
||||
|
||||
TEST(DeviceTest, givenBlitterOperationsDisabledWhenCreatingBlitterEngineThenAbort) {
|
||||
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||
defaultHwInfo->capabilityTable.blitterOperationsSupported = false;
|
||||
|
||||
UltDeviceFactory factory{1, 0};
|
||||
EXPECT_THROW(factory.rootDevices[0]->createEngine(0, {aub_stream::EngineType::ENGINE_BCS, EngineUsage::Regular}), std::runtime_error);
|
||||
EXPECT_THROW(factory.rootDevices[0]->createEngine(0, {aub_stream::EngineType::ENGINE_BCS, EngineUsage::Cooperative}), std::runtime_error);
|
||||
EXPECT_THROW(factory.rootDevices[0]->createEngine(0, {aub_stream::EngineType::ENGINE_BCS, EngineUsage::Internal}), std::runtime_error);
|
||||
EXPECT_THROW(factory.rootDevices[0]->createEngine(0, {aub_stream::EngineType::ENGINE_BCS, EngineUsage::LowPriority}), std::runtime_error);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@ using namespace NEO;
|
||||
|
||||
struct WddmDirectSubmissionFixture : public WddmFixture {
|
||||
void SetUp() override {
|
||||
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||
defaultHwInfo->capabilityTable.blitterOperationsSupported = true;
|
||||
|
||||
WddmFixture::SetUp();
|
||||
|
||||
wddm->wddmInterface.reset(new WddmMockInterface20(*wddm));
|
||||
|
||||
Reference in New Issue
Block a user