2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2019-01-17 17:10:12 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "runtime/helpers/preamble.inl"
|
|
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
|
|
|
|
|
|
template <>
|
2018-02-23 14:01:12 +01:00
|
|
|
void PreambleHelper<BDWFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) {
|
|
|
|
|
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
2019-01-17 17:10:12 +01:00
|
|
|
*pipeControl = BDWFamily::cmdInitPipeControl;
|
2018-02-23 14:01:12 +01:00
|
|
|
pipeControl->setCommandStreamerStallEnable(true);
|
|
|
|
|
pipeControl->setDcFlushEnable(true);
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
|
uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
|
|
|
|
uint32_t l3Config = 0;
|
|
|
|
|
|
|
|
|
|
switch (hwInfo.pPlatform->eProductFamily) {
|
|
|
|
|
case IGFX_BROADWELL:
|
|
|
|
|
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(useSLM);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(true);
|
|
|
|
|
}
|
|
|
|
|
return l3Config;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <>
|
2018-11-14 08:40:37 +01:00
|
|
|
void PreambleHelper<BDWFamily>::programPipelineSelect(LinearStream *pCommandStream, const DispatchFlags &dispatchFlags) {
|
2018-01-17 08:37:47 +01:00
|
|
|
typedef typename BDWFamily::PIPELINE_SELECT PIPELINE_SELECT;
|
|
|
|
|
auto pCmd = (PIPELINE_SELECT *)pCommandStream->getSpace(sizeof(PIPELINE_SELECT));
|
2019-01-17 17:10:12 +01:00
|
|
|
*pCmd = BDWFamily::cmdInitPipelineSelect;
|
2018-01-17 08:37:47 +01:00
|
|
|
pCmd->setMaskBits(pipelineSelectEnablePipelineSelectMaskBits);
|
|
|
|
|
pCmd->setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
|
2018-01-16 11:30:53 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
template <>
|
|
|
|
|
size_t PreambleHelper<BDWFamily>::getAdditionalCommandsSize(const Device &device) {
|
|
|
|
|
return getKernelDebuggingCommandsSize(device.isSourceLevelDebuggerActive());
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
template struct PreambleHelper<BDWFamily>;
|
|
|
|
|
} // namespace OCLRT
|