mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
Compute-Runtime-Automation

parent
681c09d314
commit
e035199de4
@ -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);
|
||||
|
Reference in New Issue
Block a user