2018-07-13 18:50:55 +02:00
|
|
|
/*
|
2020-02-22 22:21:06 +01:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-07-13 18:50:55 +02:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-07-13 18:50:55 +02:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/extendable_enum.h"
|
2018-07-13 18:50:55 +02:00
|
|
|
|
|
|
|
|
namespace MemoryPool {
|
|
|
|
|
struct Type : ExtendableEnum {
|
|
|
|
|
constexpr Type(uint32_t val) : ExtendableEnum(val) {}
|
|
|
|
|
};
|
|
|
|
|
constexpr Type MemoryNull{0};
|
|
|
|
|
constexpr Type System4KBPages{1};
|
|
|
|
|
constexpr Type System64KBPages{2};
|
|
|
|
|
constexpr Type System4KBPagesWith32BitGpuAddressing{3};
|
|
|
|
|
constexpr Type System64KBPagesWith32BitGpuAddressing{4};
|
|
|
|
|
constexpr Type SystemCpuInaccessible{5};
|
2019-03-18 14:53:06 +01:00
|
|
|
constexpr Type LocalMemory{6};
|
2018-07-24 18:36:26 +02:00
|
|
|
|
|
|
|
|
inline bool isSystemMemoryPool(Type pool) {
|
2019-02-28 11:21:01 +01:00
|
|
|
return pool == System4KBPages ||
|
|
|
|
|
pool == System64KBPages ||
|
|
|
|
|
pool == System4KBPagesWith32BitGpuAddressing ||
|
|
|
|
|
pool == System64KBPagesWith32BitGpuAddressing;
|
2018-07-24 18:36:26 +02:00
|
|
|
}
|
2018-07-13 18:50:55 +02:00
|
|
|
} // namespace MemoryPool
|