/* * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_container/command_encoder.h" #include "shared/source/command_stream/linear_stream.h" #include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h" #include "shared/source/helpers/definitions/command_encoder_args.h" #include "shared/source/helpers/hw_info.h" namespace NEO { template inline void BlitterDispatcher::dispatchPreemption(LinearStream &cmdBuffer) { } template inline size_t BlitterDispatcher::getSizePreemption() { size_t size = 0; return size; } template inline void BlitterDispatcher::dispatchMonitorFence(LinearStream &cmdBuffer, uint64_t gpuAddress, uint64_t immediateData, const RootDeviceEnvironment &rootDeviceEnvironment, bool useNotifyEnable, bool partitionedWorkload, bool dcFlushRequired) { NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast(&rootDeviceEnvironment)}; MiFlushArgs args{waArgs}; args.commandWithPostSync = true; args.notifyEnable = useNotifyEnable; EncodeMiFlushDW::programWithWa(cmdBuffer, gpuAddress, immediateData, args); } template inline size_t BlitterDispatcher::getSizeMonitorFence(const RootDeviceEnvironment &rootDeviceEnvironment) { EncodeDummyBlitWaArgs waArgs{false, const_cast(&rootDeviceEnvironment)}; size_t size = EncodeMiFlushDW::getCommandSizeWithWa(waArgs); return size; } template inline void BlitterDispatcher::dispatchCacheFlush(LinearStream &cmdBuffer, const RootDeviceEnvironment &rootDeviceEnvironment, uint64_t address) { dispatchTlbFlush(cmdBuffer, address, rootDeviceEnvironment); } template inline void BlitterDispatcher::dispatchTlbFlush(LinearStream &cmdBuffer, uint64_t address, const RootDeviceEnvironment &rootDeviceEnvironment) { NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast(&rootDeviceEnvironment)}; MiFlushArgs args{waArgs}; args.tlbFlush = true; args.commandWithPostSync = true; EncodeMiFlushDW::programWithWa(cmdBuffer, address, 0ull, args); } template inline size_t BlitterDispatcher::getSizeCacheFlush(const RootDeviceEnvironment &rootDeviceEnvironment) { return getSizeTlbFlush(rootDeviceEnvironment); } template inline size_t BlitterDispatcher::getSizeTlbFlush(const RootDeviceEnvironment &rootDeviceEnvironment) { EncodeDummyBlitWaArgs waArgs{false, const_cast(&rootDeviceEnvironment)}; size_t size = EncodeMiFlushDW::getCommandSizeWithWa(waArgs); return size; } } // namespace NEO