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'
|
neoDependenciesRev='735095-769'
|
||||||
strategy='EQUAL'
|
strategy='EQUAL'
|
||||||
allowedF=42
|
allowedF=42
|
||||||
allowedCD=338
|
allowedCD=337
|
||||||
|
|
|
@ -25,8 +25,11 @@
|
||||||
namespace OCLRT {
|
namespace OCLRT {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void PreambleHelper<BDWFamily>::setupPipeControlInFrontOfCommand(void *pCmd, const HardwareInfo *hwInfo, bool isVfeCommand) {
|
void PreambleHelper<BDWFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) {
|
||||||
((BDWFamily::PIPE_CONTROL *)pCmd)->setDcFlushEnable(true);
|
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||||
|
*pipeControl = PIPE_CONTROL::sInit();
|
||||||
|
pipeControl->setCommandStreamerStallEnable(true);
|
||||||
|
pipeControl->setDcFlushEnable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
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
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -55,12 +55,14 @@ void PreambleHelper<SKLFamily>::programPipelineSelect(LinearStream *pCommandStre
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void PreambleHelper<SKLFamily>::setupPipeControlInFrontOfCommand(void *pCmd, const HardwareInfo *hwInfo, bool isVfeCommand) {
|
void PreambleHelper<SKLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) {
|
||||||
auto pPipeControl = (SKLFamily::PIPE_CONTROL *)pCmd;
|
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||||
if (isVfeCommand && hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) {
|
*pipeControl = PIPE_CONTROL::sInit();
|
||||||
pPipeControl->setRenderTargetCacheFlushEnable(true);
|
pipeControl->setCommandStreamerStallEnable(true);
|
||||||
pPipeControl->setDepthCacheFlushEnable(true);
|
if (hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) {
|
||||||
pPipeControl->setDcFlushEnable(true);
|
pipeControl->setRenderTargetCacheFlushEnable(true);
|
||||||
|
pipeControl->setDepthCacheFlushEnable(true);
|
||||||
|
pipeControl->setDcFlushEnable(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct PreambleHelper {
|
||||||
static uint32_t getDefaultThreadArbitrationPolicy();
|
static uint32_t getDefaultThreadArbitrationPolicy();
|
||||||
static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy);
|
static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy);
|
||||||
static void programPreemption(LinearStream *pCommandStream, const Device &device, GraphicsAllocation *preemptionCsr);
|
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 programVFEState(LinearStream *pCommandStream, const HardwareInfo &hwInfo, int scratchSize, uint64_t scratchAddress);
|
||||||
static void programPreamble(LinearStream *pCommandStream, const Device &device, uint32_t l3Config,
|
static void programPreamble(LinearStream *pCommandStream, const Device &device, uint32_t l3Config,
|
||||||
uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr);
|
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) {
|
void PreambleHelper<GfxFamily>::programVFEState(LinearStream *pCommandStream, const HardwareInfo &hwInfo, int scratchSize, uint64_t scratchAddress) {
|
||||||
typedef typename GfxFamily::MEDIA_VFE_STATE MEDIA_VFE_STATE;
|
typedef typename GfxFamily::MEDIA_VFE_STATE MEDIA_VFE_STATE;
|
||||||
|
|
||||||
// Add a PIPE_CONTROL w/ CS_stall
|
addPipeControlBeforeVfeCmd(pCommandStream, &hwInfo);
|
||||||
auto pPipeControl = (PIPE_CONTROL *)pCommandStream->getSpace(sizeof(PIPE_CONTROL));
|
|
||||||
*pPipeControl = PIPE_CONTROL::sInit();
|
|
||||||
pPipeControl->setCommandStreamerStallEnable(true);
|
|
||||||
setupPipeControlInFrontOfCommand(pPipeControl, &hwInfo, true);
|
|
||||||
|
|
||||||
auto pMediaVfeState = (MEDIA_VFE_STATE *)pCommandStream->getSpace(sizeof(MEDIA_VFE_STATE));
|
auto pMediaVfeState = (MEDIA_VFE_STATE *)pCommandStream->getSpace(sizeof(MEDIA_VFE_STATE));
|
||||||
*pMediaVfeState = MEDIA_VFE_STATE::sInit();
|
*pMediaVfeState = MEDIA_VFE_STATE::sInit();
|
||||||
|
|
Loading…
Reference in New Issue