Improve HostMemCapabilities helper method.

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-11-26 08:31:10 +00:00
committed by Compute-Runtime-Automation
parent cff80e38b8
commit beb04bd2f8
6 changed files with 40 additions and 6 deletions

View File

@@ -56,4 +56,25 @@ template <PRODUCT_FAMILY gfxProduct>
uint64_t HwInfoConfigHw<gfxProduct>::getSingleDeviceSharedMemCapabilities() {
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
}
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);
}
} // namespace NEO