mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Unify programming of pipe control command
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7eafb1e877
commit
52a3bfcfde
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user