Unify programming of pipe control command

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-05-13 00:29:53 +00:00
committed by Compute-Runtime-Automation
parent 7eafb1e877
commit 52a3bfcfde
15 changed files with 104 additions and 103 deletions

View File

@@ -319,6 +319,9 @@ void MemorySynchronizationCommands<GfxFamily>::setPipeControl(typename GfxFamily
pipeControl.setTlbInvalidate(args.tlbInvalidation);
pipeControl.setNotifyEnable(args.notifyEnable);
pipeControl.setDcFlushEnable(args.dcFlushEnable);
pipeControl.setDepthCacheFlushEnable(args.depthCacheFlushEnable);
pipeControl.setDepthStallEnable(args.depthStallEnable);
pipeControl.setProtectedMemoryDisable(args.protectedMemoryDisable);
if constexpr (GfxFamily::isUsingGenericMediaStateClear) {
pipeControl.setGenericMediaStateClear(args.genericMediaStateClear);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -28,6 +28,9 @@ struct PipeControlArgs {
bool workloadPartitionOffset = false;
bool amfsFlushEnable = false;
bool unTypedDataPortCacheFlush = false;
bool depthCacheFlushEnable = false;
bool depthStallEnable = false;
bool protectedMemoryDisable = false;
};
} // namespace NEO

View File

@@ -58,10 +58,9 @@ void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_3D);
*pCmd = cmd;
auto pipeControl = Family::cmdInitPipeControl;
pipeControl.setStateCacheInvalidationEnable(true);
auto pipeControlBuffer = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
*pipeControlBuffer = pipeControl;
PipeControlArgs args = {};
args.stateCacheInvalidationEnable = true;
MemorySynchronizationCommands<Family>::addPipeControl(*pCommandStream, args);
}
auto pCmd = pCommandStream->getSpaceForCmd<PIPELINE_SELECT>();
@@ -80,10 +79,9 @@ void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
*pCmd = cmd;
if (DebugManager.flags.CleanStateInPreamble.get()) {
auto pipeControl = Family::cmdInitPipeControl;
pipeControl.setStateCacheInvalidationEnable(true);
auto pipeControlBuffer = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
*pipeControlBuffer = pipeControl;
PipeControlArgs args = {};
args.stateCacheInvalidationEnable = true;
MemorySynchronizationCommands<Family>::addPipeControl(*pCommandStream, args);
}
}