Refactor heaps

- Remove GENERAL_STATE
- Change allocation types
- IOH can be utilized as 4GB heap

Change-Id: I1c2a7bc284217a26d740b504bf92834d39f3ace2
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-12-17 07:57:45 +01:00
committed by sys_ocldev
parent 18779537bb
commit 7b18a919e7
7 changed files with 38 additions and 18 deletions

View File

@@ -80,6 +80,24 @@ TEST_F(CommandContainerHeapStateTests, givenDirtyHeapsWhenSettingStateForSingleH
}
}
TEST_F(CommandContainerTest, givenCmdContainerWhenAllocatingHeapsThenSetCorrectAllocationTypes) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice);
for (uint32_t i = 0; i < HeapType::NUM_TYPES; i++) {
HeapType heapType = static_cast<HeapType>(i);
auto heap = cmdContainer.getIndirectHeap(heapType);
if (HeapType::INDIRECT_OBJECT == heapType) {
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heap->getGraphicsAllocation()->getAllocationType());
EXPECT_NE(0u, heap->getHeapGpuStartOffset());
} else {
EXPECT_EQ(GraphicsAllocation::AllocationType::LINEAR_STREAM, heap->getGraphicsAllocation()->getAllocationType());
EXPECT_EQ(0u, heap->getHeapGpuStartOffset());
}
}
}
TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeThenEverythingIsInitialized) {
CommandContainer cmdContainer;
auto status = cmdContainer.initialize(pDevice);