/* * Copyright (C) 2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_container/command_encoder.h" #include "shared/source/helpers/hw_helper.h" #include "pipe_control_args.h" namespace NEO { template inline void MemorySynchronizationCommands::setPipeControlExtraProperties(PIPE_CONTROL &pipeControl, PipeControlArgs &args) { pipeControl.setHdcPipelineFlush(args.hdcPipelineFlush); pipeControl.setUnTypedDataPortCacheFlush(args.unTypedDataPortCacheFlush); pipeControl.setCompressionControlSurfaceCcsFlush(args.compressionControlSurfaceCcsFlush); pipeControl.setWorkloadPartitionIdOffsetEnable(args.workloadPartitionOffset); pipeControl.setAmfsFlushEnable(args.amfsFlushEnable); if (DebugManager.flags.FlushAllCaches.get()) { pipeControl.setHdcPipelineFlush(true); pipeControl.setUnTypedDataPortCacheFlush(true); pipeControl.setCompressionControlSurfaceCcsFlush(true); } if (DebugManager.flags.DoNotFlushCaches.get()) { pipeControl.setHdcPipelineFlush(false); pipeControl.setUnTypedDataPortCacheFlush(false); pipeControl.setCompressionControlSurfaceCcsFlush(false); } } template inline void MemorySynchronizationCommands::setPostSyncExtraProperties(PipeControlArgs &args, const HardwareInfo &hwInfo) { if (hwInfo.featureTable.flags.ftrLocalMemory) { args.hdcPipelineFlush = true; args.unTypedDataPortCacheFlush = true; } } template inline void MemorySynchronizationCommands::setCacheFlushExtraProperties(PipeControlArgs &args) { args.hdcPipelineFlush = true; args.unTypedDataPortCacheFlush = true; } template <> void MemorySynchronizationCommands::setPipeControlWAFlags(PIPE_CONTROL &pipeControl) { pipeControl.setCommandStreamerStallEnable(true); pipeControl.setHdcPipelineFlush(true); pipeControl.setUnTypedDataPortCacheFlush(true); } template <> bool HwHelperHw::additionalPipeControlArgsRequired() const { return true; } } // namespace NEO