Pass AllocationProperties to createGraphicsAllocationFromSharedHandle()

- only extends interface to MemoryManager

Change-Id: I585d91be95abd50e11eedb53e2acfa3f66491d44
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2019-04-01 14:04:50 +02:00
committed by sys_ocldev
parent 11a7e68c0a
commit 5c0c1f77f9
26 changed files with 107 additions and 57 deletions

View File

@@ -49,7 +49,8 @@ TEST(DrmMemoryManagerTest, givenDrmMemoryManagerWhenSharedAllocationIsCreatedFro
auto createFunction = [&]() {
size_t indexFree = index++;
createdAllocations[indexFree] = memoryManager->createGraphicsAllocationFromSharedHandle(handle, false);
AllocationProperties properties(false, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::SHARED_BUFFER);
createdAllocations[indexFree] = memoryManager->createGraphicsAllocationFromSharedHandle(handle, properties, false);
EXPECT_NE(nullptr, createdAllocations[indexFree]);
};
@@ -113,7 +114,8 @@ TEST(DrmMemoryManagerTest, givenMultipleThreadsWhenSharedAllocationIsCreatedThen
auto createFunction = [&]() {
size_t indexFree = index++;
createdAllocations[indexFree] = memoryManager->createGraphicsAllocationFromSharedHandle(handle, false);
AllocationProperties properties(false, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::SHARED_BUFFER);
createdAllocations[indexFree] = memoryManager->createGraphicsAllocationFromSharedHandle(handle, properties, false);
EXPECT_NE(nullptr, createdAllocations[indexFree]);
this_thread::yield();