mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
sys_ocldev
parent
18779537bb
commit
7b18a919e7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user