diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index af1ae27716..7ac326266e 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -20,7 +20,6 @@ namespace NEO { enum class MemoryPool; enum class ImageType; -class LogicalStateHelper; } // namespace NEO namespace L0 { @@ -296,7 +295,6 @@ struct CommandListCoreFamily : CommandListImp { void addFlushRequiredCommand(bool flushOperationRequired, Event *signalEvent); void handlePostSubmissionState(); - virtual void createLogicalStateHelper(); void setupFillKernelArguments(size_t baseOffset, size_t patternSize, size_t dstSize, diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 25207acfba..9937d84a94 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -21,7 +21,6 @@ #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/kernel_helpers.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/preamble.h" #include "shared/source/helpers/register_offsets.h" @@ -245,15 +244,9 @@ ze_result_t CommandListCoreFamily::initialize(Device *device, NEO enableInOrderExecution(); } - createLogicalStateHelper(); return returnType; } -template -void CommandListCoreFamily::createLogicalStateHelper() { - this->nonImmediateLogicalStateHelper.reset(NEO::LogicalStateHelper::create()); -} - template ze_result_t CommandListCoreFamily::executeCommandListImmediate(bool performMigration) { return executeCommandListImmediateImpl(performMigration, this->cmdQImmediate); @@ -2799,10 +2792,8 @@ void CommandListCoreFamily::updateStreamPropertiesForRegularComma containsAnyKernel = true; } - auto logicalStateHelperBlock = !getLogicalStateHelper(); - finalStreamState.pipelineSelect.setPropertySystolicMode(kernelAttributes.flags.usesSystolicPipelineSelectMode); - if (this->pipelineSelectStateTracking && finalStreamState.pipelineSelect.isDirty() && logicalStateHelperBlock) { + if (this->pipelineSelectStateTracking && finalStreamState.pipelineSelect.isDirty()) { NEO::PipelineSelectArgs pipelineSelectArgs; pipelineSelectArgs.systolicPipelineSelectMode = kernelAttributes.flags.usesSystolicPipelineSelectMode; pipelineSelectArgs.systolicPipelineSelectSupport = this->systolicModeSupport; @@ -2814,11 +2805,11 @@ void CommandListCoreFamily::updateStreamPropertiesForRegularComma finalStreamState.frontEndState.setPropertiesComputeDispatchAllWalkerEnableDisableEuFusion(isCooperative, fusedEuDisabled); bool isPatchingVfeStateAllowed = (NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get() || (this->frontEndStateTracking && this->dispatchCmdListBatchBufferAsPrimary)); - if (logicalStateHelperBlock && finalStreamState.frontEndState.isDirty()) { + if (finalStreamState.frontEndState.isDirty()) { if (isPatchingVfeStateAllowed) { auto frontEndStateAddress = NEO::PreambleHelper::getSpaceForVfeState(commandContainer.getCommandStream(), device->getHwInfo(), engineGroupType); auto frontEndStateCmd = new VFE_STATE_TYPE; - NEO::PreambleHelper::programVfeState(frontEndStateCmd, rootDeviceEnvironment, 0, 0, device->getMaxNumHwThreads(), finalStreamState, nullptr); + NEO::PreambleHelper::programVfeState(frontEndStateCmd, rootDeviceEnvironment, 0, 0, device->getMaxNumHwThreads(), finalStreamState); commandsToPatch.push_back({frontEndStateAddress, frontEndStateCmd, CommandToPatch::FrontEndState}); } if (this->frontEndStateTracking && !this->dispatchCmdListBatchBufferAsPrimary) { @@ -2839,14 +2830,14 @@ void CommandListCoreFamily::updateStreamPropertiesForRegularComma } else { finalStreamState.stateComputeMode.setPropertiesAll(cmdListDefaultCoherency, kernelAttributes.numGrfRequired, kernelAttributes.threadArbitrationPolicy, device->getDevicePreemptionMode()); } - if (finalStreamState.stateComputeMode.isDirty() && logicalStateHelperBlock) { + if (finalStreamState.stateComputeMode.isDirty()) { bool isRcs = (this->engineGroupType == NEO::EngineGroupType::RenderCompute); NEO::PipelineSelectArgs pipelineSelectArgs; pipelineSelectArgs.systolicPipelineSelectMode = kernelAttributes.flags.usesSystolicPipelineSelectMode; pipelineSelectArgs.systolicPipelineSelectSupport = this->systolicModeSupport; NEO::EncodeComputeMode::programComputeModeCommandWithSynchronization( - *commandContainer.getCommandStream(), finalStreamState.stateComputeMode, pipelineSelectArgs, false, rootDeviceEnvironment, isRcs, this->dcFlushSupport, nullptr); + *commandContainer.getCommandStream(), finalStreamState.stateComputeMode, pipelineSelectArgs, false, rootDeviceEnvironment, isRcs, this->dcFlushSupport); } finalStreamState.stateBaseAddress.setPropertyStatelessMocs(currentMocsState); @@ -2861,7 +2852,7 @@ void CommandListCoreFamily::updateStreamPropertiesForRegularComma finalStreamState.stateBaseAddress.setPropertiesIndirectState(currentIndirectObjectBaseAddress, currentIndirectObjectSize); } - if (logicalStateHelperBlock && this->stateBaseAddressTracking && finalStreamState.stateBaseAddress.isDirty()) { + if (this->stateBaseAddressTracking && finalStreamState.stateBaseAddress.isDirty()) { commandContainer.setDirtyStateForAllHeaps(false); programStateBaseAddress(commandContainer, true); finalStreamState.stateBaseAddress.clearIsDirty(); diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h index e48375b44f..edea867ac5 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h @@ -167,9 +167,6 @@ struct CommandListCoreFamilyImmediate : public CommandListCoreFamily::CommandListCoreFamilyImmediate(ui computeFlushMethod = &CommandListCoreFamilyImmediate::flushRegularTask; } -template -NEO::LogicalStateHelper *CommandListCoreFamilyImmediate::getLogicalStateHelper() const { - return this->csr->getLogicalStateHelper(); -} - template void CommandListCoreFamilyImmediate::checkAvailableSpace(uint32_t numEvents, bool hasRelaxedOrderingDependencies, size_t commandSize) { this->commandContainer.fillReusableAllocationLists(); diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl b/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl index e0a488e81e..26e648f0b3 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl @@ -195,7 +195,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K this->dcFlushSupport // dcFlushEnable }; - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, getLogicalStateHelper()); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); if (!this->isFlushTaskSubmissionEnabled) { this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs; } diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl index a4e3b45c88..aac6153161 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl @@ -308,7 +308,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K } } - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, getLogicalStateHelper()); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); if (!this->isFlushTaskSubmissionEnabled) { this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs; diff --git a/level_zero/core/source/cmdlist/cmdlist_imp.cpp b/level_zero/core/source/cmdlist/cmdlist_imp.cpp index 1d416e1f0f..c85da7297b 100644 --- a/level_zero/core/source/cmdlist/cmdlist_imp.cpp +++ b/level_zero/core/source/cmdlist/cmdlist_imp.cpp @@ -14,7 +14,6 @@ #include "shared/source/helpers/engine_control.h" #include "shared/source/helpers/engine_node_helper.h" #include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/indirect_heap/indirect_heap.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/level_zero/core/source/cmdlist/cmdlist_imp.h b/level_zero/core/source/cmdlist/cmdlist_imp.h index be3d1f0f94..f49b350da5 100644 --- a/level_zero/core/source/cmdlist/cmdlist_imp.h +++ b/level_zero/core/source/cmdlist/cmdlist_imp.h @@ -12,10 +12,6 @@ #include -namespace NEO { -class LogicalStateHelper; -} - namespace L0 { struct CommandListImp : CommandList { @@ -32,7 +28,6 @@ struct CommandListImp : CommandList { virtual void appendMultiPartitionPrologue(uint32_t partitionDataSize) = 0; virtual void appendMultiPartitionEpilogue() = 0; - virtual NEO::LogicalStateHelper *getLogicalStateHelper() const { return nonImmediateLogicalStateHelper.get(); } void setStreamPropertiesDefaultSettings(NEO::StreamProperties &streamProperties); void enableInOrderExecution(); bool isInOrderExecutionEnabled() const { return inOrderExecutionEnabled; } @@ -41,7 +36,6 @@ struct CommandListImp : CommandList { const std::vector &peekMappedEventList() { return mappedTsEventList; } protected: - std::unique_ptr nonImmediateLogicalStateHelper; NEO::GraphicsAllocation *inOrderDependencyCounterAllocation = nullptr; uint32_t inOrderDependencyCounter = 0; uint32_t inOrderAllocationOffset = 0; diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.h b/level_zero/core/source/cmdqueue/cmdqueue_hw.h index b5ce518a85..cda72a0c31 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.h +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.h @@ -158,8 +158,6 @@ struct CommandQueueHw : public CommandQueueImp { inline void makeRayTracingBufferResident(NEO::GraphicsAllocation *rtBuffer); inline void programActivePartitionConfig(bool isProgramActivePartitionConfigRequired, NEO::LinearStream &commandStream); - inline void encodeKernelArgsBufferAndMakeItResident(); - inline void writeCsrStreamInlineIfLogicalStateHelperAvailable(NEO::LinearStream &commandStream); inline void programOneCmdListFrontEndIfDirty(CommandListExecutionContext &ctx, NEO::LinearStream &commandStream, CommandListRequiredStateChange &cmdListRequiredState); @@ -169,7 +167,6 @@ struct CommandQueueHw : public CommandQueueImp { inline void programLastCommandListReturnBbStart( NEO::LinearStream &commandStream, CommandListExecutionContext &ctx); - inline void mergeOneCmdListPipelinedState(CommandList *commandList); inline void programFrontEndAndClearDirtyFlag(bool shouldFrontEndBeProgrammed, CommandListExecutionContext &ctx, NEO::LinearStream &commandStream, diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index b6a2ac18cd..baa1181fa2 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -22,7 +22,6 @@ #include "shared/source/helpers/definitions/command_encoder_args.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/heap_base_address_model.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/preamble.h" @@ -149,7 +148,6 @@ ze_result_t CommandQueueHw::executeCommandListsRegular( this->makeRayTracingBufferResident(neoDevice->getRTMemoryBackedBuffer()); this->makeSbaTrackingBufferResidentIfL0DebuggerEnabled(ctx.isDebugEnabled); this->makeCsrTagAllocationResident(); - this->encodeKernelArgsBufferAndMakeItResident(); if (ctx.globalInit) { this->getTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(child); @@ -175,7 +173,7 @@ ze_result_t CommandQueueHw::executeCommandListsRegular( this->programCsrBaseAddressIfPreemptionModeInitial(ctx.isPreemptionModeInitial, child); this->programStateSip(ctx.stateSipRequired, child); this->programActivePartitionConfig(ctx.isProgramActivePartitionConfigRequired, child); - bool shouldProgramVfe = (this->csr->getLogicalStateHelper() || !frontEndTrackingEnabled()) && ctx.frontEndStateDirty; + bool shouldProgramVfe = !frontEndTrackingEnabled() && ctx.frontEndStateDirty; this->programFrontEndAndClearDirtyFlag(shouldProgramVfe, ctx, child, csr->getStreamProperties()); if (ctx.rtDispatchRequired) { @@ -184,8 +182,6 @@ ze_result_t CommandQueueHw::executeCommandListsRegular( } } - this->writeCsrStreamInlineIfLogicalStateHelperAvailable(child); - for (auto i = 0u; i < numCommandLists; ++i) { auto commandList = CommandList::fromHandle(commandListHandles[i]); @@ -207,7 +203,6 @@ ze_result_t CommandQueueHw::executeCommandListsRegular( this->patchCommands(*commandList, this->csr->getScratchSpaceController()->getScratchPatchAddress()); this->programOneCmdListBatchBufferStart(commandList, child, ctx); - this->mergeOneCmdListPipelinedState(commandList); this->prefetchMemoryToDeviceAssociatedWithCmdList(commandList); if (commandList->hasKernelWithAssert()) { @@ -279,16 +274,11 @@ ze_result_t CommandQueueHw::executeCommandListsCopyOnly( this->getTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(child); this->csr->programHardwareContext(child); - this->encodeKernelArgsBufferAndMakeItResident(); - - this->writeCsrStreamInlineIfLogicalStateHelperAvailable(child); - for (auto i = 0u; i < numCommandLists; ++i) { auto commandList = CommandList::fromHandle(phCommandLists[i]); ctx.childGpuAddressPositionBeforeDynamicPreamble = child.getCurrentGpuAddressPosition(); this->programOneCmdListBatchBufferStart(commandList, child, ctx); - this->mergeOneCmdListPipelinedState(commandList); this->prefetchMemoryToDeviceAssociatedWithCmdList(commandList); } this->migrateSharedAllocationsIfRequested(ctx.isMigrationRequested, ctx.firstCommandList); @@ -401,8 +391,7 @@ void CommandQueueHw::programFrontEnd(uint64_t scratchAddress, uin perThreadScratchSpaceSize, scratchAddress, device->getMaxNumHwThreads(), - streamProperties, - csr->getLogicalStateHelper()); + streamProperties); csr->setMediaVFEStateDirty(false); } @@ -669,9 +658,6 @@ size_t CommandQueueHw::estimateLinearStreamSizeInitial( ctx.globalInit = true; } - linearStreamSizeEstimate += NEO::EncodeKernelArgsBuffer::getKernelArgsBufferCmdsSize(this->csr->getKernelArgsBufferAllocation(), - this->csr->getLogicalStateHelper()); - return linearStreamSizeEstimate; } @@ -704,7 +690,7 @@ void CommandQueueHw::setFrontEndStateProperties(CommandListExecut if (!frontEndTrackingEnabled()) { streamProperties.frontEndState.setPropertiesAll(ctx.anyCommandListWithCooperativeKernels, ctx.anyCommandListRequiresDisabledEUFusion, true, isEngineInstanced); - ctx.frontEndStateDirty |= (streamProperties.frontEndState.isDirty() && !this->csr->getLogicalStateHelper()); + ctx.frontEndStateDirty |= streamProperties.frontEndState.isDirty(); } else { ctx.engineInstanced = isEngineInstanced; } @@ -902,8 +888,7 @@ void CommandQueueHw::programCsrBaseAddressIfPreemptionModeInitial NEO::Device *neoDevice = this->device->getNEODevice(); NEO::PreemptionHelper::programCsrBaseAddress(cmdStream, *neoDevice, - this->csr->getPreemptionAllocation(), - this->csr->getLogicalStateHelper()); + this->csr->getPreemptionAllocation()); } template @@ -912,7 +897,7 @@ void CommandQueueHw::programStateSip(bool isStateSipRequired, NEO return; } NEO::Device *neoDevice = this->device->getNEODevice(); - NEO::PreemptionHelper::programStateSip(cmdStream, *neoDevice, this->csr->getLogicalStateHelper(), &this->csr->getOsContext()); + NEO::PreemptionHelper::programStateSip(cmdStream, *neoDevice, &this->csr->getOsContext()); this->csr->setSipSentFlag(true); } @@ -987,22 +972,6 @@ void CommandQueueHw::programActivePartitionConfig( csrHw->programActivePartitionConfig(cmdStream); } -template -void CommandQueueHw::encodeKernelArgsBufferAndMakeItResident() { - NEO::EncodeKernelArgsBuffer::encodeKernelArgsBufferCmds(this->csr->getKernelArgsBufferAllocation(), - this->csr->getLogicalStateHelper()); - if (this->csr->getKernelArgsBufferAllocation()) { - this->csr->makeResident(*this->csr->getKernelArgsBufferAllocation()); - } -} - -template -void CommandQueueHw::writeCsrStreamInlineIfLogicalStateHelperAvailable(NEO::LinearStream &cmdStream) { - if (this->csr->getLogicalStateHelper()) { - this->csr->getLogicalStateHelper()->writeStreamInline(cmdStream, false); - } -} - template void CommandQueueHw::programOneCmdListBatchBufferStart(CommandList *commandList, NEO::LinearStream &commandStream, CommandListExecutionContext &ctx) { if (this->dispatchCmdListBatchBufferAsPrimary) { @@ -1112,16 +1081,6 @@ void CommandQueueHw::programLastCommandListReturnBbStart( } } -template -void CommandQueueHw::mergeOneCmdListPipelinedState(CommandList *commandList) { - - bool isCommandListImmediate = (commandList->getCmdListType() == CommandList::CommandListType::TYPE_IMMEDIATE) ? true : false; - auto commandListImp = static_cast(commandList); - if (!isCommandListImmediate && commandListImp->getLogicalStateHelper()) { - this->csr->getLogicalStateHelper()->mergePipelinedState(*commandListImp->getLogicalStateHelper()); - } -} - template void CommandQueueHw::collectPrintfContentsFromCommandsList( CommandList *commandList) { @@ -1240,7 +1199,7 @@ NEO::SubmissionStatus CommandQueueHw::prepareAndSubmitBatchBuffer *(MI_BATCH_BUFFER_END *)buffer = GfxFamily::cmdInitBatchBufferEnd; } - if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get() || csr->getLogicalStateHelper()) { + if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get()) { cleanLeftoverMemory(outerCommandStream, innerCommandStream); } else if (this->alignedChildStreamPadding) { void *paddingPtr = innerCommandStream.getSpace(this->alignedChildStreamPadding); @@ -1436,7 +1395,7 @@ void CommandQueueHw::programRequiredStateComputeModeForCommandLis NEO::EncodeComputeMode::programComputeModeCommandWithSynchronization(commandStream, cmdListRequired.requiredState.stateComputeMode, pipelineSelectArgs, false, device->getNEODevice()->getRootDeviceEnvironment(), this->csr->isRcs(), - this->csr->getDcFlushSupport(), nullptr); + this->csr->getDcFlushSupport()); this->csr->setStateComputeModeDirty(false); } } diff --git a/level_zero/core/source/gen11/cmdlist_gen11.h b/level_zero/core/source/gen11/cmdlist_gen11.h index d189df141a..8cd67a306c 100644 --- a/level_zero/core/source/gen11/cmdlist_gen11.h +++ b/level_zero/core/source/gen11/cmdlist_gen11.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #pragma once #include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/logical_state_helper.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" diff --git a/level_zero/core/source/gen12lp/cmdlist_gen12lp.h b/level_zero/core/source/gen12lp/cmdlist_gen12lp.h index 87766e734c..f4b7c26d8a 100644 --- a/level_zero/core/source/gen12lp/cmdlist_gen12lp.h +++ b/level_zero/core/source/gen12lp/cmdlist_gen12lp.h @@ -8,7 +8,6 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" #include "shared/source/gen12lp/hw_info.h" -#include "shared/source/helpers/logical_state_helper.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" diff --git a/level_zero/core/source/gen9/cmdlist_gen9.h b/level_zero/core/source/gen9/cmdlist_gen9.h index 0966fa8796..044befd16c 100644 --- a/level_zero/core/source/gen9/cmdlist_gen9.h +++ b/level_zero/core/source/gen9/cmdlist_gen9.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,7 +9,6 @@ #include "shared/source/gen9/hw_cmds.h" #include "shared/source/gen9/hw_info.h" -#include "shared/source/helpers/logical_state_helper.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" diff --git a/level_zero/core/source/xe_hp_core/cmdlist_xe_hp_core.h b/level_zero/core/source/xe_hp_core/cmdlist_xe_hp_core.h index 36f37b599e..3d5140ded1 100644 --- a/level_zero/core/source/xe_hp_core/cmdlist_xe_hp_core.h +++ b/level_zero/core/source/xe_hp_core/cmdlist_xe_hp_core.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/xe_hp_core/hw_cmds_base.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" diff --git a/level_zero/core/source/xe_hpc_core/cmdlist_xe_hpc_core.h b/level_zero/core/source/xe_hpc_core/cmdlist_xe_hpc_core.h index 875029b18d..9fbc398eb8 100644 --- a/level_zero/core/source/xe_hpc_core/cmdlist_xe_hpc_core.h +++ b/level_zero/core/source/xe_hpc_core/cmdlist_xe_hpc_core.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" diff --git a/level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.h b/level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.h index 8ce89df830..8ac86e4d33 100644 --- a/level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.h +++ b/level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #pragma once -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" diff --git a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h index 70013eda73..0f183660fc 100644 --- a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h +++ b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h @@ -6,7 +6,6 @@ */ #pragma once -#include "shared/source/helpers/logical_state_helper.h" #include "shared/test/common/test_macros/mock_method_macros.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h" @@ -243,7 +242,6 @@ struct WhiteBox<::L0::CommandList> : public ::L0::CommandListImp { using BaseClass::isSyncModeQueue; using BaseClass::isTbxMode; using BaseClass::minimalSizeForBcsSplit; - using BaseClass::nonImmediateLogicalStateHelper; using BaseClass::partitionCount; using BaseClass::pipelineSelectStateTracking; using BaseClass::requiredStreamState; diff --git a/level_zero/core/test/unit_tests/sources/assert/test_assert.cpp b/level_zero/core/test/unit_tests/sources/assert/test_assert.cpp index 7592269ebb..272998b65c 100644 --- a/level_zero/core/test/unit_tests/sources/assert/test_assert.cpp +++ b/level_zero/core/test/unit_tests/sources/assert/test_assert.cpp @@ -12,7 +12,6 @@ #include "shared/test/common/mocks/mock_assert_handler.h" #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_logical_state_helper.h" #include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/test.h" @@ -260,9 +259,6 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendedToAsy auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result); cmdList.cmdQImmediate = commandQueue; - auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock(); - csr.logicalStateHelper.reset(mockCsrLogicalStateHelper); - ze_group_count_t groupCount{1, 1, 1}; kernel.descriptor.kernelAttributes.flags.usesAssert = true; @@ -296,9 +292,6 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendedToSyn auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result); cmdList.cmdQImmediate = commandQueue; - auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock(); - csr.logicalStateHelper.reset(mockCsrLogicalStateHelper); - ze_group_count_t groupCount{1, 1, 1}; kernel.descriptor.kernelAttributes.flags.usesAssert = true; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp index 7051d2fa00..16fca5cec5 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp @@ -82,20 +82,6 @@ TEST_F(ContextCommandListCreate, givenInvalidDescWhenCreatingCommandListImmediat EXPECT_EQ(CommandList::fromHandle(hCommandList), nullptr); } -HWTEST2_F(ContextCommandListCreate, givenImmediateCmdListWhenGettingLogicalStateHelperThenReturnFromCsr, MatchAny) { - ze_command_queue_desc_t desc = {}; - ze_command_list_handle_t hCommandList = {}; - - ze_result_t result = context->createCommandListImmediate(device, &desc, &hCommandList); - EXPECT_EQ(ZE_RESULT_SUCCESS, result); - - auto commandList = static_cast *>(L0::CommandList::fromHandle(hCommandList)); - - EXPECT_EQ(whiteboxCast(commandList)->csr->getLogicalStateHelper(), commandList->getLogicalStateHelper()); - - commandList->destroy(); -} - using CommandListCreate = Test; TEST_F(CommandListCreate, whenCommandListIsCreatedWithInvalidProductFamilyThenFailureIsReturned) { diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp index edd66d12c4..ca5840f11b 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp @@ -200,7 +200,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenA false, false, commandList->getDcFlushRequired(true)}; - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, commandList->getLogicalStateHelper()); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); auto usedSpaceAfter = commandContainer.getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, 0u); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp index 8c9184296f..ff9d78645f 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp @@ -642,7 +642,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenA false, false, commandList->getDcFlushRequired(true)}; - EXPECT_THROW(NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, nullptr), std::exception); + EXPECT_THROW(NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs), std::exception); } HWTEST_F(CommandListAppendLaunchKernel, givenInvalidKernelWhenAppendingThenReturnErrorInvalidArgument) { diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp index 60f15b2e17..3bcfcbfa59 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp @@ -14,7 +14,6 @@ #include "shared/test/common/mocks/mock_bindless_heaps_helper.h" #include "shared/test/common/mocks/mock_command_stream_receiver.h" #include "shared/test/common/mocks/mock_direct_submission_hw.h" -#include "shared/test/common/mocks/mock_logical_state_helper.h" #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/common/test_macros/hw_test.h" @@ -360,82 +359,6 @@ HWTEST_F(CommandQueueCreate, given100CmdListsWhenExecutingThenCommandStreamIsNot commandQueue->destroy(); } -HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperWhenExecutingThenMergeStates, IsAtMostGen12lp) { - const ze_command_queue_desc_t desc = {}; - ze_result_t returnValue; - - auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock(); - auto mockCmdListLogicalStateHelper = new NEO::LogicalStateHelperMock(); - - auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - false, - returnValue)); - auto ultCsr = static_cast *>(commandQueue->getCsr()); - ultCsr->logicalStateHelper.reset(mockCsrLogicalStateHelper); - - Mock kernel; - kernel.immutableData.device = device; - - auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); - commandList->nonImmediateLogicalStateHelper.reset(mockCmdListLogicalStateHelper); - - ze_group_count_t dispatchKernelArguments{1, 1, 1}; - CmdListKernelLaunchParams launchParams = {}; - commandList->appendLaunchKernel(kernel.toHandle(), &dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false); - commandList->close(); - - ze_command_list_handle_t cmdListHandles = commandList->toHandle(); - - commandQueue->executeCommandLists(1, &cmdListHandles, nullptr, false); - - EXPECT_EQ(1u, mockCsrLogicalStateHelper->mergePipelinedStateCounter); - EXPECT_EQ(mockCmdListLogicalStateHelper, mockCsrLogicalStateHelper->latestInputLogicalStateHelperForMerge); - EXPECT_EQ(0u, mockCmdListLogicalStateHelper->mergePipelinedStateCounter); - - commandQueue->destroy(); -} - -HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperAndImmediateCmdListWhenExecutingThenMergeStates, IsAtMostGen12lp) { - const ze_command_queue_desc_t desc = {}; - ze_result_t returnValue; - - auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock(); - - auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - true, - returnValue)); - auto ultCsr = static_cast *>(commandQueue->getCsr()); - ultCsr->logicalStateHelper.reset(mockCsrLogicalStateHelper); - - Mock kernel; - kernel.immutableData.device = device; - - auto commandList = std::unique_ptr(whiteboxCast(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue))); - - ze_group_count_t dispatchKernelArguments{1, 1, 1}; - CmdListKernelLaunchParams launchParams = {}; - commandList->appendLaunchKernel(kernel.toHandle(), &dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false); - - ze_command_list_handle_t cmdListHandles = commandList->toHandle(); - - commandQueue->executeCommandLists(1, &cmdListHandles, nullptr, false); - - EXPECT_EQ(0u, mockCsrLogicalStateHelper->mergePipelinedStateCounter); - EXPECT_EQ(nullptr, mockCsrLogicalStateHelper->latestInputLogicalStateHelperForMerge); - - commandQueue->destroy(); -} - HWTEST2_F(CommandQueueCreate, givenOutOfHostMemoryErrorFromSubmitBatchBufferWhenExecutingCommandListsThenOutOfHostMemoryIsReturned, IsAtLeastSkl) { const ze_command_queue_desc_t desc = {}; auto commandQueue = new MockCommandQueueHw(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc); diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp index 7604cf0f7a..101e12f1ed 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp @@ -291,7 +291,6 @@ using CommandQueueCommandsMultiTile = CommandQueueCommands; HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandListsThenHardwareContextIsProgrammedAndGlobalAllocationResident) { MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); - csr.createKernelArgsBufferAllocation(); csr.initializeTagAllocation(); csr.setupContext(*neoDevice->getDefaultEngine().osContext); @@ -321,37 +320,6 @@ HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandLi commandQueue->destroy(); } -HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandListsThenKernelArgBufferAllocationIsResident) { - MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); - csr.createKernelArgsBufferAllocation(); - csr.initializeTagAllocation(); - csr.setupContext(*neoDevice->getDefaultEngine().osContext); - - ze_result_t returnValue; - L0::CommandQueue *commandQueue = CommandQueue::create(productFamily, - device, - &csr, - &desc, - true, - false, - false, - returnValue); - ASSERT_NE(nullptr, commandQueue); - - std::unique_ptr commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, 0u, returnValue)); - auto commandListHandle = commandList->toHandle(); - commandList->close(); - - auto status = commandQueue->executeCommandLists(1, &commandListHandle, nullptr, false); - - auto kernelArgsBufferAllocation = csr.getKernelArgsBufferAllocation(); - if (kernelArgsBufferAllocation) { - EXPECT_TRUE(isAllocationInResidencyContainer(csr, kernelArgsBufferAllocation)); - } - EXPECT_EQ(status, ZE_RESULT_SUCCESS); - commandQueue->destroy(); -} - HWTEST2_F(CommandQueueCommandsMultiTile, givenCommandQueueOnMultiTileWhenExecutingCommandListsThenWorkPartitionAllocationIsMadeResident, IsAtLeastXeHpCore) { DebugManagerStateRestore restorer; DebugManager.flags.EnableWalkerPartition.set(1); @@ -371,7 +339,6 @@ HWTEST2_F(CommandQueueCommandsMultiTile, givenCommandQueueOnMultiTileWhenExecuti MyCsrMock csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); EXPECT_EQ(2u, csr.activePartitions); csr.initializeTagAllocation(); - csr.createKernelArgsBufferAllocation(); csr.createWorkPartitionAllocation(*neoDevice); csr.setupContext(*neoDevice->getDefaultEngine().osContext); @@ -433,7 +400,6 @@ HWTEST_F(CommandQueueIndirectAllocations, givenDebugModeToTreatIndirectAllocatio MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); csr.initializeTagAllocation(); - csr.createKernelArgsBufferAllocation(); csr.setupContext(*neoDevice->getDefaultEngine().osContext); if (device->getNEODevice()->getPreemptionMode() == PreemptionMode::MidThread) { csr.createPreemptionAllocation(); @@ -498,7 +464,6 @@ HWTEST_F(CommandQueueIndirectAllocations, givenDeviceThatSupportsSubmittingIndir MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); csr.initializeTagAllocation(); - csr.createKernelArgsBufferAllocation(); csr.setupContext(*neoDevice->getDefaultEngine().osContext); if (device->getNEODevice()->getPreemptionMode() == PreemptionMode::MidThread) { csr.createPreemptionAllocation(); diff --git a/level_zero/core/test/unit_tests/sources/context/test_context.cpp b/level_zero/core/test/unit_tests/sources/context/test_context.cpp index 8f32668cb1..92034fd45c 100644 --- a/level_zero/core/test/unit_tests/sources/context/test_context.cpp +++ b/level_zero/core/test/unit_tests/sources/context/test_context.cpp @@ -731,7 +731,6 @@ HWTEST_F(ContextMakeMemoryResidentAndMigrationTests, const ze_command_queue_desc_t desc = {}; MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); csr.initializeTagAllocation(); - csr.createKernelArgsBufferAllocation(); csr.setupContext(*neoDevice->getDefaultEngine().osContext); ze_result_t returnValue; @@ -784,7 +783,6 @@ HWTEST2_F(ContextMakeMemoryResidentAndMigrationTests, const ze_command_queue_desc_t desc = {}; MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); csr.initializeTagAllocation(); - csr.createKernelArgsBufferAllocation(); csr.setupContext(*neoDevice->getDefaultEngine().osContext); ze_result_t returnValue; @@ -834,7 +832,6 @@ HWTEST_F(ContextMakeMemoryResidentAndMigrationTests, const ze_command_queue_desc_t desc = {}; MockCsrHw2 csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); csr.initializeTagAllocation(); - csr.createKernelArgsBufferAllocation(); csr.setupContext(*neoDevice->getDefaultEngine().osContext); ze_result_t returnValue; diff --git a/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp index 05676e2051..ad94eaaad3 100644 --- a/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp @@ -12,7 +12,6 @@ #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "shared/test/common/mocks/mock_logical_state_helper.h" #include "shared/test/common/mocks/mock_timestamp_container.h" #include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/test_checks_shared.h" @@ -64,67 +63,6 @@ HWTEST_F(EnqueueHandlerTest, GivenCommandStreamWithoutKernelWhenCommandEnqueuedT EXPECT_EQ(allocation->getTaskCount(mockCmdQ->getGpgpuCommandStreamReceiver().getOsContext().getContextId()), 1u); } -HWTEST_F(EnqueueHandlerTest, givenLogicalStateHelperWhenDispatchingCommandsThenAddLastCommand) { - using MI_NOOP = typename FamilyType::MI_NOOP; - - auto mockCmdQ = std::make_unique>(context, pClDevice, nullptr); - auto logicalStateHelper = new LogicalStateHelperMock(); - logicalStateHelper->makeFakeStreamWrite = true; - - auto &ultCsr = static_cast &>(mockCmdQ->getGpgpuCommandStreamReceiver()); - ultCsr.logicalStateHelper.reset(logicalStateHelper); - - auto surface = std::make_unique(); - EventsRequest eventsRequest(0, nullptr, nullptr); - EventBuilder eventBuilder; - Surface *surfaces[] = {surface.get()}; - bool blocking = true; - - TimestampPacketDependencies timestampPacketDependencies; - - CsrDependencies csrDeps; - EnqueueProperties enqueueProperties(false, false, false, true, false, nullptr); - - EXPECT_EQ(0u, logicalStateHelper->writeStreamInlineCalledCounter); - - mockCmdQ->enqueueCommandWithoutKernel(surfaces, 1, &mockCmdQ->getCS(0), 0, blocking, enqueueProperties, timestampPacketDependencies, - eventsRequest, eventBuilder, 0, csrDeps, nullptr, false); - - EXPECT_EQ(1u, logicalStateHelper->writeStreamInlineCalledCounter); - - HardwareParse cmdParser; - cmdParser.parseCommands(ultCsr.commandStream); - - auto miNoop = find(cmdParser.cmdList.begin(), cmdParser.cmdList.end()); - bool miNoopFound = false; - uint32_t cmdsAfterNoop = 0; - - while (miNoop != cmdParser.cmdList.end()) { - auto miNoopCmd = genCmdCast(*miNoop); - if (miNoopCmd->getIdentificationNumber() == 0x123) { - miNoopFound = true; - break; - } - - miNoop = find(++miNoop, cmdParser.cmdList.end()); - } - - miNoop++; - - while (miNoop != cmdParser.cmdList.end()) { - auto miNoopCmd = genCmdCast(*miNoop); - - if (miNoopCmd == nullptr) { - cmdsAfterNoop++; - } - - miNoop++; - } - - EXPECT_TRUE(miNoopFound); - EXPECT_EQ(1u, cmdsAfterNoop); -} - template struct EnqueueHandlerTimestampTest : public EnqueueHandlerTest { void SetUp() override { diff --git a/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp index a9db5071fc..25d225d7a3 100644 --- a/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp @@ -790,7 +790,6 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenEnqueueK // Three more surfaces from preemptionAllocation, SipKernel and clearColorAllocation size_t csrSurfaceCount = (pDevice->getPreemptionMode() == PreemptionMode::MidThread) ? 2 : 0; csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1; - csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0; size_t timestampPacketSurfacesCount = mockCsr->peekTimestampPacketWriteEnabled() ? 1 : 0; size_t fenceSurfaceCount = mockCsr->globalFenceAllocation ? 1 : 0; size_t clearColorSize = mockCsr->clearColorAllocation ? 1 : 0; diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp index 1658f0be76..664887c879 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp @@ -1002,7 +1002,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBothCsWhenFlushingTaskThenFlu CommandStreamReceiverHwLog commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); commandStreamReceiver.setupContext(*pDevice->getDefaultEngine().osContext); commandStreamReceiver.initializeTagAllocation(); - commandStreamReceiver.createKernelArgsBufferAllocation(); commandStreamReceiver.createPreemptionAllocation(); commandStream.getSpace(sizeof(typename FamilyType::MI_NOOP)); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp index 1baadb06c8..d5cdf1caf0 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp @@ -77,7 +77,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1; csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0; csrSurfaceCount += mockCsr->clearColorAllocation ? 1 : 0; - csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0; // we should have 3 heaps, tag allocation and csr command stream + cq EXPECT_EQ(5u + csrSurfaceCount, cmdBuffer->surfaces.size()); @@ -903,7 +902,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalRes } mockCsr->initializeTagAllocation(); - mockCsr->createKernelArgsBufferAllocation(); mockCsr->useNewResourceImplicitFlush = false; mockCsr->useGpuIdleImplicitFlush = false; mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp index 728396d501..42966b1895 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp @@ -626,7 +626,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, gi csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1; csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0; csrSurfaceCount += mockCsr->clearColorAllocation ? 1 : 0; - csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0; EXPECT_EQ(4u + csrSurfaceCount, cmdBuffer->surfaces.size()); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp index c82246b064..029f0320d7 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp @@ -11,7 +11,6 @@ #include "shared/source/helpers/blit_commands_helper.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/definitions/command_encoder_args.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/os_interface/device_factory.h" #include "shared/source/os_interface/product_helper.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" @@ -474,11 +473,6 @@ HWTEST_F(UltCommandStreamReceiverTest, givenMultiplePartitionsWhenCallingWaitKmd EXPECT_EQ(2u, commandStreamReceiver.waitForCompletionWithTimeoutTaskCountCalled); } -HWTEST_F(UltCommandStreamReceiverTest, whenCreatingThenDontCreateLogicalStateHelper) { - auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); - EXPECT_EQ(nullptr, commandStreamReceiver.logicalStateHelper.get()); -} - typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTests; HWTEST_F(CommandStreamReceiverFlushTests, WhenAddingBatchBufferEndThenBatchBufferEndIsAppendedCorrectly) { diff --git a/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h b/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h index 54afdbd545..e64f35bc5f 100644 --- a/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h +++ b/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h @@ -13,7 +13,6 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/cache_policy.h" #include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/preamble.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/test/common/helpers/dispatch_flags_helper.h" @@ -158,16 +157,6 @@ struct UltCommandStreamReceiverTest commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(0, GrfConfig::DefaultGrfNumber, gfxCoreHelper.getDefaultThreadArbitrationPolicy(), pDevice->getPreemptionMode()); commandStreamReceiver.streamProperties.frontEndState.setPropertiesAll(false, false, false, -1); - - auto logicalStateHelper = commandStreamReceiver.getLogicalStateHelper(); - - if (logicalStateHelper) { - uint8_t buffer[512] = {}; - LinearStream tempStream(buffer, sizeof(buffer)); - - EncodeKernelArgsBuffer::encodeKernelArgsBufferCmds(commandStreamReceiver.getKernelArgsBufferAllocation(), logicalStateHelper); - logicalStateHelper->writeStreamInline(tempStream, false); - } } template diff --git a/opencl/test/unit_test/helpers/test_preamble_dg2_and_later.cpp b/opencl/test/unit_test/helpers/test_preamble_dg2_and_later.cpp index f7bec39026..b2ac186db8 100644 --- a/opencl/test/unit_test/helpers/test_preamble_dg2_and_later.cpp +++ b/opencl/test/unit_test/helpers/test_preamble_dg2_and_later.cpp @@ -36,7 +36,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, whenprogramVFEStateIsCalledWithProperAddi auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties properties{}; properties.frontEndState.disableOverdispatch.value = 1; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -46,7 +46,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, whenprogramVFEStateIsCalledWithProperAddi cmdList.clear(); pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); properties.frontEndState.disableOverdispatch.value = 0; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties); parseCommands(linearStream); cfeStateIt = find(cmdList.begin(), cmdList.end()); cfeStateIt++; @@ -67,7 +67,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, givenSetDebugFlagWhenPreambleCfeStateIsPr uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); diff --git a/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp b/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp index b9d4f7a9e7..183d55ffdc 100644 --- a/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp +++ b/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp @@ -146,7 +146,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, PreambleCfeStateXeHPAndLater, givenScratchEnabledWh uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties); parseCommands(linearStream); @@ -180,7 +180,7 @@ HWTEST2_F(PreambleCfeStateXeHPAndLater, givenNotSetDebugFlagWhenPreambleCfeState uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties); uint32_t maximumNumberOfThreads = cfeState->getMaximumNumberOfThreads(); if constexpr (TestTraits::numberOfWalkersInCfeStateSupported) { @@ -211,7 +211,7 @@ HWTEST2_F(PreambleCfeStateXeHPAndLater, givenSetDebugFlagWhenPreambleCfeStateIsP uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); diff --git a/opencl/test/unit_test/kernel/kernel_tests.cpp b/opencl/test/unit_test/kernel/kernel_tests.cpp index d558fded79..2406e33259 100644 --- a/opencl/test/unit_test/kernel/kernel_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_tests.cpp @@ -506,7 +506,6 @@ class CommandStreamReceiverMock : public CommandStreamReceiver { SubmissionStatus flushTagUpdate() override { return SubmissionStatus::SUCCESS; }; void updateTagFromWait() override{}; bool isUpdateTagFromWaitEnabled() override { return false; }; - void createKernelArgsBufferAllocation() override {} bool isMultiOsContextCapable() const override { return false; } diff --git a/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp index d4dbcd3601..2940aa4c72 100644 --- a/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp @@ -12,7 +12,6 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/constants.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/timestamp_packet.h" #include "shared/source/os_interface/linux/allocator_helper.h" @@ -485,9 +484,6 @@ HWTEST_F(ClDrmMemoryManagerTest, givenDrmMemoryManagerWhenTiledImageIsBeingCreat MockContext context(pClDevice); - auto testedCsr = static_cast *>(context.getSpecialQueue(rootDeviceIndex)->getGpgpuEngine().commandStreamReceiver); - testedCsr->logicalStateHelper.reset(LogicalStateHelper::create()); - cl_image_format imageFormat; imageFormat.image_channel_data_type = CL_UNORM_INT8; imageFormat.image_channel_order = CL_R; diff --git a/opencl/test/unit_test/xe_hpg_core/test_cmds_programming_xe_hpg_core.cpp b/opencl/test/unit_test/xe_hpg_core/test_cmds_programming_xe_hpg_core.cpp index 0c8c8dd6c9..d9991b298b 100644 --- a/opencl/test/unit_test/xe_hpg_core/test_cmds_programming_xe_hpg_core.cpp +++ b/opencl/test/unit_test/xe_hpg_core/test_cmds_programming_xe_hpg_core.cpp @@ -329,7 +329,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndDisabledFusedEuWhenCfeStateProgrammedThe StreamProperties streamProperties{}; streamProperties.initSupport(rootDeviceEnvironment); streamProperties.frontEndState.setPropertiesAll(false, false, false, false); - PreambleHelper::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -352,7 +352,7 @@ HWTEST2_F(PreambleCfeState, givenXehpEnabledFusedEuAndDisableFusedDispatchFromKe StreamProperties streamProperties{}; streamProperties.initSupport(rootDeviceEnvironment); streamProperties.frontEndState.setPropertiesAll(false, true, false, false); - PreambleHelper::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -372,7 +372,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndEnabledFusedEuWhenCfeStateProgrammedThen StreamProperties streamProperties{}; streamProperties.initSupport(rootDeviceEnvironment); streamProperties.frontEndState.setPropertiesAll(false, false, false, false); - PreambleHelper::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index 7512464691..88ce05f05c 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -25,7 +25,6 @@ class BindlessHeapsHelper; class Gmm; class GmmHelper; class IndirectHeap; -class LogicalStateHelper; class ProductHelper; struct DeviceInfo; @@ -94,7 +93,7 @@ struct EncodeDispatchKernel { using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA; using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE; - static void encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper); + static void encode(CommandContainer &container, EncodeDispatchKernelArgs &args); static void encodeAdditionalWalkerFields(const RootDeviceEnvironment &rootDeviceEnvironment, WALKER_TYPE &walkerCmd, const EncodeWalkerArgs &walkerArgs); @@ -357,8 +356,8 @@ struct EncodeComputeMode { static size_t getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs); static void programComputeModeCommandWithSynchronization(LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args, bool hasSharedHandles, - const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper); - static void programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper); + const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush); + static void programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment); static void adjustPipelineSelect(CommandContainer &container, const NEO::KernelDescriptor &kernelDescriptor); }; @@ -564,14 +563,7 @@ template struct EncodeMemoryFence { static size_t getSystemMemoryFenceSize(); - static void encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation, LogicalStateHelper *logicalStateHelper); -}; - -template -struct EncodeKernelArgsBuffer { - static size_t getKernelArgsBufferCmdsSize(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper); - - static void encodeKernelArgsBufferCmds(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper); + static void encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation); }; template diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index 2c13a45584..e6ab82a306 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -1094,17 +1094,9 @@ size_t EncodeMemoryFence::getSystemMemoryFenceSize() { } template -void EncodeMemoryFence::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation, LogicalStateHelper *logicalStateHelper) { +void EncodeMemoryFence::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation) { } -template -size_t EncodeKernelArgsBuffer::getKernelArgsBufferCmdsSize(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper) { - return 0; -} - -template -void EncodeKernelArgsBuffer::encodeKernelArgsBufferCmds(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper) {} - template void EncodeMiPredicate::encode(LinearStream &cmdStream, [[maybe_unused]] MiPredicateType predicateType) { if constexpr (Family::isUsingMiSetPredicate) { diff --git a/shared/source/command_container/command_encoder_bdw_and_later.inl b/shared/source/command_container/command_encoder_bdw_and_later.inl index 0abb87f988..b77301b3c7 100644 --- a/shared/source/command_container/command_encoder_bdw_and_later.inl +++ b/shared/source/command_container/command_encoder_bdw_and_later.inl @@ -47,7 +47,7 @@ void EncodeDispatchKernel::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterf } template -void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper) { +void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDispatchKernelArgs &args) { using MEDIA_STATE_FLUSH = typename Family::MEDIA_STATE_FLUSH; using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD; diff --git a/shared/source/command_container/command_encoder_xe_hpc_core_and_later.inl b/shared/source/command_container/command_encoder_xe_hpc_core_and_later.inl index ba79d6d30a..38e6587272 100644 --- a/shared/source/command_container/command_encoder_xe_hpc_core_and_later.inl +++ b/shared/source/command_container/command_encoder_xe_hpc_core_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,7 +18,7 @@ size_t EncodeMemoryFence::getSystemMemoryFenceSize() { } template <> -void EncodeMemoryFence::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation, LogicalStateHelper *logicalStateHelper) { +void EncodeMemoryFence::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation) { using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename Family::STATE_SYSTEM_MEM_FENCE_ADDRESS; auto stateSystemFenceAddressSpace = commandStream.getSpaceForCmd(); diff --git a/shared/source/command_container/command_encoder_xehp_and_later.inl b/shared/source/command_container/command_encoder_xehp_and_later.inl index 1678bc9b60..80acc56d36 100644 --- a/shared/source/command_container/command_encoder_xehp_and_later.inl +++ b/shared/source/command_container/command_encoder_xehp_and_later.inl @@ -43,7 +43,7 @@ void EncodeDispatchKernel::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterf } template -void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper) { +void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDispatchKernelArgs &args) { using SHARED_LOCAL_MEMORY_SIZE = typename Family::INTERFACE_DESCRIPTOR_DATA::SHARED_LOCAL_MEMORY_SIZE; using STATE_BASE_ADDRESS = typename Family::STATE_BASE_ADDRESS; using INLINE_DATA = typename Family::INLINE_DATA; @@ -631,7 +631,7 @@ size_t EncodeStateBaseAddress::getRequiredSizeForStateBaseAddress(Device } template -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { +void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) { using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; diff --git a/shared/source/command_container/encode_compute_mode_bdw_and_later.inl b/shared/source/command_container/encode_compute_mode_bdw_and_later.inl index 2e2b988b7c..a7d4053399 100644 --- a/shared/source/command_container/encode_compute_mode_bdw_and_later.inl +++ b/shared/source/command_container/encode_compute_mode_bdw_and_later.inl @@ -14,9 +14,9 @@ namespace NEO { template inline void EncodeComputeMode::programComputeModeCommandWithSynchronization( LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args, - bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper) { + bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush) { - EncodeComputeMode::programComputeModeCommand(csr, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(csr, properties, rootDeviceEnvironment); } template diff --git a/shared/source/command_container/encode_compute_mode_tgllp_and_later.inl b/shared/source/command_container/encode_compute_mode_tgllp_and_later.inl index 5aac9b13e6..f674430bf2 100644 --- a/shared/source/command_container/encode_compute_mode_tgllp_and_later.inl +++ b/shared/source/command_container/encode_compute_mode_tgllp_and_later.inl @@ -8,7 +8,6 @@ #pragma once #include "shared/source/command_container/command_encoder.h" #include "shared/source/command_stream/linear_stream.h" -#include "shared/source/helpers/logical_state_helper.h" namespace NEO { @@ -37,7 +36,7 @@ size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvir template inline void EncodeComputeMode::programComputeModeCommandWithSynchronization( LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args, - bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper) { + bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush) { auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); NEO::EncodeWA::encodeAdditionalPipelineSelect(csr, args, true, rootDeviceEnvironment, isRcs); auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper(); @@ -50,7 +49,7 @@ inline void EncodeComputeMode::programComputeModeCommandWithSynchronizat NEO::EncodeWA::addPipeControlPriorToNonPipelinedStateCommand(csr, args, rootDeviceEnvironment, isRcs); } - EncodeComputeMode::programComputeModeCommand(csr, properties, rootDeviceEnvironment, logicalStateHelper); + EncodeComputeMode::programComputeModeCommand(csr, properties, rootDeviceEnvironment); if (hasSharedHandles) { PipeControlArgs args; diff --git a/shared/source/command_stream/command_stream_receiver.cpp b/shared/source/command_stream/command_stream_receiver.cpp index 438ba573ac..e662a38ace 100644 --- a/shared/source/command_stream/command_stream_receiver.cpp +++ b/shared/source/command_stream/command_stream_receiver.cpp @@ -28,7 +28,6 @@ #include "shared/source/helpers/flat_batch_buffer_helper.h" #include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/ray_tracing_helper.h" #include "shared/source/helpers/string.h" @@ -380,11 +379,6 @@ void CommandStreamReceiver::cleanupResources() { workPartitionAllocation = nullptr; } - if (kernelArgsBufferAllocation) { - getMemoryManager()->freeGraphicsMemory(kernelArgsBufferAllocation); - kernelArgsBufferAllocation = nullptr; - } - if (globalStatelessHeapAllocation) { getMemoryManager()->freeGraphicsMemory(globalStatelessHeapAllocation); globalStatelessHeapAllocation = nullptr; @@ -1026,10 +1020,6 @@ void CommandStreamReceiver::printTagAddressContent(TaskCountType taskCountToWait PRINT_DEBUG_STRING(true, stdout, "%s", "\n"); } -LogicalStateHelper *CommandStreamReceiver::getLogicalStateHelper() const { - return logicalStateHelper.get(); -} - bool CommandStreamReceiver::isTbxMode() const { return (getType() == NEO::CommandStreamReceiverType::CSR_TBX || getType() == NEO::CommandStreamReceiverType::CSR_TBX_WITH_AUB); } diff --git a/shared/source/command_stream/command_stream_receiver.h b/shared/source/command_stream/command_stream_receiver.h index 690fecbcf2..7de7dc05a7 100644 --- a/shared/source/command_stream/command_stream_receiver.h +++ b/shared/source/command_stream/command_stream_receiver.h @@ -50,7 +50,6 @@ class HwPerfCounter; class HwTimeStamps; class GmmHelper; class TagAllocatorBase; -class LogicalStateHelper; class KmdNotifyHelper; class GfxCoreHelper; class ProductHelper; @@ -185,7 +184,6 @@ class CommandStreamReceiver { GraphicsAllocation *getGlobalFenceAllocation() const { return globalFenceAllocation; } GraphicsAllocation *getWorkPartitionAllocation() const { return workPartitionAllocation; } GraphicsAllocation *getGlobalStatelessHeapAllocation() const { return globalStatelessHeapAllocation; } - GraphicsAllocation *getKernelArgsBufferAllocation() const { return kernelArgsBufferAllocation; } virtual WaitStatus waitForTaskCountWithKmdNotifyFallback(TaskCountType taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, QueueThrottle throttle) = 0; virtual WaitStatus waitForCompletionWithTimeout(const WaitParams ¶ms, TaskCountType taskCountToWait); @@ -216,7 +214,6 @@ class CommandStreamReceiver { MOCKABLE_VIRTUAL bool createGlobalFenceAllocation(); MOCKABLE_VIRTUAL bool createPreemptionAllocation(); MOCKABLE_VIRTUAL bool createPerDssBackedBuffer(Device &device); - virtual void createKernelArgsBufferAllocation() = 0; [[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock obtainUniqueOwnership(); bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; } @@ -376,8 +373,6 @@ class CommandStreamReceiver { return this->dispatchMode; } - LogicalStateHelper *getLogicalStateHelper() const; - bool getPreambleSetFlag() const { return isPreambleSent; } @@ -457,7 +452,6 @@ class CommandStreamReceiver { std::unique_ptr perfCounterAllocator; std::unique_ptr timestampPacketAllocator; std::unique_ptr userPauseConfirmation; - std::unique_ptr logicalStateHelper; std::unique_ptr globalStatelessHeap; ResidencyContainer residencyAllocations; @@ -492,7 +486,6 @@ class CommandStreamReceiver { GraphicsAllocation *perDssBackedBuffer = nullptr; GraphicsAllocation *clearColorAllocation = nullptr; GraphicsAllocation *workPartitionAllocation = nullptr; - GraphicsAllocation *kernelArgsBufferAllocation = nullptr; GraphicsAllocation *globalStatelessHeapAllocation = nullptr; MultiGraphicsAllocation *tagsMultiAllocation = nullptr; diff --git a/shared/source/command_stream/command_stream_receiver_hw.h b/shared/source/command_stream/command_stream_receiver_hw.h index 3aacfcc8ed..9ec2dc9f71 100644 --- a/shared/source/command_stream/command_stream_receiver_hw.h +++ b/shared/source/command_stream/command_stream_receiver_hw.h @@ -210,7 +210,6 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { bool checkPlatformSupportsGpuIdleImplicitFlush() const; void configurePostSyncWriteOffset(); void unregisterDirectSubmissionFromController(); - void createKernelArgsBufferAllocation() override; void handleFrontEndStateTransition(const DispatchFlags &dispatchFlags); void handlePipelineSelectStateTransition(const DispatchFlags &dispatchFlags); void handleStateBaseAddressStateTransition(const DispatchFlags &dispatchFlags, bool &isStateBaseAddressDirty); 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 2c13e636d8..133b375556 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -33,7 +33,6 @@ #include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/preamble.h" #include "shared/source/helpers/ptr_math.h" @@ -82,8 +81,6 @@ CommandStreamReceiverHw::CommandStreamReceiverHw(ExecutionEnvironment timestampPacketWriteEnabled = !!DebugManager.flags.EnableTimestampPacket.get(); } - logicalStateHelper.reset(LogicalStateHelper::create()); - createScratchSpaceController(); configurePostSyncWriteOffset(); @@ -469,9 +466,7 @@ CompletionStamp CommandStreamReceiverHw::flushTask( makeResident(*perDssBackedBuffer); } - if (!logicalStateHelper) { - handleFrontEndStateTransition(dispatchFlags); - } + handleFrontEndStateTransition(dispatchFlags); auto &commandStreamCSR = this->getCS(getRequiredCmdStreamSizeAligned(dispatchFlags, device)); auto commandStreamStartCSR = commandStreamCSR.getUsed(); @@ -502,8 +497,6 @@ CompletionStamp CommandStreamReceiverHw::flushTask( programPreemption(commandStreamCSR, dispatchFlags); - EncodeKernelArgsBuffer::encodeKernelArgsBufferCmds(kernelArgsBufferAllocation, logicalStateHelper.get()); - if (dispatchFlags.isStallingCommandsOnNextFlushRequired) { if (DebugManager.flags.ProgramBarrierInCommandStreamTask.get() == 1) { programStallingCommandsForBarrier(commandStreamTask, dispatchFlags); @@ -580,19 +573,11 @@ CompletionStamp CommandStreamReceiverHw::flushTask( makeResident(*workPartitionAllocation); } - if (kernelArgsBufferAllocation) { - makeResident(*kernelArgsBufferAllocation); - } - auto rtBuffer = device.getRTMemoryBackedBuffer(); if (rtBuffer) { makeResident(*rtBuffer); } - if (logicalStateHelper) { - logicalStateHelper->writeStreamInline(commandStreamCSR, false); - } - // If the CSR has work in its CS, flush it before the task bool submitTask = commandStreamStartTask != commandStreamTask.getUsed(); bool submitCSR = (commandStreamStartCSR != commandStreamCSR.getUsed()); @@ -735,7 +720,7 @@ void CommandStreamReceiverHw::programComputeMode(LinearStream &stream if (this->streamProperties.stateComputeMode.isDirty()) { EncodeComputeMode::programComputeModeCommandWithSynchronization( stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs, - hasSharedHandles(), this->peekRootDeviceEnvironment(), isRcs(), this->dcFlushSupport, logicalStateHelper.get()); + hasSharedHandles(), this->peekRootDeviceEnvironment(), isRcs(), this->dcFlushSupport); this->setStateComputeModeDirty(false); this->streamProperties.stateComputeMode.clearIsDirty(); } @@ -937,8 +922,6 @@ size_t CommandStreamReceiverHw::getRequiredCmdStreamSize(const Dispat size += TimestampPacketHelper::getRequiredCmdStreamSize(dispatchFlags.csrDependencies, false); size += TimestampPacketHelper::getRequiredCmdStreamSizeForMultiRootDeviceSyncNodesContainer(dispatchFlags.csrDependencies); - size += EncodeKernelArgsBuffer::getKernelArgsBufferCmdsSize(kernelArgsBufferAllocation, logicalStateHelper.get()); - if (dispatchFlags.isStallingCommandsOnNextFlushRequired) { size += getCmdSizeForStallingCommands(dispatchFlags); } @@ -1007,7 +990,7 @@ inline size_t CommandStreamReceiverHw::getCmdSizeForPreemption(const template inline void CommandStreamReceiverHw::programStateSip(LinearStream &cmdStream, Device &device) { if (!this->isStateSipSent) { - PreemptionHelper::programStateSip(cmdStream, device, logicalStateHelper.get(), this->osContext); + PreemptionHelper::programStateSip(cmdStream, device, this->osContext); setSipSentFlag(true); } } @@ -1015,7 +998,7 @@ inline void CommandStreamReceiverHw::programStateSip(LinearStream &cm template inline void CommandStreamReceiverHw::programPreamble(LinearStream &csr, Device &device, uint32_t &newL3Config) { if (!this->isPreambleSent) { - PreambleHelper::programPreamble(&csr, device, newL3Config, this->preemptionAllocation, logicalStateHelper.get()); + PreambleHelper::programPreamble(&csr, device, newL3Config, this->preemptionAllocation); this->isPreambleSent = true; this->lastSentL3Config = newL3Config; } @@ -1041,7 +1024,7 @@ inline void CommandStreamReceiverHw::programVFEState(LinearStream &cs auto pVfeState = PreambleHelper::getSpaceForVfeState(&csr, hwInfo, engineGroupType); PreambleHelper::programVfeState( pVfeState, peekRootDeviceEnvironment(), requiredScratchSize, getScratchPatchAddress(), - maxFrontEndThreads, streamProperties, logicalStateHelper.get()); + maxFrontEndThreads, streamProperties); auto commandOffset = PreambleHelper::getScratchSpaceAddressOffsetForVfeState(&csr, pVfeState); if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) { @@ -1169,10 +1152,6 @@ TaskCountType CommandStreamReceiverHw::flushBcsTask(const BlitPropert pageTableManagerInitialized = pageTableManager->initPageTableManagerRegisters(this); } - if (logicalStateHelper) { - logicalStateHelper->writeStreamInline(commandStream, false); - } - if (isRelaxedOrderingDispatch) { RelaxedOrderingHelper::encodeRegistersBeforeDependencyCheckers(commandStream); } @@ -1583,10 +1562,6 @@ size_t CommandStreamReceiverHw::getCmdSizeForComputeMode() { return EncodeComputeMode::getCmdSizeForComputeMode(this->peekRootDeviceEnvironment(), hasSharedHandles(), isRcs()); } -template -void CommandStreamReceiverHw::createKernelArgsBufferAllocation() { -} - template SubmissionStatus CommandStreamReceiverHw::initializeDeviceWithFirstSubmission() { return flushTagUpdate(); @@ -1960,8 +1935,7 @@ void CommandStreamReceiverHw::dispatchImmediateFlushFrontEndCommand(I requiredScratchSize, getScratchPatchAddress(), device.getDeviceInfo().maxFrontEndThreads, - this->streamProperties, - getLogicalStateHelper()); + this->streamProperties); this->streamProperties.frontEndState.clearIsDirty(); } } @@ -1988,7 +1962,7 @@ void CommandStreamReceiverHw::dispatchImmediateFlushStateComputeModeC EncodeComputeMode::programComputeModeCommandWithSynchronization(csrStream, this->streamProperties.stateComputeMode, flushData.pipelineSelectArgs, false, peekRootDeviceEnvironment(), isRcs(), - getDcFlushSupport(), nullptr); + getDcFlushSupport()); this->streamProperties.stateComputeMode.clearIsDirty(); } } @@ -2080,8 +2054,7 @@ void CommandStreamReceiverHw::dispatchImmediateFlushOneTimeContextIni PreemptionHelper::programCmdStream(csrStream, device.getPreemptionMode(), this->getPreemptionMode(), this->getPreemptionAllocation()); PreemptionHelper::programCsrBaseAddress(csrStream, device, - getPreemptionAllocation(), - getLogicalStateHelper()); + getPreemptionAllocation()); this->setPreemptionMode(device.getPreemptionMode()); } diff --git a/shared/source/command_stream/preemption.h b/shared/source/command_stream/preemption.h index 0bd373a8bb..708a799833 100644 --- a/shared/source/command_stream/preemption.h +++ b/shared/source/command_stream/preemption.h @@ -17,7 +17,6 @@ struct RootDeviceEnvironment; class Device; class GraphicsAllocation; struct KernelDescriptor; -class LogicalStateHelper; struct RuntimeCapabilityTable; class OsContext; @@ -56,10 +55,10 @@ class PreemptionHelper { static size_t getRequiredStateSipCmdSize(Device &device, bool isRcs); template - static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); + static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr); template - static void programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); + static void programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context); template static void programStateSipEndWa(LinearStream &cmdStream, const RootDeviceEnvironment &rootDeviceEnvironment); @@ -87,10 +86,10 @@ class PreemptionHelper { protected: template - static void programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); + static void programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr); template - static void programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); + static void programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation); }; template diff --git a/shared/source/command_stream/preemption.inl b/shared/source/command_stream/preemption.inl index 87498796c1..ed66a6f376 100644 --- a/shared/source/command_stream/preemption.inl +++ b/shared/source/command_stream/preemption.inl @@ -19,16 +19,16 @@ namespace NEO { template -void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) { if (device.getPreemptionMode() == PreemptionMode::MidThread) { UNRECOVERABLE_IF(nullptr == preemptionCsr); - programCsrBaseAddressCmd(preambleCmdStream, preemptionCsr, logicalStateHelper); + programCsrBaseAddressCmd(preambleCmdStream, preemptionCsr); } } template -void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr) { using GPGPU_CSR_BASE_ADDRESS = typename GfxFamily::GPGPU_CSR_BASE_ADDRESS; auto csr = reinterpret_cast(preambleCmdStream.getSpace(sizeof(GPGPU_CSR_BASE_ADDRESS))); @@ -38,19 +38,19 @@ void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, } template -void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context) { +void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context) { using STATE_SIP = typename GfxFamily::STATE_SIP; bool debuggingEnabled = device.getDebugger() != nullptr; bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread; if (isMidThreadPreemption || debuggingEnabled) { GraphicsAllocation *sipAllocation = SipKernel::getSipKernel(device, context).getSipAllocation(); - programStateSipCmd(preambleCmdStream, sipAllocation, logicalStateHelper); + programStateSipCmd(preambleCmdStream, sipAllocation); } } template -void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation) { using STATE_SIP = typename GfxFamily::STATE_SIP; auto sip = reinterpret_cast(preambleCmdStream.getSpace(sizeof(STATE_SIP))); diff --git a/shared/source/command_stream/preemption_xehp_and_later.inl b/shared/source/command_stream/preemption_xehp_and_later.inl index 8cc373c021..ba3c1ba6a4 100644 --- a/shared/source/command_stream/preemption_xehp_and_later.inl +++ b/shared/source/command_stream/preemption_xehp_and_later.inl @@ -6,11 +6,11 @@ */ template <> -void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) { } template <> -void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context) { +void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context) { using STATE_SIP = typename GfxFamily::STATE_SIP; using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM; diff --git a/shared/source/device/device.cpp b/shared/source/device/device.cpp index 6cf392de29..a7e6bb08ff 100644 --- a/shared/source/device/device.cpp +++ b/shared/source/device/device.cpp @@ -385,8 +385,6 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa return false; } - commandStreamReceiver->createKernelArgsBufferAllocation(); - if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) { return false; } diff --git a/shared/source/device/root_device.cpp b/shared/source/device/root_device.cpp index 1a489f2f81..ec8c20e29c 100644 --- a/shared/source/device/root_device.cpp +++ b/shared/source/device/root_device.cpp @@ -70,7 +70,6 @@ void RootDevice::initializeRootCommandStreamReceiver() { rootCommandStreamReceiver->initializeTagAllocation(); rootCommandStreamReceiver->createGlobalFenceAllocation(); rootCommandStreamReceiver->createWorkPartitionAllocation(*this); - rootCommandStreamReceiver->createKernelArgsBufferAllocation(); commandStreamReceivers.push_back(std::move(rootCommandStreamReceiver)); EngineControl engine{commandStreamReceivers.back().get(), osContext}; diff --git a/shared/source/direct_submission/direct_submission_hw.cpp b/shared/source/direct_submission/direct_submission_hw.cpp index 7fca3167fd..1b1f45ec38 100644 --- a/shared/source/direct_submission/direct_submission_hw.cpp +++ b/shared/source/direct_submission/direct_submission_hw.cpp @@ -12,7 +12,6 @@ namespace NEO { DirectSubmissionInputParams::DirectSubmissionInputParams(const CommandStreamReceiver &commandStreamReceiver) : osContext(commandStreamReceiver.getOsContext()), rootDeviceEnvironment(commandStreamReceiver.peekRootDeviceEnvironment()), rootDeviceIndex(commandStreamReceiver.getRootDeviceIndex()) { memoryManager = commandStreamReceiver.getMemoryManager(); - logicalStateHelper = commandStreamReceiver.getLogicalStateHelper(); globalFenceAllocation = commandStreamReceiver.getGlobalFenceAllocation(); workPartitionAllocation = commandStreamReceiver.getWorkPartitionAllocation(); completionFenceAllocation = commandStreamReceiver.getTagAllocation(); diff --git a/shared/source/direct_submission/direct_submission_hw.h b/shared/source/direct_submission/direct_submission_hw.h index dd9f415e57..44d31a8f07 100644 --- a/shared/source/direct_submission/direct_submission_hw.h +++ b/shared/source/direct_submission/direct_submission_hw.h @@ -55,7 +55,6 @@ struct BatchBuffer; class DirectSubmissionDiagnosticsCollector; class FlushStampTracker; class GraphicsAllocation; -class LogicalStateHelper; struct HardwareInfo; class OsContext; class MemoryOperationsHandler; @@ -64,7 +63,6 @@ struct DirectSubmissionInputParams : NonCopyableClass { DirectSubmissionInputParams(const CommandStreamReceiver &commandStreamReceiver); OsContext &osContext; const RootDeviceEnvironment &rootDeviceEnvironment; - LogicalStateHelper *logicalStateHelper = nullptr; MemoryManager *memoryManager = nullptr; const GraphicsAllocation *globalFenceAllocation = nullptr; GraphicsAllocation *workPartitionAllocation = nullptr; @@ -204,7 +202,6 @@ class DirectSubmissionHw { OsContext &osContext; const uint32_t rootDeviceIndex; MemoryManager *memoryManager = nullptr; - LogicalStateHelper *logicalStateHelper = nullptr; MemoryOperationsHandler *memoryOperationHandler = nullptr; const HardwareInfo *hwInfo = nullptr; const RootDeviceEnvironment &rootDeviceEnvironment; diff --git a/shared/source/direct_submission/direct_submission_hw.inl b/shared/source/direct_submission/direct_submission_hw.inl index 3df5bef97f..ce44202079 100644 --- a/shared/source/direct_submission/direct_submission_hw.inl +++ b/shared/source/direct_submission/direct_submission_hw.inl @@ -22,7 +22,6 @@ #include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/graphics_allocation.h" @@ -45,7 +44,6 @@ DirectSubmissionHw::DirectSubmissionHw(const DirectSubmis : ringBuffers(RingBufferUse::initialRingBufferCount), osContext(inputParams.osContext), rootDeviceIndex(inputParams.rootDeviceIndex), rootDeviceEnvironment(inputParams.rootDeviceEnvironment) { memoryManager = inputParams.memoryManager; globalFenceAllocation = inputParams.globalFenceAllocation; - logicalStateHelper = inputParams.logicalStateHelper; hwInfo = inputParams.rootDeviceEnvironment.getHardwareInfo(); memoryOperationHandler = inputParams.rootDeviceEnvironment.memoryOperationsInterface.get(); @@ -1173,11 +1171,7 @@ size_t DirectSubmissionHw::getDiagnosticModeSection() { template void DirectSubmissionHw::dispatchSystemMemoryFenceAddress() { - EncodeMemoryFence::encodeSystemMemoryFence(ringCommandStream, this->globalFenceAllocation, this->logicalStateHelper); - - if (logicalStateHelper) { - logicalStateHelper->writeStreamInline(ringCommandStream, false); - } + EncodeMemoryFence::encodeSystemMemoryFence(ringCommandStream, this->globalFenceAllocation); } template diff --git a/shared/source/gen11/command_encoder_gen11.cpp b/shared/source/gen11/command_encoder_gen11.cpp index 8c0e7e752d..90f3adc98c 100644 --- a/shared/source/gen11/command_encoder_gen11.cpp +++ b/shared/source/gen11/command_encoder_gen11.cpp @@ -49,7 +49,7 @@ size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvir template <> void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, - const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { + const RootDeviceEnvironment &rootDeviceEnvironment) { using PIPE_CONTROL = typename Family::PIPE_CONTROL; if (properties.threadArbitrationPolicy.isDirty) { @@ -95,6 +95,5 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/gen11/gfx_core_helper_gen11.cpp b/shared/source/gen11/gfx_core_helper_gen11.cpp index 9793a77fbe..73428273aa 100644 --- a/shared/source/gen11/gfx_core_helper_gen11.cpp +++ b/shared/source/gen11/gfx_core_helper_gen11.cpp @@ -12,7 +12,6 @@ #include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/logical_state_helper.inl" namespace NEO { typedef Gen11Family Family; @@ -38,5 +37,4 @@ template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/gen11/hw_cmds_base.h b/shared/source/gen11/hw_cmds_base.h index 8d04785a0a..2f151cb2e8 100644 --- a/shared/source/gen11/hw_cmds_base.h +++ b/shared/source/gen11/hw_cmds_base.h @@ -19,7 +19,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct Gen11 { #include "shared/source/generated/gen11/hw_cmds_generated_gen11.inl" @@ -97,7 +96,6 @@ struct Gen11Family : public Gen11 { using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const GPGPU_WALKER cmdInitGpgpuWalker; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; diff --git a/shared/source/gen11/preemption_gen11.cpp b/shared/source/gen11/preemption_gen11.cpp index 6931ceb3a7..c8437df381 100644 --- a/shared/source/gen11/preemption_gen11.cpp +++ b/shared/source/gen11/preemption_gen11.cpp @@ -16,10 +16,10 @@ using GfxFamily = Gen11Family; template void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); template size_t PreemptionHelper::getRequiredPreambleSize(const Device &device); -template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); -template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); -template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); -template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); +template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr); +template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr); +template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context); +template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation); template size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs); template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); template size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device); diff --git a/shared/source/gen12lp/command_encoder_gen12lp.cpp b/shared/source/gen12lp/command_encoder_gen12lp.cpp index f2939398ed..72a97ef828 100644 --- a/shared/source/gen12lp/command_encoder_gen12lp.cpp +++ b/shared/source/gen12lp/command_encoder_gen12lp.cpp @@ -37,7 +37,7 @@ size_t EncodeWA::getAdditionalPipelineSelectSize(Device &device, bool is } template <> -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { +void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) { using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; @@ -134,6 +134,5 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp b/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp index a038b6a222..a82849ba98 100644 --- a/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp +++ b/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp @@ -16,7 +16,6 @@ using Family = NEO::Gen12LpFamily; #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/local_memory_access_modes.h" -#include "shared/source/helpers/logical_state_helper.inl" namespace NEO { @@ -208,6 +207,4 @@ template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; - -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/gen12lp/hw_cmds_base.h b/shared/source/gen12lp/hw_cmds_base.h index a34b217a4f..058670ec92 100644 --- a/shared/source/gen12lp/hw_cmds_base.h +++ b/shared/source/gen12lp/hw_cmds_base.h @@ -17,7 +17,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct Gen12Lp { #include "shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl" @@ -96,7 +95,6 @@ struct Gen12LpFamily : public Gen12Lp { using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const GPGPU_WALKER cmdInitGpgpuWalker; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; diff --git a/shared/source/gen12lp/preemption_gen12lp.cpp b/shared/source/gen12lp/preemption_gen12lp.cpp index 5d14eeb4ad..3c07a944b5 100644 --- a/shared/source/gen12lp/preemption_gen12lp.cpp +++ b/shared/source/gen12lp/preemption_gen12lp.cpp @@ -16,10 +16,10 @@ using GfxFamily = Gen12LpFamily; template void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); template size_t PreemptionHelper::getRequiredPreambleSize(const Device &device); -template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); -template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); -template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); -template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); +template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr); +template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr); +template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context); +template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation); template size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs); template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); template size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device); diff --git a/shared/source/gen8/command_encoder_gen8.cpp b/shared/source/gen8/command_encoder_gen8.cpp index 396abda2d0..ad8eaae55e 100644 --- a/shared/source/gen8/command_encoder_gen8.cpp +++ b/shared/source/gen8/command_encoder_gen8.cpp @@ -39,8 +39,7 @@ size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvir } template -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, - const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { +void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) { } template <> @@ -76,7 +75,6 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/gen8/gfx_core_helper_gen8.cpp b/shared/source/gen8/gfx_core_helper_gen8.cpp index bbe510f60b..f583a9145f 100644 --- a/shared/source/gen8/gfx_core_helper_gen8.cpp +++ b/shared/source/gen8/gfx_core_helper_gen8.cpp @@ -13,7 +13,6 @@ #include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/logical_state_helper.inl" namespace NEO { typedef Gen8Family Family; @@ -78,6 +77,4 @@ template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; - -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/gen8/hw_cmds_base.h b/shared/source/gen8/hw_cmds_base.h index fb9ea71d2f..1a63b00543 100644 --- a/shared/source/gen8/hw_cmds_base.h +++ b/shared/source/gen8/hw_cmds_base.h @@ -20,7 +20,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct Gen8 { #include "shared/source/generated/gen8/hw_cmds_generated_gen8.inl" @@ -98,7 +97,6 @@ struct Gen8Family : public Gen8 { using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const GPGPU_WALKER cmdInitGpgpuWalker; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; diff --git a/shared/source/gen8/preemption_gen8.cpp b/shared/source/gen8/preemption_gen8.cpp index c350c00b58..8f56ac0c1c 100644 --- a/shared/source/gen8/preemption_gen8.cpp +++ b/shared/source/gen8/preemption_gen8.cpp @@ -55,19 +55,19 @@ size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, b } template <> -void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) { } template <> -void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr) { } template <> -void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context) { +void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context) { } template <> -void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper) { +void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation) { } template <> diff --git a/shared/source/gen9/command_encoder_gen9.cpp b/shared/source/gen9/command_encoder_gen9.cpp index 9d5d7e353e..e26a252f41 100644 --- a/shared/source/gen9/command_encoder_gen9.cpp +++ b/shared/source/gen9/command_encoder_gen9.cpp @@ -40,7 +40,7 @@ size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvir template void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, - const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { + const RootDeviceEnvironment &rootDeviceEnvironment) { using PIPE_CONTROL = typename Family::PIPE_CONTROL; UNRECOVERABLE_IF(properties.threadArbitrationPolicy.value == ThreadArbitrationPolicy::NotPresent); @@ -80,6 +80,5 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/gen9/gfx_core_helper_gen9.cpp b/shared/source/gen9/gfx_core_helper_gen9.cpp index d6da94a2d2..db9ba16858 100644 --- a/shared/source/gen9/gfx_core_helper_gen9.cpp +++ b/shared/source/gen9/gfx_core_helper_gen9.cpp @@ -12,7 +12,6 @@ #include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/logical_state_helper.inl" #include @@ -49,6 +48,4 @@ template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; - -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/gen9/hw_cmds_base.h b/shared/source/gen9/hw_cmds_base.h index 7927ba5aa6..9309aac49e 100644 --- a/shared/source/gen9/hw_cmds_base.h +++ b/shared/source/gen9/hw_cmds_base.h @@ -19,7 +19,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct Gen9 { #include "shared/source/generated/gen9/hw_cmds_generated_gen9.inl" @@ -98,7 +97,6 @@ struct Gen9Family : public Gen9 { using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const GPGPU_WALKER cmdInitGpgpuWalker; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; diff --git a/shared/source/gen9/preemption_gen9.cpp b/shared/source/gen9/preemption_gen9.cpp index 10bdf5dc7f..ea56c52911 100644 --- a/shared/source/gen9/preemption_gen9.cpp +++ b/shared/source/gen9/preemption_gen9.cpp @@ -71,10 +71,10 @@ template void PreemptionHelper::programCmdStream(LinearStream &cmdStr PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); template size_t PreemptionHelper::getRequiredPreambleSize(const Device &device); -template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); -template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); -template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); -template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); +template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr); +template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr); +template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context); +template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation); template size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs); template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); template void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, const RootDeviceEnvironment &rootDeviceEnvironment); diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index cf624ad356..42561d7a69 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -110,8 +110,6 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_sse4.cpp ${CMAKE_CURRENT_SOURCE_DIR}/local_work_size.cpp ${CMAKE_CURRENT_SOURCE_DIR}/local_work_size.h - ${CMAKE_CURRENT_SOURCE_DIR}/logical_state_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/logical_state_helper.inl ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}memory_properties_helpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers_base.inl diff --git a/shared/source/helpers/logical_state_helper.h b/shared/source/helpers/logical_state_helper.h deleted file mode 100644 index dc82bfc4ac..0000000000 --- a/shared/source/helpers/logical_state_helper.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -namespace NEO { -class LinearStream; - -class LogicalStateHelper { - public: - template - static LogicalStateHelper *create(); - - virtual ~LogicalStateHelper() = default; - - virtual void writeStreamInline(LinearStream &linearStream, bool pipelinedState) = 0; - virtual void mergePipelinedState(const LogicalStateHelper &inputLogicalStateHelper) {} - - protected: - LogicalStateHelper() = default; -}; - -} // namespace NEO \ No newline at end of file diff --git a/shared/source/helpers/logical_state_helper.inl b/shared/source/helpers/logical_state_helper.inl deleted file mode 100644 index dc0eea0545..0000000000 --- a/shared/source/helpers/logical_state_helper.inl +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/logical_state_helper.h" - -namespace NEO { - -template -LogicalStateHelper *LogicalStateHelper::create() { - return nullptr; -} - -} // namespace NEO \ No newline at end of file diff --git a/shared/source/helpers/preamble.h b/shared/source/helpers/preamble.h index f9dd77fe78..40f9785fa7 100644 --- a/shared/source/helpers/preamble.h +++ b/shared/source/helpers/preamble.h @@ -19,7 +19,6 @@ class Device; struct DispatchFlags; class GraphicsAllocation; class LinearStream; -class LogicalStateHelper; struct PipelineSelectArgs; struct StreamProperties; struct RootDeviceEnvironment; @@ -34,7 +33,7 @@ struct PreambleHelper { static void programPipelineSelect(LinearStream *pCommandStream, const PipelineSelectArgs &pipelineSelectArgs, const RootDeviceEnvironment &rootDeviceEnvironment); - static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); + static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr); static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType); static void appendProgramVFEState(const RootDeviceEnvironment &rootDeviceEnvironment, const StreamProperties &streamProperties, void *cmd); static void *getSpaceForVfeState(LinearStream *pCommandStream, @@ -45,11 +44,10 @@ struct PreambleHelper { uint32_t scratchSize, uint64_t scratchAddress, uint32_t maxFrontEndThreads, - const StreamProperties &streamProperties, - LogicalStateHelper *logicalStateHelper); + const StreamProperties &streamProperties); static uint64_t getScratchSpaceAddressOffsetForVfeState(LinearStream *pCommandStream, void *pVfeState); static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config, - GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); + GraphicsAllocation *preemptionCsr); static void programSemaphoreDelay(LinearStream *pCommandStream); static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM); static bool isSystolicModeConfigurable(const RootDeviceEnvironment &rootDeviceEnvironment); diff --git a/shared/source/helpers/preamble_base.inl b/shared/source/helpers/preamble_base.inl index 03d17f2b45..efe66396f2 100644 --- a/shared/source/helpers/preamble_base.inl +++ b/shared/source/helpers/preamble_base.inl @@ -66,16 +66,16 @@ size_t PreambleHelper::getCmdSizeForPipelineSelect(const RootDeviceEn template void PreambleHelper::programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config, - GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { + GraphicsAllocation *preemptionCsr) { programL3(pCommandStream, l3Config); - programPreemption(pCommandStream, device, preemptionCsr, logicalStateHelper); + programPreemption(pCommandStream, device, preemptionCsr); programGenSpecificPreambleWorkArounds(pCommandStream, device.getHardwareInfo()); programSemaphoreDelay(pCommandStream); } template -void PreambleHelper::programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { - PreemptionHelper::programCsrBaseAddress(*pCommandStream, device, preemptionCsr, logicalStateHelper); +void PreambleHelper::programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr) { + PreemptionHelper::programCsrBaseAddress(*pCommandStream, device, preemptionCsr); } template diff --git a/shared/source/helpers/preamble_bdw_and_later.inl b/shared/source/helpers/preamble_bdw_and_later.inl index c82c04c6ec..a6b10d7d73 100644 --- a/shared/source/helpers/preamble_bdw_and_later.inl +++ b/shared/source/helpers/preamble_bdw_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -40,8 +40,7 @@ void PreambleHelper::programVfeState(void *pVfeState, uint32_t scratchSize, uint64_t scratchAddress, uint32_t maxFrontEndThreads, - const StreamProperties &streamProperties, - LogicalStateHelper *logicalStateHelper) { + const StreamProperties &streamProperties) { using MEDIA_VFE_STATE = typename GfxFamily::MEDIA_VFE_STATE; auto pMediaVfeState = reinterpret_cast(pVfeState); diff --git a/shared/source/helpers/preamble_xehp_and_later.inl b/shared/source/helpers/preamble_xehp_and_later.inl index 099ddc45ec..785af6109a 100644 --- a/shared/source/helpers/preamble_xehp_and_later.inl +++ b/shared/source/helpers/preamble_xehp_and_later.inl @@ -106,8 +106,7 @@ void PreambleHelper::programVfeState(void *pVfeState, uint32_t scratchSize, uint64_t scratchAddress, uint32_t maxFrontEndThreads, - const StreamProperties &streamProperties, - LogicalStateHelper *logicalStateHelper) { + const StreamProperties &streamProperties) { using CFE_STATE = typename Family::CFE_STATE; auto cfeState = reinterpret_cast(pVfeState); diff --git a/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp b/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp index 419a0e51c3..7e80cf4167 100644 --- a/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp @@ -101,6 +101,5 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/xe_hp_core/gfx_core_helper_xe_hp_core.cpp b/shared/source/xe_hp_core/gfx_core_helper_xe_hp_core.cpp index 4ca28a0d0b..3bddd83a02 100644 --- a/shared/source/xe_hp_core/gfx_core_helper_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/gfx_core_helper_xe_hp_core.cpp @@ -18,7 +18,6 @@ using Family = NEO::XeHpFamily; #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl" -#include "shared/source/helpers/logical_state_helper.inl" #include "shared/source/os_interface/product_helper.h" namespace NEO { @@ -154,5 +153,4 @@ template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/xe_hp_core/hw_cmds_base.h b/shared/source/xe_hp_core/hw_cmds_base.h index 5dbeac1de0..abc00200dc 100644 --- a/shared/source/xe_hp_core/hw_cmds_base.h +++ b/shared/source/xe_hp_core/hw_cmds_base.h @@ -17,7 +17,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct XeHpCore { #include "shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl" @@ -103,7 +102,6 @@ struct XeHpFamily : public XeHpCore { using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const COMPUTE_WALKER cmdInitGpgpuWalker; static const CFE_STATE cmdInitCfeState; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; diff --git a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp index 1928653bbf..2548b38a86 100644 --- a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp @@ -98,7 +98,7 @@ inline void EncodeAtomic::setMiAtomicAddress(MI_ATOMIC &atomic, uint64_t } template <> -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { +void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) { using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; @@ -344,6 +344,5 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/xe_hpc_core/command_stream_receiver_hw_xe_hpc_core.cpp b/shared/source/xe_hpc_core/command_stream_receiver_hw_xe_hpc_core.cpp index 7428e3a1fc..891b964f22 100644 --- a/shared/source/xe_hpc_core/command_stream_receiver_hw_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/command_stream_receiver_hw_xe_hpc_core.cpp @@ -39,7 +39,7 @@ template <> void CommandStreamReceiverHw::programEnginePrologue(LinearStream &csr) { if (!this->isEnginePrologueSent) { if (globalFenceAllocation) { - EncodeMemoryFence::encodeSystemMemoryFence(csr, globalFenceAllocation, nullptr); + EncodeMemoryFence::encodeSystemMemoryFence(csr, globalFenceAllocation); } this->isEnginePrologueSent = true; } diff --git a/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp b/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp index c5d1c47727..52f9d54b2d 100644 --- a/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp @@ -20,7 +20,6 @@ using Family = NEO::XeHpcCoreFamily; #include "shared/source/helpers/gfx_core_helper_pvc_and_later.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl" -#include "shared/source/helpers/logical_state_helper.inl" namespace NEO { @@ -430,6 +429,4 @@ template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; - -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h b/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h index a86c3a08c3..c802b0db03 100644 --- a/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h +++ b/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h @@ -20,7 +20,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct XeHpcCore { #include "shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl" @@ -87,7 +86,6 @@ struct XeHpcCoreFamily : public XeHpcCore { using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const COMPUTE_WALKER cmdInitGpgpuWalker; static const CFE_STATE cmdInitCfeState; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; diff --git a/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp b/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp index f6481bb0c6..29e9a5df81 100644 --- a/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp @@ -129,7 +129,7 @@ void EncodeDispatchKernel::encodeAdditionalWalkerFields(const RootDevice } template <> -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { +void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) { using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; using PIXEL_ASYNC_COMPUTE_THREAD_LIMIT = typename STATE_COMPUTE_MODE::PIXEL_ASYNC_COMPUTE_THREAD_LIMIT; @@ -239,6 +239,5 @@ template struct EncodeEnableRayTracing; template struct EncodeNoop; template struct EncodeStoreMemory; template struct EncodeMemoryFence; -template struct EncodeKernelArgsBuffer; template struct EnodeUserInterrupt; } // namespace NEO diff --git a/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp b/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp index 12fa43c114..2069e4122a 100644 --- a/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp @@ -20,7 +20,6 @@ using Family = NEO::XeHpgCoreFamily; #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl" #include "shared/source/helpers/local_memory_access_modes.h" -#include "shared/source/helpers/logical_state_helper.inl" namespace NEO { template <> @@ -187,6 +186,4 @@ template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; template struct LriHelper; - -template LogicalStateHelper *LogicalStateHelper::create(); } // namespace NEO diff --git a/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h b/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h index 7954c5412a..c0c7cea9a4 100644 --- a/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h +++ b/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h @@ -19,7 +19,6 @@ template struct CmdParse; namespace NEO { -class LogicalStateHelper; struct XeHpgCore { #include "shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl" @@ -105,7 +104,6 @@ struct XeHpgCoreFamily : public XeHpgCore { using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint32_t; - using LogicalStateHelperHw = LogicalStateHelper; static const COMPUTE_WALKER cmdInitGpgpuWalker; static const CFE_STATE cmdInitCfeState; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; diff --git a/shared/test/common/libult/ult_command_stream_receiver.h b/shared/test/common/libult/ult_command_stream_receiver.h index e2934bfb39..6be66a932d 100644 --- a/shared/test/common/libult/ult_command_stream_receiver.h +++ b/shared/test/common/libult/ult_command_stream_receiver.h @@ -43,7 +43,6 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw, publ using BaseClass::blitterDirectSubmission; using BaseClass::checkPlatformSupportsGpuIdleImplicitFlush; using BaseClass::checkPlatformSupportsNewResourceImplicitFlush; - using BaseClass::createKernelArgsBufferAllocation; using BaseClass::csrSizeRequestFlags; using BaseClass::dcFlushSupport; using BaseClass::directSubmission; @@ -60,8 +59,6 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw, publ using BaseClass::isBlitterDirectSubmissionEnabled; using BaseClass::isDirectSubmissionEnabled; using BaseClass::isPerDssBackedBufferSent; - using BaseClass::kernelArgsBufferAllocation; - using BaseClass::logicalStateHelper; using BaseClass::makeResident; using BaseClass::perDssBackedBuffer; using BaseClass::postInitFlagsSetup; diff --git a/shared/test/common/mocks/CMakeLists.txt b/shared/test/common/mocks/CMakeLists.txt index 376d6ff2e1..984cd3c7ad 100644 --- a/shared/test/common/mocks/CMakeLists.txt +++ b/shared/test/common/mocks/CMakeLists.txt @@ -70,7 +70,6 @@ set(NEO_CORE_tests_mocks ${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_l0_debugger.h - ${CMAKE_CURRENT_SOURCE_DIR}/mock_logical_state_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_operations_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_migration_sync_data.h diff --git a/shared/test/common/mocks/linux/mock_drm_command_stream_receiver.h b/shared/test/common/mocks/linux/mock_drm_command_stream_receiver.h index d77a4e82f9..8c3cd5de9c 100644 --- a/shared/test/common/mocks/linux/mock_drm_command_stream_receiver.h +++ b/shared/test/common/mocks/linux/mock_drm_command_stream_receiver.h @@ -35,7 +35,6 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver { using CommandStreamReceiverHw::postInitFlagsSetup; using CommandStreamReceiverHw::programL3; using CommandStreamReceiverHw::programVFEState; - using CommandStreamReceiverHw::createKernelArgsBufferAllocation; using CommandStreamReceiver::activePartitions; using CommandStreamReceiver::activePartitionsConfig; using CommandStreamReceiver::clearColorAllocation; diff --git a/shared/test/common/mocks/mock_device.cpp b/shared/test/common/mocks/mock_device.cpp index 25181e8503..cdd1a28508 100644 --- a/shared/test/common/mocks/mock_device.cpp +++ b/shared/test/common/mocks/mock_device.cpp @@ -96,7 +96,6 @@ void MockDevice::resetCommandStreamReceiver(CommandStreamReceiver *newCsr, uint3 commandStreamReceivers[engineIndex].reset(newCsr); commandStreamReceivers[engineIndex]->initializeTagAllocation(); commandStreamReceivers[engineIndex]->createGlobalFenceAllocation(); - commandStreamReceivers[engineIndex]->createKernelArgsBufferAllocation(); if (preemptionMode == PreemptionMode::MidThread) { commandStreamReceivers[engineIndex]->createPreemptionAllocation(); diff --git a/shared/test/common/mocks/mock_logical_state_helper.h b/shared/test/common/mocks/mock_logical_state_helper.h deleted file mode 100644 index 7e8219cb33..0000000000 --- a/shared/test/common/mocks/mock_logical_state_helper.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/helpers/logical_state_helper.h" - -namespace NEO { - -template -class LogicalStateHelperMock : public LogicalStateHelper { - public: - LogicalStateHelperMock() : LogicalStateHelper() { - } - - void writeStreamInline(LinearStream &linearStream, bool pipelinedState) override { - writeStreamInlineCalledCounter++; - - if (makeFakeStreamWrite) { - auto cmd = GfxFamily::cmdInitNoop; - cmd.setIdentificationNumber(0x123); - - auto cmdBuffer = linearStream.getSpaceForCmd(); - *cmdBuffer = cmd; - } - } - - void mergePipelinedState(const LogicalStateHelper &inputLogicalStateHelper) override { - mergePipelinedStateCounter++; - - latestInputLogicalStateHelperForMerge = &inputLogicalStateHelper; - } - - const LogicalStateHelper *latestInputLogicalStateHelperForMerge = nullptr; - uint32_t writeStreamInlineCalledCounter = 0; - uint32_t mergePipelinedStateCounter = 0; - bool makeFakeStreamWrite = false; -}; -} // namespace NEO diff --git a/shared/test/common/os_interface/linux/drm_memory_manager_fixture.cpp b/shared/test/common/os_interface/linux/drm_memory_manager_fixture.cpp index 14cc8847ff..286526e8ba 100644 --- a/shared/test/common/os_interface/linux/drm_memory_manager_fixture.cpp +++ b/shared/test/common/os_interface/linux/drm_memory_manager_fixture.cpp @@ -93,10 +93,7 @@ void DrmMemoryManagerFixture::tearDown() { mock->ioctlExpected.gemClose += enginesCount; mock->ioctlExpected.gemWait += enginesCount; } - if (csr->getKernelArgsBufferAllocation()) { - mock->ioctlExpected.gemClose += enginesCount; - mock->ioctlExpected.gemWait += enginesCount; - } + mock->ioctlExpected.gemWait += additionalDestroyDeviceIoctls.gemWait.load(); mock->ioctlExpected.gemClose += additionalDestroyDeviceIoctls.gemClose.load(); delete device; diff --git a/shared/test/common/source_level_debugger/source_level_debugger_preamble_test.inl b/shared/test/common/source_level_debugger/source_level_debugger_preamble_test.inl index 11a1cf3461..851daaa1be 100644 --- a/shared/test/common/source_level_debugger/source_level_debugger_preamble_test.inl +++ b/shared/test/common/source_level_debugger/source_level_debugger_preamble_test.inl @@ -20,7 +20,7 @@ void SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDebu preambleBuffer.resize(cmdSizePreemptionMidThread); LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); - PreemptionHelper::programStateSip(preambleStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programStateSip(preambleStream, *mockDevice, nullptr); HardwareParse hwParser; hwParser.parseCommands(preambleStream); @@ -44,7 +44,7 @@ void SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDisa preambleBuffer.resize(cmdSizePreemptionMidThread); LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); - PreemptionHelper::programStateSip(preambleStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programStateSip(preambleStream, *mockDevice, nullptr); HardwareParse hwParser; hwParser.parseCommands(preambleStream); @@ -69,7 +69,7 @@ void SourceLevelDebuggerPreambleTest::givenPreemptionDisabledAndDebug preambleBuffer.resize(cmdSizePreemptionMidThread); LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); - PreemptionHelper::programStateSip(preambleStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programStateSip(preambleStream, *mockDevice, nullptr); HardwareParse hwParser; hwParser.parseCommands(preambleStream); diff --git a/shared/test/unit_test/encoders/test_command_encoder.cpp b/shared/test/unit_test/encoders/test_command_encoder.cpp index a164a860a1..2a8c414188 100644 --- a/shared/test/unit_test/encoders/test_command_encoder.cpp +++ b/shared/test/unit_test/encoders/test_command_encoder.cpp @@ -185,7 +185,7 @@ HWTEST_F(CommandEncoderTest, givenPlatformSupportingMiMemFenceWhenEncodingThenPr size_t size = EncodeMemoryFence::getSystemMemoryFenceSize(); - EncodeMemoryFence::encodeSystemMemoryFence(cmdStream, &allocation, nullptr); + EncodeMemoryFence::encodeSystemMemoryFence(cmdStream, &allocation); if constexpr (FamilyType::isUsingMiMemFence) { using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename FamilyType::STATE_SYSTEM_MEM_FENCE_ADDRESS; diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp index e57ec668c9..5ee17f4450 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp @@ -56,7 +56,7 @@ HWTEST_F(CommandEncodeStatesTest, givenDispatchInterfaceWhenDispatchKernelThenWa dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); } - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -75,7 +75,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenDebugFlagSetWhenProgr bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -100,7 +100,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -127,7 +127,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -154,7 +154,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -182,7 +182,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -209,7 +209,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -233,7 +233,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWithUsedAvailableSizeWhen bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto cmdBuffersCountAfter = cmdContainer->getCmdBufferAllocations().size(); @@ -251,7 +251,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterThan bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); auto &gfxcoreHelper = this->getHelper(); @@ -268,7 +268,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, whenDispatchingKernelThenSe EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -286,7 +286,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDebuggingEnabledAndAss dispatchInterface->kernelDescriptor.kernelAttributes.flags.usesAssert = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); EXPECT_TRUE(interfaceDescriptorData->getSoftwareExceptionEnable()); @@ -303,7 +303,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroW bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -337,7 +337,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenOneBindingTableEntryWh bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -367,7 +367,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhen bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -398,7 +398,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDispa dispatchArgs.surfaceStateHeap = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE); dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -433,7 +433,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersZeroWhenDisp bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -459,7 +459,7 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsCountsWhenDispatchingKerne EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isIndirect = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -488,7 +488,7 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsSizeWhenDispatchingKernelT EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isIndirect = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -530,7 +530,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); @@ -563,7 +563,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); @@ -591,7 +591,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); @@ -622,7 +622,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -641,7 +641,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -668,7 +668,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsAndSlmNotCha bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -692,7 +692,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsWhenDispatch EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.dcFlushEnable = MemorySynchronizationCommands::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList cmdList; CmdParse::parseCommandBuffer(cmdList, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -732,7 +732,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmChange bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -757,7 +757,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNextIddInBlockZeroWhenD bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -787,7 +787,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNextIddInBlockZeroWhenD bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -824,7 +824,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenHeapI dshBeforeFlush->getSpace(dshBeforeFlush->getAvailableSpace() - NEO::EncodeDispatchKernel::getSizeRequiredDsh(kernelDescriptor, cmdContainer->getNumIddPerBlock())); auto cpuBaseBeforeFlush = dshBeforeFlush->getCpuBase(); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -879,7 +879,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneAndNextID auto cpuBaseBeforeFlush = dshBeforeFlush->getCpuBase(); auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -913,7 +913,7 @@ HWTEST_F(CommandEncodeStatesTest, givenPauseOnEnqueueSetToNeverWhenEncodingWalke std::list cmdsToPatch; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.additionalCommands = &cmdsToPatch; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_EQ(cmdsToPatch.size(), 0u); } @@ -929,7 +929,7 @@ HWTEST_F(CommandEncodeStatesTest, givenPauseOnEnqueueSetToAlwaysWhenEncodingWalk std::list cmdsToPatch; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.additionalCommands = &cmdsToPatch; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_EQ(cmdsToPatch.size(), 4u); } @@ -961,7 +961,7 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindfulKernelWhenDispatchingKernelThenS if (EncodeDispatchKernel::isDshNeeded(pDevice->getDeviceInfo())) { dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); } - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); @@ -990,7 +990,7 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindlessKernelWhenDispatchingKernelThen auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); @@ -1050,7 +1050,7 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_EQ(pattern, *patchLocation); @@ -1078,7 +1078,7 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching memset(ioh->getCpuBase(), 0, ioh->getMaxAvailableSpace()); dispatchArgs.dispatchInterface = dispatchInterface.get(); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_TRUE(memoryZeroed(ptrOffset(ioh->getCpuBase(), iohOffset), ioh->getMaxAvailableSpace() - iohOffset)); } @@ -1312,7 +1312,7 @@ HWTEST_F(BindlessCommandEncodeStatesContainerTest, givenBindlessKernelAndBindles EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); } @@ -1349,7 +1349,7 @@ HWTEST_F(BindlessCommandEncodeStatesContainerTest, givenBindfulKernelWhenBindles EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); } @@ -1388,7 +1388,7 @@ HWTEST2_F(NgenGeneratorDispatchKernelEncodeTest, givenBindfulKernelAndIsNotGener EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); if (isGeneratedByIgc) { EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); @@ -1489,6 +1489,6 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWhenIsKernelDispatchedFro bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isKernelDispatchedFromImmediateCmdList = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_NE(0u, cmdContainer->getHeapWithRequiredSizeAndAlignmentCalled); } \ No newline at end of file diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.cpp index a009f3a2f8..86fc5d7c0e 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.cpp @@ -37,7 +37,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeAndPVCA dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -62,7 +62,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeThenMoc dispatchArgs.isTimestampEvent = true; dispatchArgs.dcFlushEnable = MemorySynchronizationCommands::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -131,7 +131,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenOverridePreferredSlmAllocatio bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp index a3d6ab07c7..ca9963903b 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp @@ -40,7 +40,7 @@ HWTEST2_F(CommandEncodeStatesTestPvcAndLater, givenOverrideSlmTotalSizeDebugVari cmdContainer->reset(); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -87,7 +87,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTestPvcAndLater, givenCommandCon StreamProperties streamProperties{}; streamProperties.initSupport(rootDeviceEnvironment); streamProperties.stateComputeMode.setPropertiesAll(false, GrfConfig::LargeGrfNumber, 0u, PreemptionMode::Disabled); - EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp index 68df0f6bd0..cf4bbbcd48 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp @@ -47,7 +47,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterTha bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -74,7 +74,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenXeHpAndLaterWhenDispa EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -101,7 +101,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenXeHpDebuggingEnabledA EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -125,7 +125,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSimdSizeWhenDispatchi bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -148,7 +148,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZero bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -182,7 +182,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenOverrideSlmTotalSizeD cmdContainer->reset(); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -220,7 +220,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenStatelessBufferAndIma bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -257,7 +257,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givennumBindingTableOneWhe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -294,7 +294,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -349,7 +349,7 @@ HWTEST2_F(CommandEncodeStatesTest, giveNumSamplersOneWhenDispatchKernelThensampl dispatchArgs.surfaceStateHeap = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE); dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -381,7 +381,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAllocationWhenDi dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -406,7 +406,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAddressWhenEncod dispatchArgs.isTimestampEvent = true; dispatchArgs.dcFlushEnable = MemorySynchronizationCommands::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -432,7 +432,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenCleanHeapsWhenDispatc bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -473,7 +473,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -507,7 +507,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -532,7 +532,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -579,7 +579,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredWhe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -606,7 +606,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredIsF bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -633,7 +633,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredAnd bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -662,7 +662,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredAnd bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -1070,7 +1070,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesImplicitScaling, dispatchArgs.eventAddress = eventAddress; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); size_t usedBuffer = cmdContainer->getCommandStream()->getUsed(); EXPECT_EQ(2u, dispatchArgs.partitionCount); @@ -1103,7 +1103,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesImplicitScaling, givenCooperativ dispatchArgs.isInternal = isInternal; dispatchArgs.isCooperative = isCooperative; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); size_t containerUsedAfterBase = cmdContainer->getCommandStream()->getUsed(); @@ -1145,7 +1145,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isInternal = isInternal; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); size_t containerUsedAfterBase = cmdContainer->getCommandStream()->getUsed(); @@ -1158,7 +1158,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp EXPECT_EQ(16u, baseWalkerCmd->getThreadGroupIdXDimension()); dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); size_t total = cmdContainer->getCommandStream()->getUsed(); size_t partitionedWalkerSize = total - containerUsedAfterBase; @@ -1209,7 +1209,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp dispatchArgs.partitionCount = 2; dispatchArgs.dcFlushEnable = MemorySynchronizationCommands::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_EQ(2u, dispatchArgs.partitionCount); size_t partitionedWalkerSize = cmdContainer->getCommandStream()->getUsed(); @@ -1308,7 +1308,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, dispatchArgs.isInternal = isInternal; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_EQ(2u, dispatchArgs.partitionCount); size_t partitionedWalkerSize = cmdContainer->getCommandStream()->getUsed(); @@ -1366,7 +1366,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp dispatchArgs.isInternal = isInternal; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); size_t internalWalkerSize = cmdContainer->getCommandStream()->getUsed(); @@ -1393,7 +1393,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenNonTimestampEventWhen dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -1419,7 +1419,7 @@ HWTEST2_F(CommandEncodeStatesTest, bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -1449,7 +1449,7 @@ HWTEST2_F(CommandEncodeStatesTest, bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -1476,7 +1476,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -1514,7 +1514,7 @@ struct CommandEncodeStatesImplicitScalingPrimaryBufferFixture : public CommandEn dispatchArgs.eventAddress = eventAddress; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*BaseClass::cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*BaseClass::cmdContainer.get(), dispatchArgs); size_t usedBuffer = BaseClass::cmdContainer->getCommandStream()->getUsed(); EXPECT_EQ(2u, dispatchArgs.partitionCount); diff --git a/shared/test/unit_test/encoders/test_encode_grf_mode_xe_hp_and_later.cpp b/shared/test/unit_test/encoders/test_encode_grf_mode_xe_hp_and_later.cpp index ae0e1bb1e7..75f73bb607 100644 --- a/shared/test/unit_test/encoders/test_encode_grf_mode_xe_hp_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_grf_mode_xe_hp_and_later.cpp @@ -26,7 +26,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenCommandContainerWhenN auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); streamProperties.initSupport(rootDeviceEnvironment); streamProperties.stateComputeMode.setPropertiesAll(false, GrfConfig::DefaultGrfNumber, 0u, PreemptionMode::Disabled); - EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -64,7 +64,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenLargeGrfModeProgrammedThenExpectedComman StreamProperties streamProperties{}; streamProperties.initSupport(rootDeviceEnvironment); streamProperties.stateComputeMode.setPropertiesAll(false, 256u, 0u, PreemptionMode::Disabled); - NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); auto usedSpaceAfter = cmdContainer->getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, usedSpaceBefore); @@ -86,7 +86,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenLargeGrfModeDisabledThenExpectedCommands StreamProperties streamProperties{}; streamProperties.stateComputeMode.largeGrfMode.set(0); auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); - NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); auto usedSpaceAfter = cmdContainer->getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, usedSpaceBefore); @@ -192,7 +192,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenLargeGrfModeEnabledThenExpectedCommandsA StreamProperties streamProperties{}; streamProperties.stateComputeMode.largeGrfMode.set(1); auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); - NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); auto usedSpaceAfter = cmdContainer->getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, usedSpaceBefore); @@ -236,7 +236,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenLargeGrfModeEnabledAndDisabledThenExpect StreamProperties streamProperties{}; streamProperties.stateComputeMode.largeGrfMode.set(1); auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); - NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); auto usedSpaceAfter = cmdContainer->getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, usedSpaceBefore); @@ -270,7 +270,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenLargeGrfModeEnabledAndDisabledThenExpect usedSpaceBefore = cmdContainer->getCommandStream()->getUsed(); NEO::EncodeComputeMode::adjustPipelineSelect(*cmdContainer, descriptor); streamProperties.stateComputeMode.largeGrfMode.set(0); - NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment); usedSpaceAfter = cmdContainer->getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, usedSpaceBefore); diff --git a/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp b/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp index cd46befe55..50e30a1331 100644 --- a/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp @@ -304,7 +304,7 @@ HWTEST2_F(CommandEncodeStatesXeHpcAndLaterTests, givenDebugFlagSetWhenProgrammin bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); diff --git a/shared/test/unit_test/encoders/test_encode_states.cpp b/shared/test/unit_test/encoders/test_encode_states.cpp index 5e04663257..bcc46691cd 100644 --- a/shared/test/unit_test/encoders/test_encode_states.cpp +++ b/shared/test/unit_test/encoders/test_encode_states.cpp @@ -456,7 +456,7 @@ HWTEST2_F(CommandEncodeStatesTest, whenProgramComputeModeCommandModeIsCalledThen streamProperties.stateComputeMode.threadArbitrationPolicy.isDirty = true; auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), - streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + streamProperties.stateComputeMode, rootDeviceEnvironment); if constexpr (TestTraits::programComputeModeCommandProgramsThreadArbitrationPolicy) { GenCmdList commands; @@ -482,7 +482,7 @@ HWTEST2_F(CommandEncodeStatesTest, whenProgramComputeModeCommandModeIsCalledThen streamProperties.stateComputeMode.isCoherencyRequired.isDirty = true; auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer->getCommandStream(), - streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + streamProperties.stateComputeMode, rootDeviceEnvironment); if constexpr (TestTraits::programComputeModeCommandProgramsNonCoherent) { GenCmdList commands; diff --git a/shared/test/unit_test/gen11/test_preamble_gen11.cpp b/shared/test/unit_test/gen11/test_preamble_gen11.cpp index 6954814270..eb99bc3d58 100644 --- a/shared/test/unit_test/gen11/test_preamble_gen11.cpp +++ b/shared/test/unit_test/gen11/test_preamble_gen11.cpp @@ -60,7 +60,7 @@ GEN11TEST_F(Gen11PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgramm LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); parseCommands(cs); @@ -80,7 +80,7 @@ GEN11TEST_F(Gen11PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammi LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); parseCommands(cs); @@ -121,8 +121,7 @@ GEN11TEST_F(ThreadArbitrationGen11, givenPreambleWhenItIsProgrammedThenThreadArb LinearStream &cs = linearStream; uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); MockDevice mockDevice; - PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, - nullptr, nullptr); + PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, nullptr); parseCommands(cs); @@ -145,7 +144,7 @@ GEN11TEST_F(ThreadArbitrationGen11, whenThreadArbitrationPolicyIsProgrammedThenC MockDevice mockDevice; StreamProperties streamProperties{}; streamProperties.stateComputeMode.threadArbitrationPolicy.set(ThreadArbitrationPolicy::RoundRobin); - EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, mockDevice.getRootDeviceEnvironment(), nullptr); + EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, mockDevice.getRootDeviceEnvironment()); parseCommands(cs); diff --git a/shared/test/unit_test/gen11/test_preemption_gen11.cpp b/shared/test/unit_test/gen11/test_preemption_gen11.cpp index c8f4b7386b..38c0b49066 100644 --- a/shared/test/unit_test/gen11/test_preemption_gen11.cpp +++ b/shared/test/unit_test/gen11/test_preemption_gen11.cpp @@ -57,7 +57,7 @@ GEN11TEST_F(Gen11PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSip ASSERT_LE(requiredCmdStreamSize, streamStorage.size()); LinearStream cmdStream{streamStorage.begin(), streamStorage.size()}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); HardwareParse hwParsePreamble; hwParsePreamble.parseCommands(cmdStream); diff --git a/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp index 1b3737920f..a2ef853fc9 100644 --- a/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp @@ -45,7 +45,7 @@ GEN12LPTEST_F(CommandEncoderTest, WhenAdjustComputeModeIsCalledThenStateComputeM properties.initSupport(rootDeviceEnvironment); properties.stateComputeMode.setPropertiesAll(false, GrfConfig::DefaultGrfNumber, 0, PreemptionMode::Disabled); NEO::EncodeComputeMode::programComputeModeCommand(*cmdContainer.getCommandStream(), - properties.stateComputeMode, rootDeviceEnvironment, nullptr); + properties.stateComputeMode, rootDeviceEnvironment); auto usedSpaceAfter = cmdContainer.getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, usedSpaceBefore); diff --git a/shared/test/unit_test/gen12lp/test_encode_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_encode_gen12lp.cpp index 88f259a885..2e4726937d 100644 --- a/shared/test/unit_test/gen12lp/test_encode_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/test_encode_gen12lp.cpp @@ -23,14 +23,14 @@ GEN12LPTEST_F(CommandEncodeGen12LpTest, whenProgrammingStateComputeModeThenPrope auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0]; StateComputeModeProperties properties; auto pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(FamilyType::stateComputeModeForceNonCoherentMask, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT, pScm->getForceNonCoherent()); properties.isCoherencyRequired.value = 1; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(FamilyType::stateComputeModeForceNonCoherentMask, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent()); diff --git a/shared/test/unit_test/gen12lp/test_preamble_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_preamble_gen12lp.cpp index f8a6e3d57c..81437aecc2 100644 --- a/shared/test/unit_test/gen12lp/test_preamble_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/test_preamble_gen12lp.cpp @@ -24,8 +24,7 @@ HWTEST2_F(TglLpSlm, givenTglLpWhenPreambleIsBeingProgrammedThenThreadArbitration LinearStream &cs = linearStream; uint32_t l3Config = PreambleHelper::getL3Config(pDevice->getHardwareInfo(), true); MockDevice mockDevice; - PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, - nullptr, nullptr); + PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, nullptr); parseCommands(cs); @@ -58,7 +57,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgramm LinearStream &cs = linearStream; auto vfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(vfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 672u, emptyProperties, nullptr); + PreambleHelper::programVfeState(vfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 672u, emptyProperties); parseCommands(cs); @@ -80,7 +79,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenCcsEngineWhenWaIsSetThenAppropriatePipeC auto vfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::Compute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(vfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 672u, emptyProperties, nullptr); + PreambleHelper::programVfeState(vfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 672u, emptyProperties); parseCommands(cs); @@ -101,7 +100,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenRcsEngineWhenWaIsSetThenAppropriatePipeC auto vfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(vfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 672u, emptyProperties, nullptr); + PreambleHelper::programVfeState(vfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 672u, emptyProperties); parseCommands(cs); diff --git a/shared/test/unit_test/gen12lp/test_preemption_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_preemption_gen12lp.cpp index 97800821a3..9022689a6f 100644 --- a/shared/test/unit_test/gen12lp/test_preemption_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/test_preemption_gen12lp.cpp @@ -35,7 +35,7 @@ GEN12LPTEST_F(Gen12LpPreemptionTests, whenProgramStateSipIsCalledThenStateSipCmd LinearStream cmdStream{streamStorage.begin(), streamStorage.size()}; EXPECT_NE(0U, requiredSize); - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); EXPECT_NE(0U, cmdStream.getUsed()); } diff --git a/shared/test/unit_test/gen8/test_preamble_gen8.cpp b/shared/test/unit_test/gen8/test_preamble_gen8.cpp index 6c51103f93..5d2c0977bd 100644 --- a/shared/test/unit_test/gen8/test_preamble_gen8.cpp +++ b/shared/test/unit_test/gen8/test_preamble_gen8.cpp @@ -69,7 +69,7 @@ BDWTEST_F(ThreadArbitrationGen8, givenPolicyWhenThreadArbitrationProgrammedThenD auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; StreamProperties streamProperties{}; streamProperties.stateComputeMode.threadArbitrationPolicy.set(ThreadArbitrationPolicy::RoundRobin); - EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, rootDeviceEnvironment); EXPECT_EQ(0u, cs.getUsed()); @@ -97,7 +97,7 @@ BDWTEST_F(PreambleVfeState, WhenProgrammingVfeStateThenProgrammingIsCorrect) { LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); parseCommands(cs); diff --git a/shared/test/unit_test/gen8/test_preemption_gen8.cpp b/shared/test/unit_test/gen8/test_preemption_gen8.cpp index c0476bb11d..56543c04c3 100644 --- a/shared/test/unit_test/gen8/test_preemption_gen8.cpp +++ b/shared/test/unit_test/gen8/test_preemption_gen8.cpp @@ -34,7 +34,7 @@ GEN8TEST_F(Gen8PreemptionTests, whenProgramStateSipIsCalledThenNoCmdsAreProgramm EXPECT_EQ(0U, requiredSize); LinearStream cmdStream{nullptr, 0}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); EXPECT_EQ(0U, cmdStream.getUsed()); } diff --git a/shared/test/unit_test/gen9/preamble_tests_gen9.cpp b/shared/test/unit_test/gen9/preamble_tests_gen9.cpp index b34806484a..446ca11f1b 100644 --- a/shared/test/unit_test/gen9/preamble_tests_gen9.cpp +++ b/shared/test/unit_test/gen9/preamble_tests_gen9.cpp @@ -60,8 +60,7 @@ GEN9TEST_F(ThreadArbitrationGen9, givenPreambleWhenItIsProgrammedThenThreadArbit LinearStream &cs = linearStream; uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); MockDevice mockDevice; - PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, - nullptr, nullptr); + PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, nullptr); parseCommands(cs); @@ -88,7 +87,7 @@ GEN9TEST_F(ThreadArbitrationGen9, whenThreadArbitrationPolicyIsProgrammedThenCor MockDevice mockDevice; StreamProperties streamProperties{}; streamProperties.stateComputeMode.threadArbitrationPolicy.set(ThreadArbitrationPolicy::RoundRobin); - EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, mockDevice.getRootDeviceEnvironment(), nullptr); + EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, mockDevice.getRootDeviceEnvironment()); parseCommands(cs); diff --git a/shared/test/unit_test/gen9/test_preamble_gen9.cpp b/shared/test/unit_test/gen9/test_preamble_gen9.cpp index 9155389f0b..43c3be367b 100644 --- a/shared/test/unit_test/gen9/test_preamble_gen9.cpp +++ b/shared/test/unit_test/gen9/test_preamble_gen9.cpp @@ -97,7 +97,7 @@ GEN9TEST_F(PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsC LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); parseCommands(cs); @@ -117,7 +117,7 @@ GEN9TEST_F(PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammingIsCo LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); parseCommands(cs); diff --git a/shared/test/unit_test/gen9/test_preemption_gen9.cpp b/shared/test/unit_test/gen9/test_preemption_gen9.cpp index 4995256e17..cda31e330b 100644 --- a/shared/test/unit_test/gen9/test_preemption_gen9.cpp +++ b/shared/test/unit_test/gen9/test_preemption_gen9.cpp @@ -41,7 +41,7 @@ GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNot EXPECT_EQ(0U, requiredSize); LinearStream cmdStream{nullptr, 0}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); EXPECT_EQ(0U, cmdStream.getUsed()); } @@ -63,7 +63,7 @@ GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSipIs ASSERT_LE(requiredCmdStreamSize, streamStorage.size()); LinearStream cmdStream{streamStorage.begin(), streamStorage.size()}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); HardwareParse hwParsePreamble; hwParsePreamble.parseCommands(cmdStream); @@ -152,7 +152,7 @@ GEN9TEST_F(Gen9PreemptionTests, givenMidThreadPreemptionModeWhenStateSipIsProgra preemptionBuffer.resize(cmdSizePreemptionMidThread); LinearStream preemptionStream(&*preemptionBuffer.begin(), preemptionBuffer.size()); - PreemptionHelper::programStateSip(preemptionStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programStateSip(preemptionStream, *mockDevice, nullptr); HardwareParse hwParserOnlyPreemption; hwParserOnlyPreemption.parseCommands(preemptionStream, 0); diff --git a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp index 5b68898025..61423d471c 100644 --- a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp +++ b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp @@ -12,7 +12,6 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/preamble.h" #include "shared/source/helpers/string.h" @@ -1360,12 +1359,6 @@ HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenFlagSetAndCallGetAmountOfAlloc EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 1u); } -using LogicalStateHelperTest = ::testing::Test; - -HWTEST_F(LogicalStateHelperTest, whenCreatingLogicalStateHelperThenReturnNullptr) { - EXPECT_EQ(nullptr, LogicalStateHelper::create()); -} - HWTEST2_F(GfxCoreHelperTest, GivenVariousValuesAndXeHpOrXeHpgCoreWhenCallingCalculateAvailableThreadCountThenCorrectValueIsReturned, IsXeHpOrXeHpgCore) { std::array, 3> grfTestInputs = {{{64, 8}, {128, 8}, diff --git a/shared/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp b/shared/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp index b4cc0051bd..409177d90e 100644 --- a/shared/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp @@ -566,7 +566,6 @@ HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenCsrWhenDispatchPolicyIsSe size_t csrSurfaceCount = (device->getPreemptionMode() == PreemptionMode::MidThread) ? 2 : 0; csrSurfaceCount += testedCsr->globalFenceAllocation ? 1 : 0; csrSurfaceCount += testedCsr->clearColorAllocation ? 1 : 0; - csrSurfaceCount += testedCsr->getKernelArgsBufferAllocation() ? 1 : 0; auto recordedCmdBuffer = cmdBuffers.peekHead(); EXPECT_EQ(3u + csrSurfaceCount, recordedCmdBuffer->surfaces.size()); @@ -641,7 +640,6 @@ HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenRecordedCommandBufferWhen size_t csrSurfaceCount = (device->getPreemptionMode() == PreemptionMode::MidThread) ? 2 : 0; csrSurfaceCount += testedCsr->globalFenceAllocation ? 1 : 0; csrSurfaceCount += testedCsr->clearColorAllocation ? 1 : 0; - csrSurfaceCount += testedCsr->getKernelArgsBufferAllocation() ? 1 : 0; // validate that submited command buffer has what we want EXPECT_EQ(3u + csrSurfaceCount, this->mock->execBuffer.getBufferCount()); diff --git a/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp b/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp index aea16a2019..70864aa71e 100644 --- a/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp @@ -899,7 +899,6 @@ HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenI csrSurfaceCount = 2; } csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0; - csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0; mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch); mockCsr->useNewResourceImplicitFlush = false; @@ -954,9 +953,6 @@ HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenI if (csr->getGlobalFenceAllocation()) { expectedHandles.push_back(static_cast(csr->getGlobalFenceAllocation())->getDefaultHandle()); } - if (csr->getKernelArgsBufferAllocation()) { - expectedHandles.push_back(static_cast(csr->getKernelArgsBufferAllocation())->getDefaultHandle()); - } for (auto i = 0u; i < wddm->makeResidentResult.handleCount; i++) { auto handle = wddm->makeResidentResult.handlePack[i]; diff --git a/shared/test/unit_test/preamble/preamble_tests.cpp b/shared/test/unit_test/preamble/preamble_tests.cpp index a1920d85ef..5cf4d260f9 100644 --- a/shared/test/unit_test/preamble/preamble_tests.cpp +++ b/shared/test/unit_test/preamble/preamble_tests.cpp @@ -77,9 +77,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, givenMidThreadPreemptionWhenPreambleIs uintptr_t minCsrAlignment = 2 * 256 * MemoryConstants::kiloByte; MockGraphicsAllocation csrSurface(reinterpret_cast(minCsrAlignment), 1024); - PreambleHelper::programPreamble(&preambleStream, *mockDevice, 0U, &csrSurface, nullptr); + PreambleHelper::programPreamble(&preambleStream, *mockDevice, 0U, &csrSurface); - PreemptionHelper::programStateSip(preemptionStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programStateSip(preemptionStream, *mockDevice, nullptr); HardwareParse hwParserPreamble; hwParserPreamble.parseCommands(preambleStream, 0); @@ -169,7 +169,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, WhenProgramVFEStateIsCalledThenCorrect auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&preambleStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; MockExecutionEnvironment executionEnvironment{}; - PreambleHelper::programVfeState(pVfeCmd, *executionEnvironment.rootDeviceEnvironments[0], 1024u, addressToPatch, 10u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, *executionEnvironment.rootDeviceEnvironments[0], 1024u, addressToPatch, 10u, emptyProperties); EXPECT_GE(reinterpret_cast(pVfeCmd), reinterpret_cast(preambleStream.getCpuBase())); EXPECT_LT(reinterpret_cast(pVfeCmd), reinterpret_cast(preambleStream.getCpuBase()) + preambleStream.getUsed()); @@ -192,7 +192,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, WhenGetScratchSpaceAddressOffsetForVfe auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&preambleStream, mockDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, mockDevice->getRootDeviceEnvironment(), 1024u, addressToPatch, 10u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, mockDevice->getRootDeviceEnvironment(), 1024u, addressToPatch, 10u, emptyProperties); auto offset = PreambleHelper::getScratchSpaceAddressOffsetForVfeState(&preambleStream, pVfeCmd); EXPECT_NE(0u, offset); diff --git a/shared/test/unit_test/preamble/test_preamble_xe_hpg_core.cpp b/shared/test/unit_test/preamble/test_preamble_xe_hpg_core.cpp index c02367a389..1dc649affe 100644 --- a/shared/test/unit_test/preamble/test_preamble_xe_hpg_core.cpp +++ b/shared/test/unit_test/preamble/test_preamble_xe_hpg_core.cpp @@ -31,7 +31,7 @@ HWTEST2_F(PreambleTest, givenDisableEUFusionWhenProgramVFEStateThenFusedEUDispat StreamProperties props; props.frontEndState.disableEUFusion.set(true); MockExecutionEnvironment executionEnvironment{}; - PreambleHelper::programVfeState(pVfeCmd, *executionEnvironment.rootDeviceEnvironments[0], 0, 0, 0, props, nullptr); + PreambleHelper::programVfeState(pVfeCmd, *executionEnvironment.rootDeviceEnvironments[0], 0, 0, 0, props); auto cfeCmd = reinterpret_cast(pVfeCmd); EXPECT_EQ(1u, cfeCmd->getFusedEuDispatch()); diff --git a/shared/test/unit_test/preemption/preemption_tests.cpp b/shared/test/unit_test/preemption/preemption_tests.cpp index aa12f8ca9f..38ecdab7a2 100644 --- a/shared/test/unit_test/preemption/preemption_tests.cpp +++ b/shared/test/unit_test/preemption/preemption_tests.cpp @@ -401,7 +401,7 @@ HWTEST_P(PreemptionTest, whenInNonMidThreadModeThenStateSipIsNotProgrammed) { StackVec buffer(requiredSize); LinearStream cmdStream(buffer.begin(), buffer.size()); - PreemptionHelper::programStateSip(cmdStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *mockDevice, nullptr); EXPECT_EQ(0u, cmdStream.getUsed()); } @@ -423,7 +423,7 @@ HWTEST_P(PreemptionTest, whenInNonMidThreadModeThenCsrBaseAddressIsNotProgrammed StackVec buffer(requiredSize); LinearStream cmdStream(buffer.begin(), buffer.size()); - PreemptionHelper::programCsrBaseAddress(cmdStream, *mockDevice, nullptr, nullptr); + PreemptionHelper::programCsrBaseAddress(cmdStream, *mockDevice, nullptr); EXPECT_EQ(0u, cmdStream.getUsed()); } diff --git a/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp b/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp index 5f3bb3df4d..f790cf8942 100644 --- a/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp +++ b/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp @@ -27,7 +27,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, whenProgramStateSipIsC EXPECT_EQ(0U, requiredSize); LinearStream cmdStream{nullptr, 0}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); EXPECT_EQ(0U, cmdStream.getUsed()); } @@ -120,7 +120,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, GivenDebuggerUsedWhenP uint64_t buffer[bufferSize]; LinearStream cmdStream{buffer, bufferSize * sizeof(uint64_t)}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, nullptr); + PreemptionHelper::programStateSip(cmdStream, *device, nullptr); EXPECT_EQ(sizeof(STATE_SIP), cmdStream.getUsed()); auto sipAllocation = SipKernel::getSipKernel(*device, nullptr).getSipAllocation(); @@ -153,7 +153,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, GivenOfflineModeDebugg uint64_t buffer[bufferSize]; LinearStream cmdStream{buffer, bufferSize * sizeof(uint64_t)}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr, osContext.get()); + PreemptionHelper::programStateSip(cmdStream, *device, osContext.get()); EXPECT_EQ(sizeof(STATE_SIP), cmdStream.getUsed()); auto contextSipKernel = builtIns->perContextSipKernels[contextId].first.get(); diff --git a/shared/test/unit_test/xe_hp_core/test_encode_xe_hp_core.cpp b/shared/test/unit_test/xe_hp_core/test_encode_xe_hp_core.cpp index 678f07ccff..729ef2105a 100644 --- a/shared/test/unit_test/xe_hp_core/test_encode_xe_hp_core.cpp +++ b/shared/test/unit_test/xe_hp_core/test_encode_xe_hp_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -24,7 +24,7 @@ XE_HP_CORE_TEST_F(CommandEncodeXeHpCoreTest, whenProgrammingStateComputeModeThen StateComputeModeProperties properties; auto pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); auto expectedMask = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeLargeGrfModeMask; @@ -35,7 +35,7 @@ XE_HP_CORE_TEST_F(CommandEncodeXeHpCoreTest, whenProgrammingStateComputeModeThen properties.isCoherencyRequired.value = 1; properties.largeGrfMode.value = 1; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo); pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(expectedMask, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent()); @@ -52,7 +52,7 @@ XE_HP_CORE_TEST_F(CommandEncodeXeHpCoreTest, givenForceDisableMultiAtomicsWhenDe StateComputeModeProperties properties; LinearStream cmdStream(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo, nullptr); + EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo); auto scmCommand = reinterpret_cast(cmdStream.getCpuBase()); uint32_t expectedMaskBits = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeLargeGrfModeMask | @@ -71,7 +71,7 @@ XE_HP_CORE_TEST_F(CommandEncodeXeHpCoreTest, givenForceDisableMultiAtomicsWhenDe StateComputeModeProperties properties; LinearStream cmdStream(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo, nullptr); + EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo); auto scmCommand = reinterpret_cast(cmdStream.getCpuBase()); uint32_t expectedMaskBits = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeLargeGrfModeMask | @@ -90,7 +90,7 @@ XE_HP_CORE_TEST_F(CommandEncodeXeHpCoreTest, givenForceDisableMultiPartialWrites StateComputeModeProperties properties; LinearStream cmdStream(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo, nullptr); + EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo); auto scmCommand = reinterpret_cast(cmdStream.getCpuBase()); uint32_t expectedMaskBits = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeLargeGrfModeMask | @@ -109,7 +109,7 @@ XE_HP_CORE_TEST_F(CommandEncodeXeHpCoreTest, givenForceDisableMultiPartialWrites StateComputeModeProperties properties; LinearStream cmdStream(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo, nullptr); + EncodeComputeMode::programComputeModeCommand(cmdStream, properties, *defaultHwInfo); auto scmCommand = reinterpret_cast(cmdStream.getCpuBase()); uint32_t expectedMaskBits = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeLargeGrfModeMask | @@ -161,7 +161,7 @@ XE_HP_CORE_TEST_F(EncodeKernelGlobalAtomicsTestWithImplicitScalingTests, givenCl EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.useGlobalAtomics = useGlobalAtomics; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_TRUE(cmdContainer->lastSentUseGlobalAtomics); @@ -190,7 +190,7 @@ XE_HP_CORE_TEST_F(EncodeKernelGlobalAtomicsTestWithImplicitScalingTests, givenCl dispatchArgs.useGlobalAtomics = useGlobalAtomics; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_TRUE(cmdContainer->lastSentUseGlobalAtomics); @@ -216,7 +216,7 @@ XE_HP_CORE_TEST_F(EncodeKernelGlobalAtomicsTestWithImplicitScalingTests, givenCl dispatchArgs.useGlobalAtomics = useGlobalAtomics; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_FALSE(cmdContainer->lastSentUseGlobalAtomics); @@ -245,7 +245,7 @@ XE_HP_CORE_TEST_F(EncodeKernelGlobalAtomicsTestWithImplicitScalingTests, givenCl dispatchArgs.useGlobalAtomics = useGlobalAtomics; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_FALSE(cmdContainer->lastSentUseGlobalAtomics); @@ -273,7 +273,7 @@ XE_HP_CORE_TEST_F(EncodeKernelGlobalAtomicsTestWithImplicitScalingTests, givenCl dispatchArgs.useGlobalAtomics = useGlobalAtomics; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -308,7 +308,7 @@ XE_HP_CORE_TEST_F(EncodeKernelGlobalAtomicsTestWithNoImplicitScalingTests, given EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.useGlobalAtomics = useGlobalAtomics; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_FALSE(cmdContainer->lastSentUseGlobalAtomics); GenCmdList commands; diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp index 122ef37d7e..8175160ee6 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp @@ -92,7 +92,7 @@ PVCTEST_F(EncodeKernelPvcTest, givenRevisionBAndAboveWhenSpecialModeRequiredThen EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.preemptionMode = NEO::PreemptionMode::Initial; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); EXPECT_EQ(testInput.expectedValue, cmdContainer->lastPipelineSelectModeRequiredRef()); } } @@ -195,7 +195,7 @@ PVCTEST_F(EncodeKernelPvcTest, givenDefaultSettingForFenceAsPostSyncOperationInC dispatchArgs.isKernelUsingSystemAllocation = true; dispatchArgs.isHostScopeSignalEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp index 5b626e8b2d..73d126569f 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp @@ -34,7 +34,7 @@ PVCTEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCalli hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(revision, *hwInfo); streamProperties.frontEndState.setPropertiesAll(kernelExecutionType, false, false, false); - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); diff --git a/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp index 7b98d83413..c9227d2e9d 100644 --- a/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp @@ -225,7 +225,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenProgrammingStateComputeModeThe auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0]; StateComputeModeProperties properties; auto pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(0u, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent()); @@ -236,7 +236,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenProgrammingStateComputeModeThe properties.threadArbitrationPolicy.value = ThreadArbitrationPolicy::RoundRobin; properties.largeGrfMode.value = 1; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(0u, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent()); @@ -247,7 +247,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenProgrammingStateComputeModeThe properties.threadArbitrationPolicy.isDirty = true; properties.largeGrfMode.isDirty = true; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); auto expectedMask = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeEuThreadSchedulingModeOverrideMask | FamilyType::stateComputeModeLargeGrfModeMask; @@ -270,7 +270,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenAdjustComputeModeIsCalledThenC auto &productHelper = rootDeviceEnvironment.getHelper(); properties.initSupport(rootDeviceEnvironment); properties.stateComputeMode.setPropertiesAll(false, 0, ThreadArbitrationPolicy::AgeBased, PreemptionMode::Disabled); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); if (productHelper.isThreadArbitrationPolicyReportedWithScm()) { EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_OLDEST_FIRST, pScm->getEuThreadSchedulingModeOverride()); @@ -280,7 +280,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenAdjustComputeModeIsCalledThenC pLinearStream = std::make_unique(buffer, sizeof(buffer)); properties.stateComputeMode.setPropertiesAll(false, 0, ThreadArbitrationPolicy::RoundRobin, PreemptionMode::Disabled); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); if (productHelper.isThreadArbitrationPolicyReportedWithScm()) { EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_ROUND_ROBIN, pScm->getEuThreadSchedulingModeOverride()); @@ -290,7 +290,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenAdjustComputeModeIsCalledThenC pLinearStream = std::make_unique(buffer, sizeof(buffer)); properties.stateComputeMode.setPropertiesAll(false, 0, ThreadArbitrationPolicy::RoundRobinAfterDependency, PreemptionMode::Disabled); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); if (productHelper.isThreadArbitrationPolicyReportedWithScm()) { EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_STALL_BASED_ROUND_ROBIN, pScm->getEuThreadSchedulingModeOverride()); @@ -300,7 +300,7 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenAdjustComputeModeIsCalledThenC pLinearStream = std::make_unique(buffer, sizeof(buffer)); properties.stateComputeMode.setPropertiesAll(false, 0, ThreadArbitrationPolicy::NotPresent, PreemptionMode::Disabled); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_HW_DEFAULT, pScm->getEuThreadSchedulingModeOverride()); } @@ -320,7 +320,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenNoFenceAsPostSyncOperationInCo bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -346,7 +346,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenFenceAsPostSyncOperationInComp bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -379,7 +379,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKern EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isKernelUsingSystemAllocation = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer( @@ -415,7 +415,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenEven EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isHostScopeSignalEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer( @@ -451,7 +451,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKern dispatchArgs.isKernelUsingSystemAllocation = true; dispatchArgs.isHostScopeSignalEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -474,7 +474,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenCleanHeapsAndSlmNotChangedAndU bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); diff --git a/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp index 2692d6843c..0c1140a5b4 100644 --- a/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp @@ -26,7 +26,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenXeHpcCoreAndSetDebugFlagWhenPreambleCfe uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); @@ -50,7 +50,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenKernelExecutionTypeConcurrentAndRevisio streamProperties.initSupport(pDevice->getRootDeviceEnvironment()); streamProperties.frontEndState.setPropertiesAll(true, false, false, false); - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -75,7 +75,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenNotSetDebugFlagWhenPreambleCfeStateIsPr uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties); uint32_t maximumNumberOfThreads = cfeState->getMaximumNumberOfThreads(); EXPECT_EQ(numberOfWalkers, cfeState->getNumberOfWalkers()); @@ -102,7 +102,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenSetDebugFlagWhenPreambleCfeStateIsProgr uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties, nullptr); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); diff --git a/shared/test/unit_test/xe_hpg_core/command_encoder_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/command_encoder_tests_xe_hpg_core.cpp index b1e50293a9..f353576f3c 100644 --- a/shared/test/unit_test/xe_hpg_core/command_encoder_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/command_encoder_tests_xe_hpg_core.cpp @@ -39,7 +39,7 @@ void testProgrammingStateComputeModeXeLpgWithEnabledWa(ExecutionEnvironment &exe auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0]; StateComputeModeProperties properties; auto pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); auto expectedMask = XeHpgCoreFamily::stateComputeModeLargeGrfModeMask; EXPECT_EQ(expectedMask, pScm->getMaskBits()); @@ -52,7 +52,7 @@ void testProgrammingStateComputeModeXeLpgWithEnabledWa(ExecutionEnvironment &exe properties.pixelAsyncComputeThreadLimit.value = 1; properties.largeGrfMode.value = 1; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); expectedMask |= XeHpgCoreFamily::stateComputeModeZPassAsyncComputeThreadLimitMask | XeHpgCoreFamily::stateComputeModePixelAsyncComputeThreadLimitMask; @@ -70,7 +70,7 @@ void testProgrammingStateComputeModeXeLpgWithDisabledWa(ExecutionEnvironment &ex auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0]; StateComputeModeProperties properties; auto pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(0u, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::PIXEL_ASYNC_COMPUTE_THREAD_LIMIT_DISABLED, pScm->getPixelAsyncComputeThreadLimit()); @@ -82,7 +82,7 @@ void testProgrammingStateComputeModeXeLpgWithDisabledWa(ExecutionEnvironment &ex properties.pixelAsyncComputeThreadLimit.value = 1; properties.largeGrfMode.value = 1; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); EXPECT_EQ(0u, pScm->getMaskBits()); EXPECT_EQ(STATE_COMPUTE_MODE::PIXEL_ASYNC_COMPUTE_THREAD_LIMIT_DISABLED, pScm->getPixelAsyncComputeThreadLimit()); @@ -94,7 +94,7 @@ void testProgrammingStateComputeModeXeLpgWithDisabledWa(ExecutionEnvironment &ex properties.pixelAsyncComputeThreadLimit.isDirty = true; properties.largeGrfMode.isDirty = true; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); auto expectedMask = XeHpgCoreFamily::stateComputeModeZPassAsyncComputeThreadLimitMask | XeHpgCoreFamily::stateComputeModePixelAsyncComputeThreadLimitMask | XeHpgCoreFamily::stateComputeModeLargeGrfModeMask; diff --git a/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dg2.cpp index e0aeacabd8..489cb3ec6f 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dg2.cpp @@ -34,7 +34,7 @@ DG2TEST_F(CommandEncodeDG2Test, whenProgrammingStateComputeModeThenProperFieldsA auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0]; StateComputeModeProperties properties; auto pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); auto pScm = reinterpret_cast(pLinearStream->getCpuBase()); auto expectedMask = FamilyType::stateComputeModeForceNonCoherentMask | FamilyType::stateComputeModeLargeGrfModeMask; EXPECT_EQ(expectedMask, pScm->getMaskBits()); @@ -48,7 +48,7 @@ DG2TEST_F(CommandEncodeDG2Test, whenProgrammingStateComputeModeThenProperFieldsA properties.pixelAsyncComputeThreadLimit.value = 1; properties.largeGrfMode.value = 1; pLinearStream = std::make_unique(buffer, sizeof(buffer)); - EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment, nullptr); + EncodeComputeMode::programComputeModeCommand(*pLinearStream, properties, rootDeviceEnvironment); pScm = reinterpret_cast(pLinearStream->getCpuBase()); expectedMask |= FamilyType::stateComputeModeZPassAsyncComputeThreadLimitMask | FamilyType::stateComputeModePixelAsyncComputeThreadLimitMask;