mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
Select correct heap base address for ISA
Change-Id: I400f965faa4615519729756daa78350a46c46ff2 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
1d4568e548
commit
2a69b1ed78
@@ -127,8 +127,11 @@ TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeThenEverythingIs
|
||||
auto heapAllocation = cmdContainer.getIndirectHeapAllocation(static_cast<HeapType>(i));
|
||||
EXPECT_EQ(indirectHeap->getGraphicsAllocation(), heapAllocation);
|
||||
}
|
||||
|
||||
auto &hwHelper = HwHelper::get(pDevice->getHardwareInfo().platform.eRenderCoreFamily);
|
||||
|
||||
EXPECT_EQ(cmdContainer.getInstructionHeapBaseAddress(),
|
||||
pDevice->getMemoryManager()->getInternalHeapBaseAddress(0, cmdContainer.getIndirectHeap(HeapType::INDIRECT_OBJECT)->getGraphicsAllocation()->isAllocatedInLocalMemoryPool()));
|
||||
pDevice->getMemoryManager()->getInternalHeapBaseAddress(0, !hwHelper.useSystemMemoryPlacementForISA(pDevice->getHardwareInfo())));
|
||||
}
|
||||
|
||||
TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeWithoutDeviceThenReturnedFalse) {
|
||||
@@ -497,15 +500,18 @@ TEST_F(CommandContainerHeaps, givenCommandContainerForDifferentRootDevicesThenIn
|
||||
auto device0 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
|
||||
auto &hwHelper0 = HwHelper::get(device0->getHardwareInfo().platform.eRenderCoreFamily);
|
||||
auto &hwHelper1 = HwHelper::get(device1->getHardwareInfo().platform.eRenderCoreFamily);
|
||||
|
||||
CommandContainer cmdContainer0;
|
||||
cmdContainer0.initialize(device0.get());
|
||||
bool useLocalMemory0 = cmdContainer0.getIndirectHeap(HeapType::INDIRECT_OBJECT)->getGraphicsAllocation()->isAllocatedInLocalMemoryPool();
|
||||
bool useLocalMemory0 = !hwHelper0.useSystemMemoryPlacementForISA(device0->getHardwareInfo());
|
||||
uint64_t baseAddressHeapDevice0 = device0.get()->getMemoryManager()->getInternalHeapBaseAddress(device0->getRootDeviceIndex(), useLocalMemory0);
|
||||
EXPECT_EQ(cmdContainer0.getInstructionHeapBaseAddress(), baseAddressHeapDevice0);
|
||||
|
||||
CommandContainer cmdContainer1;
|
||||
cmdContainer1.initialize(device1.get());
|
||||
bool useLocalMemory1 = cmdContainer0.getIndirectHeap(HeapType::INDIRECT_OBJECT)->getGraphicsAllocation()->isAllocatedInLocalMemoryPool();
|
||||
bool useLocalMemory1 = !hwHelper1.useSystemMemoryPlacementForISA(device0->getHardwareInfo());
|
||||
uint64_t baseAddressHeapDevice1 = device1.get()->getMemoryManager()->getInternalHeapBaseAddress(device1->getRootDeviceIndex(), useLocalMemory1);
|
||||
EXPECT_EQ(cmdContainer1.getInstructionHeapBaseAddress(), baseAddressHeapDevice1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user