mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add debug variable to disable host ptr tracking.
Change-Id: Ifc866e06a4519e7590d40d8ad136147ecc80225d
This commit is contained in:
@@ -1076,6 +1076,23 @@ TEST_P(OsAgnosticMemoryManagerWithParams, givenFullGpuAddressSpaceWhenAllocateGr
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_P(OsAgnosticMemoryManagerWithParams, givenDisabledHostPtrTrackingWhenAllocateGraphicsMemoryForHostPtrIsCalledThenAllocationWithoutFragmentsIsCreated) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableHostPtrTracking.set(false);
|
||||
|
||||
bool requiresL3Flush = GetParam();
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
OsAgnosticMemoryManager memoryManager(false, false, executionEnvironment);
|
||||
auto hostPtr = reinterpret_cast<void *>(0x5001);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemoryForHostPtr(13, hostPtr, true, requiresL3Flush);
|
||||
EXPECT_NE(nullptr, allocation);
|
||||
EXPECT_EQ(0u, allocation->fragmentsStorage.fragmentCount);
|
||||
EXPECT_EQ(requiresL3Flush, allocation->flushL3Required);
|
||||
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(OsAgnosticMemoryManagerWithParams,
|
||||
OsAgnosticMemoryManagerWithParams,
|
||||
::testing::Values(false, true));
|
||||
|
||||
Reference in New Issue
Block a user