mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Dont create multiple page table managers within single root device
Resolves: NEO-4090 Change-Id: I148b9a5a2755edbcd15ead5f4a0d5d799ee815e1 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Jablonski, Mateusz
parent
b5dd3abf85
commit
14c013f53b
@@ -262,16 +262,17 @@ TEST(DeviceCreation, givenDeviceWhenCheckingEnginesCountThenNumberGreaterThanZer
|
||||
|
||||
using DeviceHwTest = ::testing::Test;
|
||||
|
||||
HWTEST_F(DeviceHwTest, givenHwHelperInputWhenInitializingCsrThenCreatePageTableManagerIfAllowed) {
|
||||
HWTEST_F(DeviceHwTest, givenHwHelperInputWhenInitializingCsrThenCreatePageTableManagerIfNeeded) {
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
localHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
localHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.prepareRootDeviceEnvironments(3);
|
||||
executionEnvironment.incRefInternal();
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
executionEnvironment.setHwInfo(&localHwInfo);
|
||||
auto defaultEngineType = getChosenEngineType(localHwInfo);
|
||||
std::unique_ptr<MockDevice> device;
|
||||
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(&localHwInfo, &executionEnvironment, 0));
|
||||
auto &csr0 = device->getUltCommandStreamReceiver<FamilyType>();
|
||||
@@ -280,13 +281,13 @@ HWTEST_F(DeviceHwTest, givenHwHelperInputWhenInitializingCsrThenCreatePageTableM
|
||||
auto hwInfo = executionEnvironment.getMutableHardwareInfo();
|
||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
hwInfo->capabilityTable.ftrRenderCompressedImages = false;
|
||||
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(&localHwInfo, &executionEnvironment, 0));
|
||||
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(&localHwInfo, &executionEnvironment, 1));
|
||||
auto &csr1 = device->getUltCommandStreamReceiver<FamilyType>();
|
||||
EXPECT_EQ(UnitTestHelper<FamilyType>::isPageTableManagerSupported(*hwInfo), csr1.createPageTableManagerCalled);
|
||||
EXPECT_EQ(csr1.needsPageTableManager(defaultEngineType), csr1.createPageTableManagerCalled);
|
||||
|
||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
hwInfo->capabilityTable.ftrRenderCompressedImages = true;
|
||||
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(&localHwInfo, &executionEnvironment, 0));
|
||||
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(&localHwInfo, &executionEnvironment, 2));
|
||||
auto &csr2 = device->getUltCommandStreamReceiver<FamilyType>();
|
||||
EXPECT_EQ(UnitTestHelper<FamilyType>::isPageTableManagerSupported(*hwInfo), csr2.createPageTableManagerCalled);
|
||||
EXPECT_EQ(csr2.needsPageTableManager(defaultEngineType), csr2.createPageTableManagerCalled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user