/* * Copyright (C) 2018 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/helpers/preamble.inl" namespace OCLRT { template <> void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) { auto pipeControl = pCommandStream->getSpaceForCmd(); *pipeControl = PIPE_CONTROL::sInit(); pipeControl->setCommandStreamerStallEnable(true); pipeControl->setDcFlushEnable(true); } template <> uint32_t PreambleHelper::getL3Config(const HardwareInfo &hwInfo, bool useSLM) { uint32_t l3Config = 0; switch (hwInfo.pPlatform->eProductFamily) { case IGFX_BROADWELL: l3Config = getL3ConfigHelper(useSLM); break; default: l3Config = getL3ConfigHelper(true); } return l3Config; } template <> void PreambleHelper::programPipelineSelect(LinearStream *pCommandStream, bool mediaSamplerRequired) { typedef typename BDWFamily::PIPELINE_SELECT PIPELINE_SELECT; auto pCmd = (PIPELINE_SELECT *)pCommandStream->getSpace(sizeof(PIPELINE_SELECT)); *pCmd = PIPELINE_SELECT::sInit(); pCmd->setMaskBits(pipelineSelectEnablePipelineSelectMaskBits); pCmd->setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU); } template struct PreambleHelper; } // namespace OCLRT