Refactor Pipe Control setup before VFE command
Change-Id: Iaed34cb9cf0e5a628c54950d97df7d8c4b5bf69b
This commit is contained in:
parent
103b560655
commit
3c4bc00eae
|
@ -2,4 +2,4 @@
|
|||
neoDependenciesRev='735095-769'
|
||||
strategy='EQUAL'
|
||||
allowedF=42
|
||||
allowedCD=338
|
||||
allowedCD=337
|
||||
|
|
|
@ -25,8 +25,11 @@
|
|||
namespace OCLRT {
|
||||
|
||||
template <>
|
||||
void PreambleHelper<BDWFamily>::setupPipeControlInFrontOfCommand(void *pCmd, const HardwareInfo *hwInfo, bool isVfeCommand) {
|
||||
((BDWFamily::PIPE_CONTROL *)pCmd)->setDcFlushEnable(true);
|
||||
void PreambleHelper<BDWFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) {
|
||||
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||
*pipeControl = PIPE_CONTROL::sInit();
|
||||
pipeControl->setCommandStreamerStallEnable(true);
|
||||
pipeControl->setDcFlushEnable(true);
|
||||
}
|
||||
|
||||
template <>
|
||||
|
|
|
@ -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<SKLFamily>::programPipelineSelect(LinearStream *pCommandStre
|
|||
}
|
||||
|
||||
template <>
|
||||
void PreambleHelper<SKLFamily>::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<SKLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) {
|
||||
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||
*pipeControl = PIPE_CONTROL::sInit();
|
||||
pipeControl->setCommandStreamerStallEnable(true);
|
||||
if (hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) {
|
||||
pipeControl->setRenderTargetCacheFlushEnable(true);
|
||||
pipeControl->setDepthCacheFlushEnable(true);
|
||||
pipeControl->setDcFlushEnable(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -54,11 +54,7 @@ template <typename GfxFamily>
|
|||
void PreambleHelper<GfxFamily>::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();
|
||||
|
|
Loading…
Reference in New Issue