Change pipeline select programing

- Program one PS with gpgpu selection and media sampler
- Program PS only when media sampler requirement changed
  or when preamble was not sent

Change-Id: I85ba3f74087733e79d048e120aeb8b4b04796e00
This commit is contained in:
Mateusz Jablonski
2018-01-17 08:37:47 +01:00
committed by sys_ocldev
parent ae1213a98d
commit 13ac81f465
39 changed files with 361 additions and 561 deletions

View File

@@ -20,9 +20,6 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "hw_cmds.h"
#include "runtime/helpers/preamble.h"
#include "runtime/gen8/reg_configs.h"
#include "runtime/helpers/preamble.inl"
namespace OCLRT {
@@ -56,16 +53,12 @@ uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool
}
template <>
bool PreambleHelper<BDWFamily>::getMediaSamplerDopClockGateEnable(LinearStream *) {
return false;
}
template <>
void PreambleHelper<BDWFamily>::programPSForMedia(LinearStream *, bool) {}
template <>
uint32_t PreambleHelper<BDWFamily>::getPipelineSelectMaskBits() {
return 0;
void PreambleHelper<BDWFamily>::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);
}
// Explicitly instantiate PreambleHelper for BDW device family