2020-10-21 21:10:25 +08:00
|
|
|
/*
|
2020-12-22 08:03:25 +08:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2020-10-21 21:10:25 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-10-22 22:13:05 +08:00
|
|
|
#include "shared/source/helpers/hw_helper.h"
|
|
|
|
|
2020-10-21 21:10:25 +08:00
|
|
|
#include "opencl/source/helpers/cl_hw_helper.h"
|
2020-10-22 22:13:05 +08:00
|
|
|
#include "opencl/source/helpers/dispatch_info.h"
|
2020-10-21 21:10:25 +08:00
|
|
|
#include "opencl/source/program/kernel_info.h"
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2020-10-22 22:13:05 +08:00
|
|
|
template <typename Family>
|
|
|
|
bool ClHwHelperHw<Family>::isBlitAuxTranslationRequired(const HardwareInfo &hwInfo, const MultiDispatchInfo &multiDispatchInfo) {
|
|
|
|
return (HwHelperHw<Family>::getAuxTranslationMode() == AuxTranslationMode::Blit) &&
|
|
|
|
hwInfo.capabilityTable.blitterOperationsSupported &&
|
2020-12-22 08:03:25 +08:00
|
|
|
multiDispatchInfo.getKernelObjsForAuxTranslation() &&
|
|
|
|
(multiDispatchInfo.getKernelObjsForAuxTranslation()->size() > 0);
|
2020-10-22 22:13:05 +08:00
|
|
|
}
|
|
|
|
|
2020-10-21 21:10:25 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
inline bool ClHwHelperHw<GfxFamily>::requiresAuxResolves(const KernelInfo &kernelInfo) const {
|
|
|
|
return hasStatelessAccessToBuffer(kernelInfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
inline bool ClHwHelperHw<GfxFamily>::hasStatelessAccessToBuffer(const KernelInfo &kernelInfo) const {
|
|
|
|
bool hasStatelessAccessToBuffer = false;
|
|
|
|
for (uint32_t i = 0; i < kernelInfo.kernelArgInfo.size(); ++i) {
|
|
|
|
if (kernelInfo.kernelArgInfo[i].isBuffer) {
|
|
|
|
hasStatelessAccessToBuffer |= !kernelInfo.kernelArgInfo[i].pureStatefulBufferAccess;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hasStatelessAccessToBuffer;
|
|
|
|
}
|
|
|
|
|
2020-11-10 19:53:38 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
inline bool ClHwHelperHw<GfxFamily>::allowRenderCompressionForContext(const HardwareInfo &hwInfo, const Context &context) const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-01-14 22:06:40 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
inline bool ClHwHelperHw<GfxFamily>::getQueueFamilyName(std::string &name, EngineGroupType type) const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-10-21 21:10:25 +08:00
|
|
|
} // namespace NEO
|