diff --git a/Jenkinsfile b/Jenkinsfile index 2810b336c8..8fb867909f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,4 +2,4 @@ neoDependenciesRev='735095-769' strategy='EQUAL' allowedF=42 -allowedCD=338 +allowedCD=337 diff --git a/runtime/gen8/preamble.cpp b/runtime/gen8/preamble.cpp index 2fb19b18ea..6b6de45a85 100644 --- a/runtime/gen8/preamble.cpp +++ b/runtime/gen8/preamble.cpp @@ -25,8 +25,11 @@ namespace OCLRT { template <> -void PreambleHelper::setupPipeControlInFrontOfCommand(void *pCmd, const HardwareInfo *hwInfo, bool isVfeCommand) { - ((BDWFamily::PIPE_CONTROL *)pCmd)->setDcFlushEnable(true); +void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) { + auto pipeControl = pCommandStream->getSpaceForCmd(); + *pipeControl = PIPE_CONTROL::sInit(); + pipeControl->setCommandStreamerStallEnable(true); + pipeControl->setDcFlushEnable(true); } template <> diff --git a/runtime/gen9/preamble.cpp b/runtime/gen9/preamble.cpp index 83a7e5efb7..a89316820b 100644 --- a/runtime/gen9/preamble.cpp +++ b/runtime/gen9/preamble.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -55,12 +55,14 @@ void PreambleHelper::programPipelineSelect(LinearStream *pCommandStre } template <> -void PreambleHelper::setupPipeControlInFrontOfCommand(void *pCmd, const HardwareInfo *hwInfo, bool isVfeCommand) { - auto pPipeControl = (SKLFamily::PIPE_CONTROL *)pCmd; - if (isVfeCommand && hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) { - pPipeControl->setRenderTargetCacheFlushEnable(true); - pPipeControl->setDepthCacheFlushEnable(true); - pPipeControl->setDcFlushEnable(true); +void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) { + auto pipeControl = pCommandStream->getSpaceForCmd(); + *pipeControl = PIPE_CONTROL::sInit(); + pipeControl->setCommandStreamerStallEnable(true); + if (hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) { + pipeControl->setRenderTargetCacheFlushEnable(true); + pipeControl->setDepthCacheFlushEnable(true); + pipeControl->setDcFlushEnable(true); } } diff --git a/runtime/helpers/preamble.h b/runtime/helpers/preamble.h index 9fa2812b65..519d4316d7 100644 --- a/runtime/helpers/preamble.h +++ b/runtime/helpers/preamble.h @@ -46,7 +46,7 @@ struct PreambleHelper { static uint32_t getDefaultThreadArbitrationPolicy(); static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy); static void programPreemption(LinearStream *pCommandStream, const Device &device, GraphicsAllocation *preemptionCsr); - static void setupPipeControlInFrontOfCommand(void *pCmd, const HardwareInfo *hwInfo, bool isVfeCommand); + static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo); static void programVFEState(LinearStream *pCommandStream, const HardwareInfo &hwInfo, int scratchSize, uint64_t scratchAddress); static void programPreamble(LinearStream *pCommandStream, const Device &device, uint32_t l3Config, uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr); diff --git a/runtime/helpers/preamble.inl b/runtime/helpers/preamble.inl index d68ac91e68..9588f61640 100644 --- a/runtime/helpers/preamble.inl +++ b/runtime/helpers/preamble.inl @@ -54,11 +54,7 @@ template void PreambleHelper::programVFEState(LinearStream *pCommandStream, const HardwareInfo &hwInfo, int scratchSize, uint64_t scratchAddress) { typedef typename GfxFamily::MEDIA_VFE_STATE MEDIA_VFE_STATE; - // Add a PIPE_CONTROL w/ CS_stall - auto pPipeControl = (PIPE_CONTROL *)pCommandStream->getSpace(sizeof(PIPE_CONTROL)); - *pPipeControl = PIPE_CONTROL::sInit(); - pPipeControl->setCommandStreamerStallEnable(true); - setupPipeControlInFrontOfCommand(pPipeControl, &hwInfo, true); + addPipeControlBeforeVfeCmd(pCommandStream, &hwInfo); auto pMediaVfeState = (MEDIA_VFE_STATE *)pCommandStream->getSpace(sizeof(MEDIA_VFE_STATE)); *pMediaVfeState = MEDIA_VFE_STATE::sInit();