Select correct heap base address for ISA

Change-Id: I400f965faa4615519729756daa78350a46c46ff2
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-09-22 15:48:24 +02:00
committed by sys_ocldev
parent 1d4568e548
commit 2a69b1ed78
32 changed files with 146 additions and 24 deletions

View File

@@ -108,13 +108,38 @@ HWTEST2_F(CommandQueueProgramSBATest, whenCreatingCommandQueueThenItIsInitialize
uint32_t alignedSize = 4096u;
NEO::LinearStream child(commandQueue->commandStream->getSpace(alignedSize), alignedSize);
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, true))
.Times(1);
auto &hwHelper = HwHelper::get(neoDevice->getHardwareInfo().platform.eRenderCoreFamily);
bool isaInLocalMemory = !hwHelper.useSystemMemoryPlacementForISA(neoDevice->getHardwareInfo());
if (isaInLocalMemory) {
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, true))
.Times(2);
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, false))
.Times(0);
} else {
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, true))
.Times(1); // IOH
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, false))
.Times(1); // instruction heap
}
commandQueue->programGeneralStateBaseAddress(0u, true, child);
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, false))
.Times(1);
if (isaInLocalMemory) {
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, false))
.Times(1); // IOH
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, true))
.Times(1); // instruction heap
} else {
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, true))
.Times(0);
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, false))
.Times(2);
}
commandQueue->programGeneralStateBaseAddress(0u, false, child);