mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move allocateGraphicsMemoryInDevicePool to Os Agnostic memory manager.
Change-Id: Ica179986f401b99e61c3485d549790489cbb1fd5 Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
@ -1677,22 +1677,6 @@ TEST(MemoryManagerTest, givenAllocationTypesThatMayNeedL3FlushWhenCallingGetAllo
|
||||
}
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenSpecializedMemoryManagerWhenCallingConstructGraphicsAllocationThenNullptrIsReturned) {
|
||||
struct MemoryManagerConstructAllocation : public MockMemoryManager {
|
||||
GraphicsAllocation *constructGraphicsAllocation(GraphicsAllocation::AllocationType allocationType, void *cpuPtrIn, uint64_t gpuAddress,
|
||||
size_t sizeIn, MemoryPool::Type pool, bool multiOsContextCapable) override {
|
||||
return MemoryManager::constructGraphicsAllocation(allocationType, cpuPtrIn, gpuAddress,
|
||||
sizeIn, pool, multiOsContextCapable);
|
||||
}
|
||||
MemoryManagerConstructAllocation(ExecutionEnvironment &executionEnvironment) : MockMemoryManager(false, executionEnvironment) {}
|
||||
};
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
||||
MemoryManagerConstructAllocation memoryManager(executionEnvironment);
|
||||
auto allocation = memoryManager.constructGraphicsAllocation(GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0, 0, MemoryPool::MemoryNull, false);
|
||||
EXPECT_EQ(nullptr, allocation);
|
||||
}
|
||||
|
||||
TEST(HeapSelectorTest, given32bitInternalAllocationWhenSelectingHeapThenInternalHeapIsUsed) {
|
||||
GraphicsAllocation allocation{GraphicsAllocation::AllocationType::KERNEL_ISA, nullptr, 0, 0, 0, MemoryPool::MemoryNull, false};
|
||||
allocation.set32BitAllocation(true);
|
||||
|
Reference in New Issue
Block a user