mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Refactor allocateGraphicsMemoryInPreferredPool
- extend AllocationType to code necessary flags - remove redundant args - refactor Buffer::create() Change-Id: Ic4b2e0931fad8198ad1cf4f79de210d815048ccf
This commit is contained in:
committed by
sys_ocldev
parent
c2454d5aa2
commit
4441387969
@@ -1141,7 +1141,7 @@ TEST_F(DrmMemoryManagerTest, Given32BitDeviceWithMemoryManagerWhenAllHeapsAreExh
|
||||
bool force32Bit = memoryManager->peekForce32BitAllocations();
|
||||
EXPECT_TRUE(force32Bit);
|
||||
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(true, true, false, false, nullptr, static_cast<size_t>(allocationSize), GraphicsAllocation::AllocationType::BUFFER);
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(true, nullptr, static_cast<size_t>(allocationSize), GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
EXPECT_NE(nullptr, graphicsAllocation);
|
||||
EXPECT_FALSE(pDevice->getDeviceInfo().force32BitAddressess);
|
||||
|
||||
@@ -1161,7 +1161,7 @@ TEST_F(DrmMemoryManagerTest, Given32BitDeviceWithMemoryManagerWhenAllHeapsAreExh
|
||||
//ask for 4GB - 1
|
||||
size_t allocationSize = (4 * 1023 * 1024 * (size_t)1024u - 1) + 4 * 1024 * (size_t)1024u;
|
||||
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(true, true, false, false, nullptr, static_cast<size_t>(allocationSize), GraphicsAllocation::AllocationType::BUFFER);
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(true, nullptr, static_cast<size_t>(allocationSize), GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
EXPECT_EQ(nullptr, graphicsAllocation);
|
||||
EXPECT_TRUE(pDevice->getDeviceInfo().force32BitAddressess);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user