From 0ca1cdc565ff8d72086973fb7bdc5117e02569ba Mon Sep 17 00:00:00 2001 From: Mateusz Hoppe Date: Thu, 28 Jan 2021 17:30:56 +0000 Subject: [PATCH] Add State Sip end WA Related-To: NEO-5479 Signed-off-by: Mateusz Hoppe --- .../core/source/cmdqueue/cmdqueue_hw.inl | 16 +++--- .../debugger/active_debugger_fixture.h | 9 +++- .../source_level_debugger/CMakeLists.txt | 3 +- .../source_level_debugger_csr_tests.cpp | 41 ++-------------- .../source_level_debugger_csr_tests.h | 49 +++++++++++++++++++ .../command_stream_receiver_hw.h | 6 +-- .../command_stream_receiver_hw_base.inl | 13 ++--- shared/source/command_stream/preemption.h | 5 +- shared/source/command_stream/preemption.inl | 5 +- shared/source/gen11/preemption_gen11.cpp | 4 +- shared/source/gen12lp/preemption_gen12lp.cpp | 3 +- shared/source/gen8/preemption_gen8.cpp | 3 +- shared/source/gen9/preemption_gen9.cpp | 3 +- .../direct_submission_tests.cpp | 5 +- 14 files changed, 101 insertions(+), 64 deletions(-) create mode 100644 opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.h diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index fed277d819..b9438dbcf8 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -87,18 +87,19 @@ ze_result_t CommandQueueHw::executeCommandLists( constexpr size_t residencyContainerSpaceForFence = 1; constexpr size_t residencyContainerSpaceForTagWrite = 1; - const bool initialPreemptionMode = commandQueuePreemptionMode == NEO::PreemptionMode::Initial; - NEO::Device *neoDevice = device->getNEODevice(); NEO::PreemptionMode statePreemption = commandQueuePreemptionMode; auto devicePreemption = device->getDevicePreemptionMode(); + const bool initialPreemptionMode = commandQueuePreemptionMode == NEO::PreemptionMode::Initial; + const bool stateSipRequired = (initialPreemptionMode && devicePreemption == NEO::PreemptionMode::MidThread) || + (neoDevice->getDebugger() && NEO::Debugger::isDebugEnabled(internalUsage)); + if (initialPreemptionMode) { preemptionSize += NEO::PreemptionHelper::getRequiredPreambleSize(*neoDevice); } - if ((initialPreemptionMode && devicePreemption == NEO::PreemptionMode::MidThread) || - (neoDevice->getDebugger() && NEO::Debugger::isDebugEnabled(internalUsage))) { + if (stateSipRequired) { preemptionSize += NEO::PreemptionHelper::getRequiredStateSipCmdSize(*neoDevice); } @@ -243,8 +244,7 @@ ze_result_t CommandQueueHw::executeCommandLists( NEO::PreemptionHelper::programCsrBaseAddress(child, *neoDevice, csr->getPreemptionAllocation()); } - if ((initialPreemptionMode && devicePreemption == NEO::PreemptionMode::MidThread) || - (neoDevice->getDebugger() && NEO::Debugger::isDebugEnabled(internalUsage))) { + if (stateSipRequired) { NEO::PreemptionHelper::programStateSip(child, *neoDevice); } @@ -330,6 +330,10 @@ ze_result_t CommandQueueHw::executeCommandLists( } } + if (stateSipRequired) { + NEO::PreemptionHelper::programStateSipEndWa(child, *neoDevice); + } + commandQueuePreemptionMode = statePreemption; if (hFence) { diff --git a/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h b/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h index 97248206ef..eb79aa24e6 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h +++ b/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -19,6 +19,7 @@ #include "level_zero/core/test/unit_tests/mocks/mock_built_ins.h" #include "level_zero/core/test/unit_tests/mocks/mock_device.h" #include "level_zero/core/test/unit_tests/mocks/mock_driver.h" +#include "level_zero/core/test/unit_tests/mocks/mock_driver_handle.h" #include "level_zero/core/test/unit_tests/mocks/mock_memory_manager.h" namespace L0 { @@ -29,8 +30,11 @@ struct ActiveDebuggerFixture { auto executionEnvironment = new NEO::ExecutionEnvironment(); auto mockBuiltIns = new MockBuiltins(); executionEnvironment->prepareRootDeviceEnvironments(1); + + hwInfo = *defaultHwInfo.get(); + executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); + executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo); debugger = new MockActiveSourceLevelDebugger(new MockOsLibrary); executionEnvironment->rootDeviceEnvironments[0]->debugger.reset(debugger); @@ -62,6 +66,7 @@ struct ActiveDebuggerFixture { NEO::MockDevice *device = nullptr; L0::Device *deviceL0; MockActiveSourceLevelDebugger *debugger = nullptr; + HardwareInfo hwInfo; }; } // namespace ult } // namespace L0 diff --git a/opencl/test/unit_test/source_level_debugger/CMakeLists.txt b/opencl/test/unit_test/source_level_debugger/CMakeLists.txt index a3f9d586e0..c4754b27df 100644 --- a/opencl/test/unit_test/source_level_debugger/CMakeLists.txt +++ b/opencl/test/unit_test/source_level_debugger/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2020 Intel Corporation +# Copyright (C) 2018-2021 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,6 +8,7 @@ set(IGDRCL_SRCS_tests_source_level_debugger ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_device_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_csr_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_csr_tests.h ${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_tests.cpp ) diff --git a/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.cpp b/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.cpp index cec85fe13b..d8e1ec2fce 100644 --- a/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.cpp +++ b/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.cpp @@ -1,10 +1,12 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.h" + #include "shared/source/source_level_debugger/source_level_debugger.h" #include "shared/test/unit_test/cmd_parse/hw_parse.h" #include "shared/test/unit_test/helpers/dispatch_flags_helper.h" @@ -13,47 +15,10 @@ #include "shared/test/unit_test/mocks/mock_os_library.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/test/unit_test/helpers/execution_environment_helper.h" -#include "opencl/test/unit_test/mocks/mock_builtins.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_csr.h" -#include "opencl/test/unit_test/mocks/mock_memory_manager.h" -#include "opencl/test/unit_test/mocks/mock_source_level_debugger.h" #include "test.h" #include -class CommandStreamReceiverWithActiveDebuggerTest : public ::testing::Test { - protected: - template - auto createCSR() { - hwInfo = nullptr; - EnvironmentWithCsrWrapper environment; - environment.setCsrType>(); - executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1); - hwInfo->capabilityTable = defaultHwInfo->capabilityTable; - hwInfo->capabilityTable.debuggerSupported = true; - - auto mockMemoryManager = new MockMemoryManager(*executionEnvironment); - executionEnvironment->memoryManager.reset(mockMemoryManager); - - executionEnvironment->rootDeviceEnvironments[0]->debugger.reset(new MockActiveSourceLevelDebugger(new MockOsLibrary)); - - device = std::make_unique(Device::create(executionEnvironment, 0)); - device->setSourceLevelDebuggerActive(true); - - return static_cast *>(device->getDefaultEngine().commandStreamReceiver); - } - - void TearDown() override { - device->setSourceLevelDebuggerActive(false); - } - - std::unique_ptr device; - ExecutionEnvironment *executionEnvironment = nullptr; - HardwareInfo *hwInfo = nullptr; -}; - HWTEST_F(CommandStreamReceiverWithActiveDebuggerTest, givenCsrWithActiveDebuggerAndDisabledPreemptionWhenFlushTaskIsCalledThenSipKernelIsMadeResident) { auto mockCsr = createCSR(); diff --git a/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.h b/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.h new file mode 100644 index 0000000000..748e78988e --- /dev/null +++ b/opencl/test/unit_test/source_level_debugger/source_level_debugger_csr_tests.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/test/unit_test/mocks/mock_os_library.h" + +#include "opencl/test/unit_test/helpers/execution_environment_helper.h" +#include "opencl/test/unit_test/mocks/mock_builtins.h" +#include "opencl/test/unit_test/mocks/mock_cl_device.h" +#include "opencl/test/unit_test/mocks/mock_csr.h" +#include "opencl/test/unit_test/mocks/mock_memory_manager.h" +#include "opencl/test/unit_test/mocks/mock_source_level_debugger.h" +#include "test.h" + +#include + +class CommandStreamReceiverWithActiveDebuggerTest : public ::testing::Test { + protected: + template + auto createCSR() { + hwInfo = nullptr; + EnvironmentWithCsrWrapper environment; + environment.setCsrType>(); + executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1); + hwInfo->capabilityTable = defaultHwInfo->capabilityTable; + hwInfo->capabilityTable.debuggerSupported = true; + + auto mockMemoryManager = new MockMemoryManager(*executionEnvironment); + executionEnvironment->memoryManager.reset(mockMemoryManager); + + executionEnvironment->rootDeviceEnvironments[0]->debugger.reset(new MockActiveSourceLevelDebugger(new MockOsLibrary)); + + device = std::make_unique(Device::create(executionEnvironment, 0)); + device->setSourceLevelDebuggerActive(true); + + return static_cast *>(device->getDefaultEngine().commandStreamReceiver); + } + + void TearDown() override { + device->setSourceLevelDebuggerActive(false); + } + + std::unique_ptr device; + ExecutionEnvironment *executionEnvironment = nullptr; + HardwareInfo *hwInfo = nullptr; +}; diff --git a/shared/source/command_stream/command_stream_receiver_hw.h b/shared/source/command_stream/command_stream_receiver_hw.h index 09fe4b40c6..38c61aaa2d 100644 --- a/shared/source/command_stream/command_stream_receiver_hw.h +++ b/shared/source/command_stream/command_stream_receiver_hw.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -51,7 +51,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { size_t getCmdsSizeForHardwareContext() const override; static void addBatchBufferEnd(LinearStream &commandStream, void **patchLocation); - void programEndingCmd(LinearStream &commandStream, void **patchLocation, bool directSubmissionEnabled); + void programEndingCmd(LinearStream &commandStream, Device &device, void **patchLocation, bool directSubmissionEnabled); void addBatchBufferStart(MI_BATCH_BUFFER_START *commandBufferMemory, uint64_t startAddress, bool secondary); static void alignToCacheLine(LinearStream &commandStream); @@ -118,7 +118,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { void programPreamble(LinearStream &csr, Device &device, DispatchFlags &dispatchFlags, uint32_t &newL3Config); void programPipelineSelect(LinearStream &csr, PipelineSelectArgs &pipelineSelectArgs); void programAdditionalPipelineSelect(LinearStream &csr, PipelineSelectArgs &pipelineSelectArgs, bool is3DPipeline); - void programEpilogue(LinearStream &csr, void **batchBufferEndLocation, DispatchFlags &dispatchFlags); + void programEpilogue(LinearStream &csr, Device &device, void **batchBufferEndLocation, DispatchFlags &dispatchFlags); void programEpliogueCommands(LinearStream &csr, const DispatchFlags &dispatchFlags); void programMediaSampler(LinearStream &csr, DispatchFlags &dispatchFlags); void programPerDssBackedBuffer(LinearStream &scr, Device &device, DispatchFlags &dispatchFlags); 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 30ed0591fe..9632956919 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -88,7 +88,7 @@ inline void CommandStreamReceiverHw::addBatchBufferEnd(LinearStream & } template -inline void CommandStreamReceiverHw::programEndingCmd(LinearStream &commandStream, void **patchLocation, bool directSubmissionEnabled) { +inline void CommandStreamReceiverHw::programEndingCmd(LinearStream &commandStream, Device &device, void **patchLocation, bool directSubmissionEnabled) { if (directSubmissionEnabled) { *patchLocation = commandStream.getSpace(sizeof(MI_BATCH_BUFFER_START)); auto bbStart = reinterpret_cast(*patchLocation); @@ -96,6 +96,7 @@ inline void CommandStreamReceiverHw::programEndingCmd(LinearStream &c addBatchBufferStart(&cmd, 0ull, false); *bbStart = cmd; } else { + PreemptionHelper::programStateSipEndWa(commandStream, device); this->addBatchBufferEnd(commandStream, patchLocation); } } @@ -515,7 +516,7 @@ CompletionStamp CommandStreamReceiverHw::flushTask( GraphicsAllocation *chainedBatchBuffer = nullptr; bool directSubmissionEnabled = isDirectSubmissionEnabled(); if (submitTask) { - programEndingCmd(commandStreamTask, &bbEndLocation, directSubmissionEnabled); + programEndingCmd(commandStreamTask, device, &bbEndLocation, directSubmissionEnabled); this->emitNoop(commandStreamTask, bbEndPaddingSize); this->alignToCacheLine(commandStreamTask); @@ -543,10 +544,10 @@ CompletionStamp CommandStreamReceiverHw::flushTask( } else if (dispatchFlags.epilogueRequired) { this->makeResident(*commandStreamCSR.getGraphicsAllocation()); } - this->programEpilogue(commandStreamCSR, &bbEndLocation, dispatchFlags); + this->programEpilogue(commandStreamCSR, device, &bbEndLocation, dispatchFlags); } else if (submitCSR) { - programEndingCmd(commandStreamCSR, &bbEndLocation, directSubmissionEnabled); + programEndingCmd(commandStreamCSR, device, &bbEndLocation, directSubmissionEnabled); this->emitNoop(commandStreamCSR, bbEndPaddingSize); this->alignToCacheLine(commandStreamCSR); DEBUG_BREAK_IF(commandStreamCSR.getUsed() > commandStreamCSR.getMaxAvailableSpace()); @@ -1094,14 +1095,14 @@ inline bool CommandStreamReceiverHw::isPipelineSelectAlreadyProgramme } template -inline void CommandStreamReceiverHw::programEpilogue(LinearStream &csr, void **batchBufferEndLocation, DispatchFlags &dispatchFlags) { +inline void CommandStreamReceiverHw::programEpilogue(LinearStream &csr, Device &device, void **batchBufferEndLocation, DispatchFlags &dispatchFlags) { if (dispatchFlags.epilogueRequired) { auto currentOffset = ptrDiff(csr.getSpace(0u), csr.getCpuBase()); auto gpuAddress = ptrOffset(csr.getGraphicsAllocation()->getGpuAddress(), currentOffset); addBatchBufferStart(reinterpret_cast(*batchBufferEndLocation), gpuAddress, false); this->programEpliogueCommands(csr, dispatchFlags); - programEndingCmd(csr, batchBufferEndLocation, isDirectSubmissionEnabled()); + programEndingCmd(csr, device, batchBufferEndLocation, isDirectSubmissionEnabled()); this->alignToCacheLine(csr); } } diff --git a/shared/source/command_stream/preemption.h b/shared/source/command_stream/preemption.h index a7dfe42e16..6e6a35df3b 100644 --- a/shared/source/command_stream/preemption.h +++ b/shared/source/command_stream/preemption.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -61,6 +61,9 @@ class PreemptionHelper { template static void programStateSip(LinearStream &preambleCmdStream, Device &device); + template + static void programStateSipEndWa(LinearStream &cmdStream, Device &device); + template static size_t getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); diff --git a/shared/source/command_stream/preemption.inl b/shared/source/command_stream/preemption.inl index a80b26fc5a..ec64697afb 100644 --- a/shared/source/command_stream/preemption.inl +++ b/shared/source/command_stream/preemption.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -45,6 +45,9 @@ void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device & } } +template +void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device) {} + template void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr) { diff --git a/shared/source/gen11/preemption_gen11.cpp b/shared/source/gen11/preemption_gen11.cpp index aa86259420..c4a30a3421 100644 --- a/shared/source/gen11/preemption_gen11.cpp +++ b/shared/source/gen11/preemption_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -23,4 +23,6 @@ template size_t PreemptionHelper::getPreemptionWaCsSize(const Device template void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream, const Device &device); template void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, const Device &device); template void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA *idd, PreemptionMode preemptionMode); +template void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device); + } // namespace NEO diff --git a/shared/source/gen12lp/preemption_gen12lp.cpp b/shared/source/gen12lp/preemption_gen12lp.cpp index b956885e5e..ae9ec91abd 100644 --- a/shared/source/gen12lp/preemption_gen12lp.cpp +++ b/shared/source/gen12lp/preemption_gen12lp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -23,4 +23,5 @@ template size_t PreemptionHelper::getPreemptionWaCsSize(const Device template void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream, const Device &device); template void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, const Device &device); template void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA *idd, PreemptionMode preemptionMode); +template void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device); } // namespace NEO diff --git a/shared/source/gen8/preemption_gen8.cpp b/shared/source/gen8/preemption_gen8.cpp index e29ce2ffae..557a9d1975 100644 --- a/shared/source/gen8/preemption_gen8.cpp +++ b/shared/source/gen8/preemption_gen8.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -108,4 +108,5 @@ void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTER } template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); +template void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device); } // namespace NEO diff --git a/shared/source/gen9/preemption_gen9.cpp b/shared/source/gen9/preemption_gen9.cpp index 456957d857..96767407a7 100644 --- a/shared/source/gen9/preemption_gen9.cpp +++ b/shared/source/gen9/preemption_gen9.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,5 +72,6 @@ template void PreemptionHelper::programCsrBaseAddress(LinearStream &p template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device); template size_t PreemptionHelper::getRequiredStateSipCmdSize(const Device &device); template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); +template void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device); } // namespace NEO diff --git a/shared/test/unit_test/direct_submission/direct_submission_tests.cpp b/shared/test/unit_test/direct_submission/direct_submission_tests.cpp index 8726369995..380de2b02a 100644 --- a/shared/test/unit_test/direct_submission/direct_submission_tests.cpp +++ b/shared/test/unit_test/direct_submission/direct_submission_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -865,7 +865,8 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionAvailableWhenProgrammingEndi void *location = nullptr; uint8_t buffer[128]; mockCsr->commandStream.replaceBuffer(&buffer[0], 128u); - mockCsr->programEndingCmd(mockCsr->commandStream, &location, ret); + auto &device = *pDevice; + mockCsr->programEndingCmd(mockCsr->commandStream, device, &location, ret); EXPECT_EQ(sizeof(MI_BATCH_BUFFER_START), mockCsr->commandStream.getUsed()); DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags();