mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Refactor graphics memory allocation scheme
- replace createGraphicsAllocationWithRequiredBitness with more general methodallocateGraphicsMemoryInPreferredPool based on passed AllocationData - proper flags for allocation selected based on AllocationType - remove allocateGraphicsMemory(size_t size, size_t alignment) and use allocateGraphicsMemory(size_t size) instead where default alignment is sufficient, otherwise use full options version: allocateGraphicsMemory(size_t size, size_t alignment, bool forcePin, bool uncacheable) Change-Id: I2da891f372ee181253cb840568a61b33c0d71fc9
This commit is contained in:
committed by
sys_ocldev
parent
4993a94b5b
commit
55a045ebe1
@@ -340,7 +340,7 @@ TEST_F(CommandQueueCommandStreamTest, MemoryManagerWithReusableAllocationsWhenAs
|
||||
|
||||
auto memoryManager = pDevice->getMemoryManager();
|
||||
size_t requiredSize = alignUp(100, MemoryConstants::pageSize) + CSRequirements::csOverfetchSize;
|
||||
auto allocation = memoryManager->allocateGraphicsMemory(requiredSize, 4096);
|
||||
auto allocation = memoryManager->allocateGraphicsMemory(requiredSize);
|
||||
memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
|
||||
|
||||
EXPECT_FALSE(memoryManager->allocationsForReuse.peekIsEmpty());
|
||||
|
||||
Reference in New Issue
Block a user