Move temporary and reusable allocation lists to command stream receiver

Change-Id: I40df6fe39b367e243e3710c5fdeaab3c85198d9d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2018-10-09 11:50:58 +02:00
committed by sys_ocldev
parent 9e8af5e045
commit 8a9d0a81df
30 changed files with 323 additions and 282 deletions

View File

@@ -659,15 +659,15 @@ TEST_P(ProgramFromBinaryTest, givenProgramWhenCleanKernelInfoIsCalledThenKernelA
TEST_P(ProgramFromBinaryTest, givenProgramWhenCleanCurrentKernelInfoIsCalledButGpuIsNotYetDoneThenKernelAllocationIsPutOnDefferedFreeList) {
cl_device_id device = pDevice;
auto memoryManager = pDevice->getMemoryManager();
EXPECT_TRUE(memoryManager->graphicsAllocations.peekIsEmpty());
auto &csr = pDevice->getCommandStreamReceiver();
EXPECT_TRUE(csr.getTemporaryAllocations().peekIsEmpty());
pProgram->build(1, &device, nullptr, nullptr, nullptr, true);
auto kernelAllocation = pProgram->getKernelInfo(size_t(0))->getGraphicsAllocation();
kernelAllocation->taskCount = 100;
*pDevice->getTagAddress() = 0;
pProgram->cleanCurrentKernelInfo();
EXPECT_FALSE(memoryManager->graphicsAllocations.peekIsEmpty());
EXPECT_EQ(memoryManager->graphicsAllocations.peekHead(), kernelAllocation);
EXPECT_FALSE(csr.getTemporaryAllocations().peekIsEmpty());
EXPECT_EQ(csr.getTemporaryAllocations().peekHead(), kernelAllocation);
}
////////////////////////////////////////////////////////////////////////////////