mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Create resource with given address
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
4cdc4ff9c8
commit
0634aa3f1b
@ -4792,6 +4792,19 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWithoutLocalMemoryAndCpuPtrWhe
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerTest, givenNullDefaultAllocWhenCreateGraphicsAllocationFromExistingStorageThenDoNotImportHandle) {
|
||||
TestedDrmMemoryManager memoryManager(false, false, false, *executionEnvironment);
|
||||
mock->ioctl_expected.primeFdToHandle = 0;
|
||||
|
||||
MockAllocationProperties properties(0u, 1u);
|
||||
MultiGraphicsAllocation allocation(0u);
|
||||
auto alloc = memoryManager.createGraphicsAllocationFromExistingStorage(properties, nullptr, allocation);
|
||||
|
||||
EXPECT_NE(alloc, nullptr);
|
||||
|
||||
memoryManager.freeGraphicsMemory(alloc);
|
||||
}
|
||||
|
||||
TEST(DrmMemoryManagerSimpleTest, givenDrmMemoryManagerWhenAllocateInDevicePoolIsCalledThenNullptrAndStatusRetryIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
|
Reference in New Issue
Block a user