/* * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/preamble_bdw_and_later.inl" namespace NEO { using Family = BDWFamily; template <> void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) { PipeControlArgs args = {}; args.dcFlushEnable = true; MemorySynchronizationCommands::addPipeControl(*pCommandStream, args); } template <> uint32_t PreambleHelper::getL3Config(const HardwareInfo &hwInfo, bool useSLM) { uint32_t l3Config = 0; switch (hwInfo.platform.eProductFamily) { case IGFX_BROADWELL: l3Config = getL3ConfigHelper(useSLM); break; default: l3Config = getL3ConfigHelper(true); } return l3Config; } template <> bool PreambleHelper::isL3Configurable(const HardwareInfo &hwInfo) { return getL3Config(hwInfo, true) != getL3Config(hwInfo, false); } template <> void PreambleHelper::programPipelineSelect(LinearStream *pCommandStream, const PipelineSelectArgs &pipelineSelectArgs, const HardwareInfo &hwInfo) { using PIPELINE_SELECT = typename Family::PIPELINE_SELECT; auto pCmd = pCommandStream->getSpaceForCmd(); PIPELINE_SELECT cmd = Family::cmdInitPipelineSelect; cmd.setMaskBits(pipelineSelectEnablePipelineSelectMaskBits); cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU); *pCmd = cmd; } template <> size_t PreambleHelper::getAdditionalCommandsSize(const Device &device) { bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive(); return getKernelDebuggingCommandsSize(debuggingEnabled); } template struct PreambleHelper; } // namespace NEO