2018-04-05 00:38:36 +08:00
|
|
|
/*
|
2020-01-31 21:35:46 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-04-05 00:38:36 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-04-05 00:38:36 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-11-21 23:50:18 +08:00
|
|
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
|
|
|
#include "shared/source/helpers/hw_helper.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/hw_info_config.h"
|
2018-04-05 00:38:36 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-04-05 00:38:36 +08:00
|
|
|
|
2020-11-21 23:50:18 +08:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
|
|
enableRenderCompression(hwInfo);
|
|
|
|
enableBlitterOperationsSupport(hwInfo);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getSharedSystemMemCapabilities() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-06-16 22:25:46 +08:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::isEvenContextCountRequired() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-11-20 17:45:15 +08:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
void HwInfoConfigHw<gfxProduct>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {}
|
|
|
|
|
2020-11-21 23:50:18 +08:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
void HwInfoConfigHw<gfxProduct>::enableRenderCompression(HardwareInfo *hwInfo) {
|
|
|
|
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
|
|
|
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
void HwInfoConfigHw<gfxProduct>::enableBlitterOperationsSupport(HardwareInfo *hwInfo) {
|
|
|
|
hwInfo->capabilityTable.blitterOperationsSupported = HwHelper::get(hwInfo->platform.eRenderCoreFamily).obtainBlitterPreference(*hwInfo);
|
|
|
|
|
|
|
|
if (DebugManager.flags.EnableBlitterOperationsSupport.get() != -1) {
|
|
|
|
hwInfo->capabilityTable.blitterOperationsSupported = !!DebugManager.flags.EnableBlitterOperationsSupport.get();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getDeviceMemCapabilities() {
|
|
|
|
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getSingleDeviceSharedMemCapabilities() {
|
|
|
|
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
|
|
|
}
|
2020-11-26 16:31:10 +08:00
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getHostMemCapabilitiesValue() {
|
|
|
|
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getHostMemCapabilities(const HardwareInfo *hwInfo) {
|
|
|
|
bool supported = getHostMemCapabilitiesSupported(hwInfo);
|
|
|
|
|
|
|
|
if (DebugManager.flags.EnableHostUsmSupport.get() != -1) {
|
|
|
|
supported = !!DebugManager.flags.EnableHostUsmSupport.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
return (supported ? getHostMemCapabilitiesValue() : 0);
|
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|