mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Remove allocation type UNDECIDED
Resolves: NEO-2733 Change-Id: If6102ca04f557feeedaf702fa0d9f63c79017fe4 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
0c6823afd6
commit
6e97a69a2b
@@ -356,12 +356,6 @@ TEST(MemoryManagerTest, givenSvmAllocationTypeWhenGetAllocationDataIsCalledThen6
|
||||
EXPECT_FALSE(allocData.flags.allow32Bit);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenUndecidedTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::UNDECIDED}, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::TAG_BUFFER}, {}, nullptr);
|
||||
|
||||
@@ -396,7 +396,7 @@ TEST_F(MemoryAllocatorTest, givenMemoryManagerWhenAskedFor32bitAllocationWithPtr
|
||||
TEST_F(MemoryAllocatorTest, givenAllocationWithFragmentsWhenCallingFreeGraphicsMemoryThenDoNotCallHandleFenceCompletion) {
|
||||
auto size = 3u * MemoryConstants::pageSize;
|
||||
auto *ptr = reinterpret_cast<void *>(0xbeef1);
|
||||
AllocationProperties properties{false, size, GraphicsAllocation::AllocationType::UNDECIDED};
|
||||
AllocationProperties properties{false, size, GraphicsAllocation::AllocationType::BUFFER};
|
||||
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, ptr);
|
||||
EXPECT_EQ(3u, allocation->fragmentsStorage.fragmentCount);
|
||||
@@ -1647,7 +1647,7 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenAllocationWasNotUnlockedThenItIsUn
|
||||
|
||||
TEST(MemoryManagerTest, givenAllocationTypesThatMayNeedL3FlushWhenCallingGetAllocationDataThenFlushL3FlagIsCorrectlySet) {
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(1, GraphicsAllocation::AllocationType::UNDECIDED);
|
||||
AllocationProperties properties(1, GraphicsAllocation::AllocationType::UNKNOWN);
|
||||
properties.flags.flushL3RequiredForRead = 1;
|
||||
properties.flags.flushL3RequiredForWrite = 1;
|
||||
|
||||
@@ -1657,8 +1657,8 @@ TEST(MemoryManagerTest, givenAllocationTypesThatMayNeedL3FlushWhenCallingGetAllo
|
||||
GraphicsAllocation::AllocationType::GLOBAL_SURFACE, GraphicsAllocation::AllocationType::IMAGE,
|
||||
GraphicsAllocation::AllocationType::PIPE, GraphicsAllocation::AllocationType::SHARED_IMAGE,
|
||||
GraphicsAllocation::AllocationType::SHARED_BUFFER, GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY,
|
||||
GraphicsAllocation::AllocationType::SVM_ZERO_COPY, GraphicsAllocation::AllocationType::UNDECIDED,
|
||||
GraphicsAllocation::AllocationType::SVM_GPU, GraphicsAllocation::AllocationType::SVM_CPU};
|
||||
GraphicsAllocation::AllocationType::SVM_ZERO_COPY, GraphicsAllocation::AllocationType::SVM_GPU,
|
||||
GraphicsAllocation::AllocationType::SVM_CPU};
|
||||
|
||||
for (auto allocationType : allocationTypesThatMayNeedL3Flush) {
|
||||
properties.allocationType = allocationType;
|
||||
|
||||
Reference in New Issue
Block a user