mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +08:00
Revert "Improve PipeControlHelper"
This reverts commit 878928caee.
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
Change-Id: I91c4cffc90d613a6a6e6bcee6e9cf39b8a707cb3
This commit is contained in:
committed by
sys_ocldev
parent
a06b7f2ae7
commit
3b8d39be62
@@ -65,7 +65,7 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchScheduler(
|
||||
using MI_BATCH_BUFFER_START = typename GfxFamily::MI_BATCH_BUFFER_START;
|
||||
|
||||
bool dcFlush = false;
|
||||
PipeControlHelper<GfxFamily>::addPipeControlWithWA(commandStream, dcFlush);
|
||||
PipeControlHelper<GfxFamily>::addPipeControl(commandStream, dcFlush);
|
||||
|
||||
uint32_t interfaceDescriptorIndex = devQueueHw.schedulerIDIndex;
|
||||
const size_t offsetInterfaceDescriptorTable = devQueueHw.colorCalcStateSize;
|
||||
@@ -155,7 +155,7 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchScheduler(
|
||||
// Do not put BB_START only when returning in first Scheduler run
|
||||
if (devQueueHw.getSchedulerReturnInstance() != 1) {
|
||||
|
||||
PipeControlHelper<GfxFamily>::addPipeControlWithWA(commandStream, true);
|
||||
PipeControlHelper<GfxFamily>::addPipeControl(commandStream, true);
|
||||
|
||||
// Add BB Start Cmd to the SLB in the Primary Batch Buffer
|
||||
auto *bbStart = static_cast<MI_BATCH_BUFFER_START *>(commandStream.getSpace(sizeof(MI_BATCH_BUFFER_START)));
|
||||
|
||||
@@ -348,7 +348,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
// Add a PC if we have a dependency on a previous walker to avoid concurrency issues.
|
||||
if (taskLevel > this->taskLevel) {
|
||||
if (!timestampPacketWriteEnabled) {
|
||||
PipeControlHelper<GfxFamily>::addPipeControlWithWA(commandStreamCSR, false);
|
||||
PipeControlHelper<GfxFamily>::addPipeControl(commandStreamCSR, false);
|
||||
}
|
||||
this->taskLevel = taskLevel;
|
||||
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "this->taskCount", this->taskCount);
|
||||
@@ -493,7 +493,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::flushBatchedSubmissions() {
|
||||
|
||||
ResidencyContainer surfacesForSubmit;
|
||||
ResourcePackage resourcePackage;
|
||||
auto pipeControlLocationSize = PipeControlHelper<GfxFamily>::getRequiredPipeControlSize(true);
|
||||
auto pipeControlLocationSize = PipeControlHelper<GfxFamily>::getRequiredPipeControlSize();
|
||||
void *currentPipeControlForNooping = nullptr;
|
||||
void *epiloguePipeControlLocation = nullptr;
|
||||
|
||||
@@ -582,7 +582,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
|
||||
if (!this->isStateSipSent || device.isSourceLevelDebuggerActive()) {
|
||||
size += PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(device);
|
||||
}
|
||||
size += PipeControlHelper<GfxFamily>::getRequiredPipeControlSize(true);
|
||||
size += PipeControlHelper<GfxFamily>::getRequiredPipeControlSize();
|
||||
size += sizeof(typename GfxFamily::MI_BATCH_BUFFER_START);
|
||||
|
||||
size += getCmdSizeForL3Config();
|
||||
|
||||
@@ -27,9 +27,9 @@ void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, c
|
||||
}
|
||||
|
||||
template <>
|
||||
void PipeControlHelper<Family>::addPipeControlWithWA(LinearStream &commandStream, bool dcFlush) {
|
||||
PipeControlHelper<Family>::addPipeControlWA(commandStream);
|
||||
PipeControlHelper<Family>::addPipeControl(commandStream, true);
|
||||
void PipeControlHelper<Family>::addPipeControl(LinearStream &commandStream, bool dcFlush) {
|
||||
auto pCmd = PipeControlHelper<Family>::addPipeControlBase(commandStream, dcFlush);
|
||||
pCmd->setDcFlushEnable(true);
|
||||
}
|
||||
|
||||
template class AubHelperHw<Family>;
|
||||
|
||||
@@ -198,9 +198,9 @@ struct PipeControlHelper {
|
||||
uint64_t immediateData,
|
||||
bool dcFlush);
|
||||
static void addPipeControlWA(LinearStream &commandStream);
|
||||
static PIPE_CONTROL *addPipeControl(LinearStream &commandStream, bool dcFlush);
|
||||
static void addPipeControlWithWA(LinearStream &commandStream, bool dcFlush);
|
||||
static size_t getRequiredPipeControlSize(bool withWA);
|
||||
static PIPE_CONTROL *addPipeControlBase(LinearStream &commandStream, bool dcFlush);
|
||||
static void addPipeControl(LinearStream &commandStream, bool dcFlush);
|
||||
static int getRequiredPipeControlSize();
|
||||
};
|
||||
|
||||
union SURFACE_STATE_BUFFER_LENGTH {
|
||||
|
||||
@@ -154,11 +154,13 @@ typename Family::PIPE_CONTROL *PipeControlHelper<Family>::obtainPipeControlAndPr
|
||||
uint64_t gpuAddress,
|
||||
uint64_t immediateData,
|
||||
bool dcFlush) {
|
||||
auto pipeControl = addPipeControl(*commandStream, dcFlush);
|
||||
|
||||
auto pipeControl = reinterpret_cast<PIPE_CONTROL *>(commandStream->getSpace(sizeof(PIPE_CONTROL)));
|
||||
*pipeControl = Family::cmdInitPipeControl;
|
||||
pipeControl->setCommandStreamerStallEnable(true);
|
||||
pipeControl->setPostSyncOperation(operation);
|
||||
pipeControl->setAddress(static_cast<uint32_t>(gpuAddress & 0x0000FFFFFFFFULL));
|
||||
pipeControl->setAddressHigh(static_cast<uint32_t>(gpuAddress >> 32));
|
||||
pipeControl->setDcFlushEnable(dcFlush);
|
||||
if (operation == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
|
||||
pipeControl->setImmediateData(immediateData);
|
||||
}
|
||||
@@ -166,7 +168,9 @@ typename Family::PIPE_CONTROL *PipeControlHelper<Family>::obtainPipeControlAndPr
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
typename GfxFamily::PIPE_CONTROL *PipeControlHelper<GfxFamily>::addPipeControl(LinearStream &commandStream, bool dcFlush) {
|
||||
typename GfxFamily::PIPE_CONTROL *PipeControlHelper<GfxFamily>::addPipeControlBase(LinearStream &commandStream, bool dcFlush) {
|
||||
PipeControlHelper<GfxFamily>::addPipeControlWA(commandStream);
|
||||
|
||||
auto pCmd = reinterpret_cast<PIPE_CONTROL *>(commandStream.getSpace(sizeof(PIPE_CONTROL)));
|
||||
*pCmd = GfxFamily::cmdInitPipeControl;
|
||||
pCmd->setCommandStreamerStallEnable(true);
|
||||
@@ -190,14 +194,13 @@ void PipeControlHelper<GfxFamily>::addPipeControlWA(LinearStream &commandStream)
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void PipeControlHelper<GfxFamily>::addPipeControlWithWA(LinearStream &commandStream, bool dcFlush) {
|
||||
PipeControlHelper<GfxFamily>::addPipeControlWA(commandStream);
|
||||
PipeControlHelper<GfxFamily>::addPipeControl(commandStream, dcFlush);
|
||||
void PipeControlHelper<GfxFamily>::addPipeControl(LinearStream &commandStream, bool dcFlush) {
|
||||
PipeControlHelper<GfxFamily>::addPipeControlBase(commandStream, dcFlush);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
size_t PipeControlHelper<GfxFamily>::getRequiredPipeControlSize(bool withWA) {
|
||||
const auto pipeControlCount = (withWA && HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired()) ? 2u : 1u;
|
||||
int PipeControlHelper<GfxFamily>::getRequiredPipeControlSize() {
|
||||
const auto pipeControlCount = HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired() ? 2u : 1u;
|
||||
return pipeControlCount * sizeof(typename GfxFamily::PIPE_CONTROL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user