Select correct heap for programGeneralStateBaseAddress

Change-Id: I21744fbc67551d358e03b3ee44f649ba8d62eb45
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-07-02 09:16:34 +02:00
committed by sys_ocldev
parent 96a7b1e066
commit 2e87c872b5
4 changed files with 8 additions and 8 deletions

View File

@@ -53,7 +53,7 @@ void CommandQueueHw<gfxCoreFamily>::programGeneralStateBaseAddress(uint64_t gsba
gsba,
true,
(device->getMOCS(true, false) >> 1),
neoDevice->getMemoryManager()->getInternalHeapBaseAddress(device->getRootDeviceIndex(), false),
neoDevice->getMemoryManager()->getInternalHeapBaseAddress(device->getRootDeviceIndex(), true),
true,
neoDevice->getGmmHelper(),
false);

View File

@@ -169,7 +169,7 @@ HWTEST2_F(CommandQueueProgramSBATest, whenCreatingCommandQueueThenItIsInitialize
uint32_t alignedSize = 4096u;
NEO::LinearStream child(commandQueue->commandStream->getSpace(alignedSize), alignedSize);
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, false))
EXPECT_CALL(*memoryManager, getInternalHeapBaseAddress(rootDeviceIndex, true))
.Times(1);
commandQueue->programGeneralStateBaseAddress(0u, child);

View File

@@ -82,7 +82,7 @@ bool CommandContainer::initialize(Device *device) {
indirectHeaps[i] = std::make_unique<IndirectHeap>(allocationIndirectHeaps[i], requireInternalHeap);
}
instructionHeapBaseAddress = device->getMemoryManager()->getInternalHeapBaseAddress(device->getRootDeviceIndex(), allocationIndirectHeaps[IndirectHeap::Type::INDIRECT_OBJECT]->isAllocatedInLocalMemoryPool());
instructionHeapBaseAddress = device->getMemoryManager()->getInternalHeapBaseAddress(device->getRootDeviceIndex(), true);
iddBlock = nullptr;
nextIddInBlock = this->getNumIddPerBlock();

View File

@@ -115,7 +115,7 @@ TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeThenEverythingIs
EXPECT_EQ(indirectHeap->getGraphicsAllocation(), heapAllocation);
}
EXPECT_EQ(cmdContainer.getInstructionHeapBaseAddress(),
pDevice->getMemoryManager()->getInternalHeapBaseAddress(0, cmdContainer.getIndirectHeap(HeapType::INDIRECT_OBJECT)->getGraphicsAllocation()->isAllocatedInLocalMemoryPool()));
pDevice->getMemoryManager()->getInternalHeapBaseAddress(0, true));
}
TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeWithoutDeviceThenReturnedFalse) {
@@ -446,14 +446,14 @@ TEST_F(CommandContainerHeaps, givenCommandContainerForDifferentRootDevicesThenIn
CommandContainer cmdContainer0;
cmdContainer0.initialize(device0.get());
bool useLocalMemory0 = cmdContainer0.getIndirectHeap(HeapType::INDIRECT_OBJECT)->getGraphicsAllocation()->isAllocatedInLocalMemoryPool();
uint64_t baseAddressHeapDevice0 = device0.get()->getMemoryManager()->getInternalHeapBaseAddress(device0->getRootDeviceIndex(), useLocalMemory0);
uint64_t baseAddressHeapDevice0 = device0.get()->getMemoryManager()->getInternalHeapBaseAddress(device0->getRootDeviceIndex(), true);
EXPECT_EQ(cmdContainer0.getInstructionHeapBaseAddress(), baseAddressHeapDevice0);
CommandContainer cmdContainer1;
cmdContainer1.initialize(device1.get());
bool useLocalMemory1 = cmdContainer0.getIndirectHeap(HeapType::INDIRECT_OBJECT)->getGraphicsAllocation()->isAllocatedInLocalMemoryPool();
uint64_t baseAddressHeapDevice1 = device1.get()->getMemoryManager()->getInternalHeapBaseAddress(device1->getRootDeviceIndex(), useLocalMemory1);
uint64_t baseAddressHeapDevice1 = device1.get()->getMemoryManager()->getInternalHeapBaseAddress(device1->getRootDeviceIndex(), true);
EXPECT_EQ(cmdContainer1.getInstructionHeapBaseAddress(), baseAddressHeapDevice1);
}