mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Refactor L3 programming.
- Do not do it via member setting. - Utilize DispatchFlags Change-Id: I75d4c8ea6c1e10ca0edeeb0d1c3883a549c1cb1f Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
3528179434
commit
f362739521
@@ -154,36 +154,6 @@ TEST_F(CommandStreamReceiverTest, givenCommandStreamReceiverWhenGetCSIsCalledThe
|
||||
EXPECT_EQ(GraphicsAllocation::AllocationType::COMMAND_BUFFER, commandStreamAllocation->getAllocationType());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, givenPtrAndSizeThatMeetL3CriteriaWhenMakeResidentHostPtrThenCsrEnableL3) {
|
||||
void *hostPtr = reinterpret_cast<void *>(0xF000);
|
||||
auto size = 0x2000u;
|
||||
|
||||
auto memoryManager = commandStreamReceiver->getMemoryManager();
|
||||
GraphicsAllocation *graphicsAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{false, size}, hostPtr);
|
||||
ASSERT_NE(nullptr, graphicsAllocation);
|
||||
commandStreamReceiver->makeResidentHostPtrAllocation(graphicsAllocation);
|
||||
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
EXPECT_FALSE(csr.disableL3Cache);
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, givenPtrAndSizeThatDoNotMeetL3CriteriaWhenMakeResidentHostPtrThenCsrDisableL3) {
|
||||
void *hostPtr = reinterpret_cast<void *>(0xF001);
|
||||
auto size = 0x2001u;
|
||||
|
||||
auto memoryManager = commandStreamReceiver->getMemoryManager();
|
||||
GraphicsAllocation *graphicsAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{false, size}, hostPtr);
|
||||
ASSERT_NE(nullptr, graphicsAllocation);
|
||||
commandStreamReceiver->makeResidentHostPtrAllocation(graphicsAllocation);
|
||||
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
EXPECT_TRUE(csr.disableL3Cache);
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
|
||||
TEST_F(CommandStreamReceiverTest, memoryManagerHasAccessToCSR) {
|
||||
auto *memoryManager = commandStreamReceiver->getMemoryManager();
|
||||
EXPECT_EQ(commandStreamReceiver, memoryManager->getDefaultCommandStreamReceiver(0));
|
||||
@@ -206,7 +176,6 @@ HWTEST_F(CommandStreamReceiverTest, whenStoreAllocationThenStoredAllocationHasTa
|
||||
HWTEST_F(CommandStreamReceiverTest, givenCommandStreamReceiverWhenCheckedForInitialStatusOfStatelessMocsIndexThenUnknownMocsIsReturend) {
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
EXPECT_EQ(CacheSettings::unknownMocs, csr.latestSentStatelessMocsConfig);
|
||||
EXPECT_FALSE(csr.disableL3Cache);
|
||||
}
|
||||
|
||||
TEST_F(CommandStreamReceiverTest, makeResidentPushesAllocationToMemoryManagerResidencyList) {
|
||||
|
||||
Reference in New Issue
Block a user