Refactor PIPE_CONTROL programming

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2022-08-19 15:56:22 +00:00
committed by Compute-Runtime-Automation
parent 40bc79fd6a
commit 595cfebaef
37 changed files with 80 additions and 90 deletions

View File

@@ -20,11 +20,11 @@ size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const HardwareInfo &h
std::ignore = isExtendedWARequired;
if (isBasicWARequired) {
size += sizeof(typename Family::PIPE_CONTROL);
size += MemorySynchronizationCommands<Family>::getSizeForSingleBarrier(false);
}
size += sizeof(typename Family::STATE_COMPUTE_MODE);
if (hasSharedHandles) {
size += sizeof(typename Family::PIPE_CONTROL);
size += MemorySynchronizationCommands<Family>::getSizeForSingleBarrier(false);
}
if (hwInfoConfig.is3DPipelineSelectWARequired() && isRcs) {
size += (2 * PreambleHelper<Family>::getCmdSizeForPipelineSelect(hwInfo));
@@ -37,8 +37,6 @@ inline void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronizat
LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args,
bool hasSharedHandles, const HardwareInfo &hwInfo, bool isRcs, LogicalStateHelper *logicalStateHelper) {
using PIPE_CONTROL = typename Family::PIPE_CONTROL;
NEO::EncodeWA<Family>::encodeAdditionalPipelineSelect(csr, args, true, hwInfo, isRcs);
auto &hwInfoConfig = (*HwInfoConfig::get(hwInfo.platform.eProductFamily));

View File

@@ -318,7 +318,7 @@ void programPostSyncPipeControlCommand(void *&inputAddress,
hwInfo,
flushArgs);
totalBytesProgrammed += static_cast<uint32_t>(NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(hwInfo));
totalBytesProgrammed += static_cast<uint32_t>(NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(hwInfo, flushArgs.tlbInvalidation));
}
template <typename GfxFamily>
@@ -755,9 +755,9 @@ uint64_t computeBarrierControlSectionOffset(WalkerPartitionArgs &args,
}
if (args.usePostSync) {
offset += NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(hwInfo);
offset += NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(hwInfo, false);
} else {
offset += sizeof(PIPE_CONTROL<GfxFamily>);
offset += NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForSingleBarrier(false);
}
offset += (computeTilesSynchronizationWithAtomicsSectionSize<GfxFamily>() +