mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
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:
committed by
sys_ocldev
parent
9e8af5e045
commit
8a9d0a81df
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user