/* * Copyright (C) 2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_stream/linear_stream.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/direct_submission/dispatchers/render_dispatcher.h" #include "shared/source/helpers/hw_helper.h" namespace NEO { template void RenderDispatcher::dispatchPreemption(LinearStream &cmdBuffer) { PreemptionHelper::programCmdStream(cmdBuffer, PreemptionMode::MidBatch, PreemptionMode::Disabled, nullptr); } template size_t RenderDispatcher::getSizePreemption() { size_t size = PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode::MidBatch, PreemptionMode::Disabled); return size; } template void RenderDispatcher::dispatchMonitorFence(LinearStream &cmdBuffer, uint64_t gpuAddress, uint64_t immediateData, const HardwareInfo &hwInfo) { using POST_SYNC_OPERATION = typename GfxFamily::PIPE_CONTROL::POST_SYNC_OPERATION; MemorySynchronizationCommands::obtainPipeControlAndProgramPostSyncOperation( cmdBuffer, POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA, gpuAddress, immediateData, true, hwInfo); } template size_t RenderDispatcher::getSizeMonitorFence(const HardwareInfo &hwInfo) { size_t size = MemorySynchronizationCommands::getSizeForPipeControlWithPostSyncOperation(hwInfo); return size; } template void RenderDispatcher::dispatchCacheFlush(LinearStream &cmdBuffer, const HardwareInfo &hwInfo) { MemorySynchronizationCommands::addFullCacheFlush(cmdBuffer); } template size_t RenderDispatcher::getSizeCacheFlush(const HardwareInfo &hwInfo) { size_t size = MemorySynchronizationCommands::getSizeForFullCacheFlush(); return size; } } // namespace NEO