mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Reuse common logic of programming SCM fields for gen 9 and gen 11
Logic related to programming non coherent and thread arbitration policy for gens 9 and 11 has been moved to EncodeComputeMode object, where similar logic for gens gen12lp and newer is located. Functions PreambleHelper::programThreadArbitration and PreambleHelper::getThreadArbitrationCommandsSize have been removed. Redundant setForceNonCoherent call has been removed from XE HPG Related-To: NEO-6728 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
5d90e2ab1d
commit
cd95572443
@ -340,11 +340,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
addPipeControlBefore3dState(commandStreamCSR, dispatchFlags);
|
||||
programPerDssBackedBuffer(commandStreamCSR, device, dispatchFlags);
|
||||
|
||||
if (this->streamProperties.stateComputeMode.threadArbitrationPolicy.isDirty) {
|
||||
auto threadArbitrationPolicy = this->streamProperties.stateComputeMode.threadArbitrationPolicy.value;
|
||||
PreambleHelper<GfxFamily>::programThreadArbitration(&commandStreamCSR, threadArbitrationPolicy);
|
||||
}
|
||||
|
||||
stateBaseAddressDirty |= ((GSBAFor32BitProgrammed ^ dispatchFlags.gsba32BitRequired) && force32BitAllocations);
|
||||
|
||||
programVFEState(commandStreamCSR, dispatchFlags, device.getDeviceInfo().maxFrontEndThreads);
|
||||
@ -654,6 +649,15 @@ void CommandStreamReceiverHw<GfxFamily>::forcePipeControl(NEO::LinearStream &com
|
||||
MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStreamCSR, args);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
if (this->streamProperties.stateComputeMode.isDirty()) {
|
||||
EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(
|
||||
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
|
||||
hasSharedHandles(), hwInfo, isRcs());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::programStallingCommandsForBarrier(LinearStream &cmdStream, DispatchFlags &dispatchFlags) {
|
||||
stallingCommandsOnNextFlushRequired = false;
|
||||
@ -829,10 +833,6 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
|
||||
size += TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(dispatchFlags.csrDependencies);
|
||||
size += TimestampPacketHelper::getRequiredCmdStreamSizeForTaskCountContainer<GfxFamily>(dispatchFlags.csrDependencies);
|
||||
|
||||
if (this->streamProperties.stateComputeMode.threadArbitrationPolicy.isDirty) {
|
||||
size += PreambleHelper<GfxFamily>::getThreadArbitrationCommandsSize();
|
||||
}
|
||||
|
||||
if (stallingCommandsOnNextFlushRequired) {
|
||||
size += getCmdSizeForStallingCommands(dispatchFlags);
|
||||
}
|
||||
|
@ -12,14 +12,6 @@
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
template <typename GfxFamily>
|
||||
void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
if (this->streamProperties.stateComputeMode.isDirty()) {
|
||||
EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(
|
||||
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
|
||||
hasSharedHandles(), hwInfo, isRcs());
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void CommandStreamReceiverHw<Family>::addPipeControlBeforeStateBaseAddress(LinearStream &commandStream) {
|
||||
|
Reference in New Issue
Block a user