From 5bbdd0fe2c4ed3b45f6fe017606f6b4b1bdc284b Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Thu, 4 Nov 2021 12:54:18 +0000 Subject: [PATCH] Remove DispatchFlags param from CSR methods Signed-off-by: Bartosz Dunajski --- .../gen8/command_stream_receiver_hw_tests_gen8.cpp | 3 +-- .../gen9/command_stream_receiver_hw_tests_gen9.cpp | 3 +-- shared/source/command_stream/command_stream_receiver_hw.h | 4 ++-- .../command_stream/command_stream_receiver_hw_base.inl | 6 +++--- .../command_stream_receiver_hw_bdw_and_later.inl | 2 +- .../command_stream_receiver_hw_xehp_and_later.inl | 2 +- .../source/gen12lp/command_stream_receiver_hw_gen12lp.cpp | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp b/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp index a1bcdece9e..6d10faaf4d 100644 --- a/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp +++ b/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp @@ -45,11 +45,10 @@ GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenChangedL3ConfigWhenL3IsProgramm void *buffer = alignedMalloc(bufferSize, 64); LinearStream stream(buffer, bufferSize); - DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags(); uint32_t l3Config = 0x12345678; - csr.programL3(stream, flags, l3Config); + csr.programL3(stream, l3Config); this->parseCommands(stream); diff --git a/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp b/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp index bc720bb8f4..fc92a4dbf2 100644 --- a/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp +++ b/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp @@ -39,7 +39,6 @@ GEN9TEST_F(UltCommandStreamReceiverTest, whenPreambleIsProgrammedThenStateSipCmd pDevice->setPreemptionMode(PreemptionMode::Disabled); pDevice->setDebuggerActive(true); uint32_t newL3Config; - DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags(); auto cmdSizePreamble = commandStreamReceiver.getRequiredCmdSizeForPreamble(*pDevice); StackVec preambleBuffer; @@ -47,7 +46,7 @@ GEN9TEST_F(UltCommandStreamReceiverTest, whenPreambleIsProgrammedThenStateSipCmd LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); - commandStreamReceiver.programPreamble(preambleStream, *pDevice, dispatchFlags, newL3Config); + commandStreamReceiver.programPreamble(preambleStream, *pDevice, newL3Config); this->parseCommands(preambleStream); auto itorStateSip = find(this->cmdList.begin(), this->cmdList.end()); diff --git a/shared/source/command_stream/command_stream_receiver_hw.h b/shared/source/command_stream/command_stream_receiver_hw.h index e7a55281a6..df75eeb603 100644 --- a/shared/source/command_stream/command_stream_receiver_hw.h +++ b/shared/source/command_stream/command_stream_receiver_hw.h @@ -136,8 +136,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { protected: void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags); - void programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config); - void programPreamble(LinearStream &csr, Device &device, DispatchFlags &dispatchFlags, uint32_t &newL3Config); + void programL3(LinearStream &csr, uint32_t &newL3Config); + void programPreamble(LinearStream &csr, Device &device, uint32_t &newL3Config); void programPipelineSelect(LinearStream &csr, PipelineSelectArgs &pipelineSelectArgs); void programAdditionalPipelineSelect(LinearStream &csr, PipelineSelectArgs &pipelineSelectArgs, bool is3DPipeline); void programAdditionalStateBaseAddress(LinearStream &csr, typename GfxFamily::STATE_BASE_ADDRESS &cmd, Device &device); diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index 3bca34ab5b..2c115813a7 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -343,8 +343,8 @@ CompletionStamp CommandStreamReceiverHw::flushTask( programHardwareContext(commandStreamCSR); programComputeMode(commandStreamCSR, dispatchFlags, device.getHardwareInfo()); programPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs); - programL3(commandStreamCSR, dispatchFlags, newL3Config); - programPreamble(commandStreamCSR, device, dispatchFlags, newL3Config); + programL3(commandStreamCSR, newL3Config); + programPreamble(commandStreamCSR, device, newL3Config); programMediaSampler(commandStreamCSR, dispatchFlags); addPipeControlBefore3dState(commandStreamCSR, dispatchFlags); programPerDssBackedBuffer(commandStreamCSR, device, dispatchFlags); @@ -928,7 +928,7 @@ inline void CommandStreamReceiverHw::programStateSip(LinearStream &cm } template -inline void CommandStreamReceiverHw::programPreamble(LinearStream &csr, Device &device, DispatchFlags &dispatchFlags, uint32_t &newL3Config) { +inline void CommandStreamReceiverHw::programPreamble(LinearStream &csr, Device &device, uint32_t &newL3Config) { if (!this->isPreambleSent) { PreambleHelper::programPreamble(&csr, device, newL3Config, this->requiredThreadArbitrationPolicy, this->preemptionAllocation); this->isPreambleSent = true; diff --git a/shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl b/shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl index 8d8a345700..d60abb23ac 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl @@ -21,7 +21,7 @@ template bool CommandStreamReceiverHw::are4GbHeapsAvailable() const { return true; } template -inline void CommandStreamReceiverHw::programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config) { +inline void CommandStreamReceiverHw::programL3(LinearStream &csr, uint32_t &newL3Config) { typedef typename GfxFamily::PIPE_CONTROL PIPE_CONTROL; if (csrSizeRequestFlags.l3ConfigChanged && this->isPreambleSent) { // Add a PIPE_CONTROL w/ CS_stall diff --git a/shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl b/shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl index 239e4ab47b..d885210b29 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl @@ -24,7 +24,7 @@ template bool CommandStreamReceiverHw::are4GbHeapsAvailable() const { return is64bit; } template -void CommandStreamReceiverHw::programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config) {} +void CommandStreamReceiverHw::programL3(LinearStream &csr, uint32_t &newL3Config) {} template size_t CommandStreamReceiverHw::getRequiredStateBaseAddressSize(const Device &device) const { diff --git a/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp b/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp index 5be9c88f58..3f79fbc1b5 100644 --- a/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp +++ b/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp @@ -19,7 +19,7 @@ namespace NEO { static auto gfxCore = IGFX_GEN12LP_CORE; template <> -void CommandStreamReceiverHw::programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config) { +void CommandStreamReceiverHw::programL3(LinearStream &csr, uint32_t &newL3Config) { } template <>