2021-10-07 01:00:24 +08:00
|
|
|
/*
|
2022-04-04 23:39:57 +08:00
|
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
2021-10-07 01:00:24 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "shared/source/helpers/memory_properties_helpers_base.inl"
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
void MemoryPropertiesHelper::fillPoliciesInProperties(AllocationProperties &allocationProperties, const MemoryProperties &memoryProperties, const HardwareInfo &hwInfo, bool deviceOnlyVisibilty) {
|
|
|
|
fillCachePolicyInProperties(allocationProperties,
|
|
|
|
memoryProperties.flags.locallyUncachedResource,
|
|
|
|
memoryProperties.flags.readOnly,
|
|
|
|
deviceOnlyVisibilty,
|
2022-04-04 23:39:57 +08:00
|
|
|
memoryProperties.memCacheClos);
|
2021-10-07 01:00:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t MemoryPropertiesHelper::getCacheRegion(const MemoryProperties &memoryProperties) {
|
2022-04-04 23:39:57 +08:00
|
|
|
return memoryProperties.memCacheClos;
|
2021-10-07 01:00:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace NEO
|