2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2022-04-20 14:12:20 +00:00
|
|
|
* Copyright (C) 2018-2022 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
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2022-07-07 23:55:53 +00:00
|
|
|
#include "shared/source/gen8/hw_cmds_base.h"
|
2022-07-24 04:21:16 +00:00
|
|
|
#include "shared/source/helpers/pipeline_select_helper.h"
|
2021-08-03 11:48:35 +00:00
|
|
|
#include "shared/source/helpers/preamble_bdw_and_later.inl"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-07-25 15:30:11 +00:00
|
|
|
using Family = Gen8Family;
|
2022-05-13 00:29:53 +00:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
template <>
|
2022-05-13 00:29:53 +00:00
|
|
|
void PreambleHelper<Family>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) {
|
|
|
|
|
PipeControlArgs args = {};
|
|
|
|
|
args.dcFlushEnable = true;
|
2022-07-21 14:28:10 +00:00
|
|
|
MemorySynchronizationCommands<Family>::addSingleBarrier(*pCommandStream, args);
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <>
|
2022-05-13 00:29:53 +00:00
|
|
|
uint32_t PreambleHelper<Family>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
2017-12-21 00:45:38 +01:00
|
|
|
uint32_t l3Config = 0;
|
|
|
|
|
|
2019-05-08 16:00:24 +02:00
|
|
|
switch (hwInfo.platform.eProductFamily) {
|
2017-12-21 00:45:38 +01:00
|
|
|
case IGFX_BROADWELL:
|
|
|
|
|
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(useSLM);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(true);
|
|
|
|
|
}
|
|
|
|
|
return l3Config;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <>
|
2022-05-13 00:29:53 +00:00
|
|
|
void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
|
|
|
|
|
const PipelineSelectArgs &pipelineSelectArgs,
|
|
|
|
|
const HardwareInfo &hwInfo) {
|
2019-08-19 15:01:00 +02:00
|
|
|
|
2022-05-13 00:29:53 +00:00
|
|
|
using PIPELINE_SELECT = typename Family::PIPELINE_SELECT;
|
2020-04-08 18:33:03 +02:00
|
|
|
auto pCmd = pCommandStream->getSpaceForCmd<PIPELINE_SELECT>();
|
2022-05-13 00:29:53 +00:00
|
|
|
PIPELINE_SELECT cmd = Family::cmdInitPipelineSelect;
|
2020-04-08 18:33:03 +02:00
|
|
|
|
|
|
|
|
cmd.setMaskBits(pipelineSelectEnablePipelineSelectMaskBits);
|
|
|
|
|
cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
|
|
|
|
|
|
|
|
|
|
*pCmd = cmd;
|
2018-01-16 11:30:53 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
template <>
|
2022-05-13 00:29:53 +00:00
|
|
|
size_t PreambleHelper<Family>::getAdditionalCommandsSize(const Device &device) {
|
2022-04-20 14:12:20 +00:00
|
|
|
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
|
|
|
|
return getKernelDebuggingCommandsSize(debuggingEnabled);
|
2018-11-05 11:52:19 +01:00
|
|
|
}
|
|
|
|
|
|
2022-05-13 00:29:53 +00:00
|
|
|
template struct PreambleHelper<Family>;
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|