2022-02-04 21:50:19 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "shared/source/gmm_helper/gmm_lib.h"
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
enum class AllocationType;
|
2022-02-10 02:03:05 +08:00
|
|
|
struct HardwareInfo;
|
2022-02-04 21:50:19 +08:00
|
|
|
|
2022-02-09 01:15:22 +08:00
|
|
|
struct CacheSettingsHelper {
|
2022-02-10 02:03:05 +08:00
|
|
|
static GMM_RESOURCE_USAGE_TYPE_ENUM getGmmUsageType(AllocationType allocationType, bool forceUncached, const HardwareInfo &hwInfo);
|
2022-02-09 01:15:22 +08:00
|
|
|
|
|
|
|
protected:
|
2022-02-10 02:03:05 +08:00
|
|
|
static GMM_RESOURCE_USAGE_TYPE_ENUM getDefaultUsageTypeWithCachingEnabled(AllocationType allocationType, const HardwareInfo &hwInfo);
|
2022-02-09 01:15:22 +08:00
|
|
|
static GMM_RESOURCE_USAGE_TYPE_ENUM getDefaultUsageTypeWithCachingDisabled(AllocationType allocationType);
|
|
|
|
};
|
2022-02-04 21:50:19 +08:00
|
|
|
} // namespace NEO
|