mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Do not execute trim callback if there are no registered contexts.
Change-Id: I9a274281a085cdbeb98a1d495ce9ef9ab897d08a
This commit is contained in:
committed by
sys_ocldev
parent
56f67748fd
commit
77b00fa749
@@ -113,6 +113,13 @@ TEST_F(WddmMemoryManagerSimpleTest, givenMemoryManagerWhenAllocateGraphicsMemory
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenMemoryManagerWhichDoesntRegisteredAnyOsContextWhenTrimCallbackIsCalledThenItReturnsWithoutDoingAnyWork) {
|
||||
memoryManager.reset(new MockWddmMemoryManager(false, false, wddm, executionEnvironment));
|
||||
D3DKMT_TRIMNOTIFICATION trimNotification = {};
|
||||
trimNotification.Context = memoryManager.get();
|
||||
WddmMemoryManager::trimCallback(&trimNotification);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenMemoryManagerWith64KBPagesEnabledWhenAllocateGraphicsMemory64kbIsCalledThenMemoryPoolIsSystem64KBPages) {
|
||||
memoryManager.reset(new MockWddmMemoryManager(false, false, wddm, executionEnvironment));
|
||||
auto size = 4096u;
|
||||
|
||||
Reference in New Issue
Block a user