mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
Refactor PIPE_CONTROL programming
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
40bc79fd6a
commit
595cfebaef
@@ -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));
|
||||
|
||||
@@ -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>() +
|
||||
|
||||
Reference in New Issue
Block a user