2020-08-27 14:55:09 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
struct HardwareInfo;
|
|
|
|
struct HeapAssigner {
|
|
|
|
HeapAssigner();
|
|
|
|
~HeapAssigner() = default;
|
|
|
|
bool useExternal32BitHeap(GraphicsAllocation::AllocationType allocType);
|
|
|
|
bool useInternal32BitHeap(GraphicsAllocation::AllocationType allocType);
|
|
|
|
bool use32BitHeap(GraphicsAllocation::AllocationType allocType);
|
2020-10-21 22:29:25 +08:00
|
|
|
HeapIndex get32BitHeapIndex(GraphicsAllocation::AllocationType allocType, bool useLocalMem, const HardwareInfo &hwInfo, bool useFrontWindow);
|
2020-09-14 21:14:11 +08:00
|
|
|
static bool heapTypeWithFrontWindowPool(HeapIndex heap);
|
2020-10-14 15:50:07 +08:00
|
|
|
static bool isInternalHeap(HeapIndex heap);
|
2020-08-27 14:55:09 +08:00
|
|
|
|
2020-09-14 21:14:11 +08:00
|
|
|
static HeapIndex mapExternalWindowIndex(HeapIndex index);
|
2020-10-14 15:50:07 +08:00
|
|
|
static HeapIndex mapInternalWindowIndex(HeapIndex index);
|
2020-08-27 14:55:09 +08:00
|
|
|
bool apiAllowExternalHeapForSshAndDsh = false;
|
|
|
|
};
|
|
|
|
} // namespace NEO
|