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

@@ -175,16 +175,16 @@ TEST_F(ProgramDataTest, givenConstantAllocationThatIsInUseByGpuWhenProgramIsBein
buildAndDecodeProgramPatchList();
auto tagAddress = pProgram->getDevice(0).getTagAddress();
auto &csr = pPlatform->getDevice(0)->getCommandStreamReceiver();
auto tagAddress = csr.getTagAddress();
auto constantSurface = pProgram->getConstantSurface();
constantSurface->taskCount = *tagAddress + 1;
auto memoryManager = pProgram->getDevice(0).getMemoryManager();
EXPECT_TRUE(memoryManager->graphicsAllocations.peekIsEmpty());
EXPECT_TRUE(csr.getTemporaryAllocations().peekIsEmpty());
delete pProgram;
pProgram = nullptr;
EXPECT_FALSE(memoryManager->graphicsAllocations.peekIsEmpty());
EXPECT_EQ(constantSurface, memoryManager->graphicsAllocations.peekHead());
EXPECT_FALSE(csr.getTemporaryAllocations().peekIsEmpty());
EXPECT_EQ(constantSurface, csr.getTemporaryAllocations().peekHead());
}
TEST_F(ProgramDataTest, givenGlobalAllocationThatIsInUseByGpuWhenProgramIsBeingDestroyedThenItIsAddedToTemporaryAllocationList) {
@@ -192,16 +192,16 @@ TEST_F(ProgramDataTest, givenGlobalAllocationThatIsInUseByGpuWhenProgramIsBeingD
buildAndDecodeProgramPatchList();
auto tagAddress = pProgram->getDevice(0).getTagAddress();
auto &csr = pPlatform->getDevice(0)->getCommandStreamReceiver();
auto tagAddress = csr.getTagAddress();
auto globalSurface = pProgram->getGlobalSurface();
globalSurface->taskCount = *tagAddress + 1;
auto memoryManager = pProgram->getDevice(0).getMemoryManager();
EXPECT_TRUE(memoryManager->graphicsAllocations.peekIsEmpty());
EXPECT_TRUE(csr.getTemporaryAllocations().peekIsEmpty());
delete pProgram;
pProgram = nullptr;
EXPECT_FALSE(memoryManager->graphicsAllocations.peekIsEmpty());
EXPECT_EQ(globalSurface, memoryManager->graphicsAllocations.peekHead());
EXPECT_FALSE(csr.getTemporaryAllocations().peekIsEmpty());
EXPECT_EQ(globalSurface, csr.getTemporaryAllocations().peekHead());
}
TEST_F(ProgramDataTest, GivenDeviceForcing32BitMessagesWhenConstAllocationIsPresentInProgramBinariesThen32BitStorageIsAllocated) {