Unify command/ring/semaphore buffers placement

put them all to the same memory location

Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-03-24 16:26:54 +00:00
committed by Compute-Runtime-Automation
parent 681c09d314
commit e035199de4
12 changed files with 84 additions and 40 deletions

View File

@ -120,14 +120,15 @@ TEST_F(MemoryManagerGetAlloctionDataTests, givenDisabledCrossRootDeviceAccsessFl
}
}
HWTEST_F(MemoryManagerGetAlloctionDataTests, givenCommandBufferAllocationTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
HWTEST_F(MemoryManagerGetAlloctionDataTests, givenCommandBufferAllocationTypeWhenGetAllocationDataIsCalledThenCorrectMemoryIsRequested) {
AllocationData allocData;
AllocationProperties properties(mockRootDeviceIndex, true, 10, AllocationType::COMMAND_BUFFER, false, mockDeviceBitfield);
MockMemoryManager mockMemoryManager;
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
const auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_EQ(hwHelper.useSystemMemoryPlacementForCommandBuffer(*defaultHwInfo), allocData.flags.useSystemMemory);
}
TEST_F(MemoryManagerGetAlloctionDataTests, givenAllocateMemoryFlagTrueWhenHostPtrIsNotNullThenAllocationDataHasHostPtrNulled) {
@ -819,7 +820,8 @@ HWTEST_F(GetAllocationDataTestHw, givenRingBufferAllocationWhenGetAllocationData
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 0x10000u, AllocationType::RING_BUFFER, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
const auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_EQ(hwHelper.useSystemMemoryPlacementForCommandBuffer(*defaultHwInfo), allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.allocateMemory);
EXPECT_FALSE(allocData.flags.allow32Bit);
EXPECT_FALSE(allocData.flags.allow64kbPages);
@ -833,7 +835,8 @@ HWTEST_F(GetAllocationDataTestHw, givenSemaphoreBufferAllocationWhenGetAllocatio
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 0x1000u, AllocationType::SEMAPHORE_BUFFER, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
const auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_EQ(hwHelper.useSystemMemoryPlacementForCommandBuffer(*defaultHwInfo), allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.allocateMemory);
EXPECT_FALSE(allocData.flags.allow32Bit);
EXPECT_FALSE(allocData.flags.allow64kbPages);