diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 2ece08f7ab..e3965f37a3 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -2289,10 +2289,10 @@ void CommandListCoreFamily::updateStreamProperties(Kernel &kernel finalStreamState.frontEndState.setProperties(isCooperative, kernelAttributes.flags.requiresDisabledEUFusion, disableOverdispatch, -1, hwInfo); bool isPatchingVfeStateAllowed = NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get(); - if (finalStreamState.frontEndState.isDirty() && isPatchingVfeStateAllowed) { + if (finalStreamState.frontEndState.isDirty() && isPatchingVfeStateAllowed && !logicalStateHelper) { auto pVfeStateAddress = NEO::PreambleHelper::getSpaceForVfeState(commandContainer.getCommandStream(), hwInfo, engineGroupType); auto pVfeState = new VFE_STATE_TYPE; - NEO::PreambleHelper::programVfeState(pVfeState, hwInfo, 0, 0, device->getMaxNumHwThreads(), finalStreamState); + NEO::PreambleHelper::programVfeState(pVfeState, hwInfo, 0, 0, device->getMaxNumHwThreads(), finalStreamState, nullptr); commandsToPatch.push_back({pVfeStateAddress, pVfeState, CommandToPatch::FrontEndState}); } diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index 22b2894b6b..5878d99ba6 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -246,7 +246,7 @@ ze_result_t CommandQueueHw::executeCommandLists( } else { streamProperties.frontEndState.singleSliceDispatchCcsMode.set(isEngineInstanced); } - frontEndStateDirty |= streamProperties.frontEndState.isDirty(); + frontEndStateDirty |= (streamProperties.frontEndState.isDirty() && !csr->getLogicalStateHelper()); gsbaStateDirty |= csr->getGSBAStateDirty(); frontEndStateDirty |= csr->getMediaVFEStateDirty(); @@ -371,6 +371,11 @@ ze_result_t CommandQueueHw::executeCommandLists( } if (csr->getLogicalStateHelper()) { + if (frontEndStateDirty && !isCopyOnlyCommandQueue) { + programFrontEnd(scratchSpaceController->getScratchPatchAddress(), scratchSpaceController->getPerThreadScratchSpaceSize(), child); + frontEndStateDirty = false; + } + csr->getLogicalStateHelper()->writeStreamInline(child); } @@ -530,7 +535,8 @@ void CommandQueueHw::programFrontEnd(uint64_t scratchAddress, uin perThreadScratchSpaceSize, scratchAddress, device->getMaxNumHwThreads(), - csr->getStreamProperties()); + csr->getStreamProperties(), + csr->getLogicalStateHelper()); csr->setMediaVFEStateDirty(false); } 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 4f9bb383b9..5c401ef649 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 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -34,7 +34,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, whenprogramVFEStateIsCalledWithProperAddi auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties properties{}; properties.frontEndState.disableOverdispatch.value = 1; - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, properties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, properties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -44,7 +44,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, whenprogramVFEStateIsCalledWithProperAddi cmdList.clear(); pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); properties.frontEndState.disableOverdispatch.value = 0; - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, properties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, properties, nullptr); parseCommands(linearStream); cfeStateIt = find(cmdList.begin(), cmdList.end()); cfeStateIt++; @@ -65,7 +65,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, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties, nullptr); 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 ea7d7dddb4..e255d5efda 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 @@ -141,7 +141,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, PreambleCfeStateXeHPAndLater, givenScratchEnabledWh uint32_t expectedMaxThreads = HwHelper::getMaxThreadsForVfe(*defaultHwInfo); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, expectedMaxThreads, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); parseCommands(linearStream); @@ -175,7 +175,7 @@ HWTEST2_F(PreambleCfeStateXeHPAndLater, givenNotSetDebugFlagWhenPreambleCfeState uint32_t expectedMaxThreads = HwHelper::getMaxThreadsForVfe(*defaultHwInfo); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, expectedMaxThreads, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); uint32_t maximumNumberOfThreads = cfeState->getMaximumNumberOfThreads(); if constexpr (TestTraits::numberOfWalkersInCfeStateSupported) { @@ -206,7 +206,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, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); diff --git a/opencl/test/unit_test/xe_hp_core/xehp/test_preamble_xehp.cpp b/opencl/test/unit_test/xe_hp_core/xehp/test_preamble_xehp.cpp index 5436308e3c..d9b957b3a0 100644 --- a/opencl/test/unit_test/xe_hp_core/xehp/test_preamble_xehp.cpp +++ b/opencl/test/unit_test/xe_hp_core/xehp/test_preamble_xehp.cpp @@ -24,7 +24,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndFlagCFEWeightedDispatchModeDisableSetFal auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, *defaultHwInfo); - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -40,7 +40,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndFlagCFEWeightedDispatchModeDisableSetTru auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, *defaultHwInfo); - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -57,7 +57,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndFlagCFEComputeOverdispatchDisableSetFals auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, *defaultHwInfo); - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -73,7 +73,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndFlagCFEComputeOverdispatchDisableSetTrue auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, *defaultHwInfo); - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -91,7 +91,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndDisabledFusedEuWhenCfeStateProgrammedThe auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, hwInfo); - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -109,7 +109,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndEnabledFusedEuWhenCfeStateProgrammedThen auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, hwInfo); - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); 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 b23be15456..eced76acac 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 @@ -365,7 +365,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndDisabledFusedEuWhenCfeStateProgrammedThe auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, hwInfo); - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -386,7 +386,7 @@ HWTEST2_F(PreambleCfeState, givenXehpEnabledFusedEuAndDisableFusedDispatchFromKe auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, true, false, false, hwInfo); - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -404,7 +404,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndEnabledFusedEuWhenCfeStateProgrammedThen auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(false, false, false, false, hwInfo); - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); 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 7b3869d30f..faec980478 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -307,12 +307,14 @@ CompletionStamp CommandStreamReceiverHw::flushTask( makeResident(*perDssBackedBuffer); } - if (dispatchFlags.additionalKernelExecInfo != AdditionalKernelExecInfo::NotApplicable && lastAdditionalKernelExecInfo != dispatchFlags.additionalKernelExecInfo) { - setMediaVFEStateDirty(true); - } + if (!logicalStateHelper) { + if (dispatchFlags.additionalKernelExecInfo != AdditionalKernelExecInfo::NotApplicable && lastAdditionalKernelExecInfo != dispatchFlags.additionalKernelExecInfo) { + setMediaVFEStateDirty(true); + } - if (dispatchFlags.kernelExecutionType != KernelExecutionType::NotApplicable && lastKernelExecutionType != dispatchFlags.kernelExecutionType) { - setMediaVFEStateDirty(true); + if (dispatchFlags.kernelExecutionType != KernelExecutionType::NotApplicable && lastKernelExecutionType != dispatchFlags.kernelExecutionType) { + setMediaVFEStateDirty(true); + } } auto &commandStreamCSR = this->getCS(getRequiredCmdStreamSizeAligned(dispatchFlags, device)); @@ -951,7 +953,7 @@ inline void CommandStreamReceiverHw::programVFEState(LinearStream &cs dispatchFlags.disableEUFusion, disableOverdispatch, osContext->isEngineInstanced(), hwInfo); PreambleHelper::programVfeState( pVfeState, hwInfo, requiredScratchSize, getScratchPatchAddress(), - maxFrontEndThreads, streamProperties); + maxFrontEndThreads, streamProperties, logicalStateHelper.get()); auto commandOffset = PreambleHelper::getScratchSpaceAddressOffsetForVfeState(&csr, pVfeState); if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) { diff --git a/shared/source/helpers/preamble.h b/shared/source/helpers/preamble.h index 3b702e42cf..94d4f00852 100644 --- a/shared/source/helpers/preamble.h +++ b/shared/source/helpers/preamble.h @@ -50,7 +50,8 @@ struct PreambleHelper { uint32_t scratchSize, uint64_t scratchAddress, uint32_t maxFrontEndThreads, - const StreamProperties &streamProperties); + const StreamProperties &streamProperties, + LogicalStateHelper *logicalStateHelper); static uint64_t getScratchSpaceAddressOffsetForVfeState(LinearStream *pCommandStream, void *pVfeState); static void programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState, const HardwareInfo &hwInfo, bool disableEUFusion); static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config, diff --git a/shared/source/helpers/preamble_bdw_and_later.inl b/shared/source/helpers/preamble_bdw_and_later.inl index 992366befe..87482c5bf7 100644 --- a/shared/source/helpers/preamble_bdw_and_later.inl +++ b/shared/source/helpers/preamble_bdw_and_later.inl @@ -40,7 +40,8 @@ void PreambleHelper::programVfeState(void *pVfeState, uint32_t scratchSize, uint64_t scratchAddress, uint32_t maxFrontEndThreads, - const StreamProperties &streamProperties) { + const StreamProperties &streamProperties, + LogicalStateHelper *logicalStateHelper) { 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 11ec45f49f..61811fd0ee 100644 --- a/shared/source/helpers/preamble_xehp_and_later.inl +++ b/shared/source/helpers/preamble_xehp_and_later.inl @@ -100,10 +100,10 @@ uint32_t PreambleHelper::getUrbEntryAllocationSize() { template <> void PreambleHelper::appendProgramVFEState(const HardwareInfo &hwInfo, const StreamProperties &streamProperties, void *cmd); -template <> -void *PreambleHelper::getSpaceForVfeState(LinearStream *pCommandStream, - const HardwareInfo &hwInfo, - EngineGroupType engineGroupType) { +template +void *PreambleHelper::getSpaceForVfeState(LinearStream *pCommandStream, + const HardwareInfo &hwInfo, + EngineGroupType engineGroupType) { using CFE_STATE = typename Family::CFE_STATE; return pCommandStream->getSpace(sizeof(CFE_STATE)); } @@ -114,7 +114,8 @@ void PreambleHelper::programVfeState(void *pVfeState, uint32_t scratchSize, uint64_t scratchAddress, uint32_t maxFrontEndThreads, - const StreamProperties &streamProperties) { + const StreamProperties &streamProperties, + LogicalStateHelper *logicalStateHelper) { using CFE_STATE = typename Family::CFE_STATE; auto cfeState = reinterpret_cast(pVfeState); @@ -143,8 +144,8 @@ uint64_t PreambleHelper::getScratchSpaceAddressOffsetForVfeState(LinearS return 0; } -template <> -size_t PreambleHelper::getVFECommandsSize() { +template +size_t PreambleHelper::getVFECommandsSize() { using CFE_STATE = typename Family::CFE_STATE; return sizeof(CFE_STATE); } diff --git a/shared/test/common/gen11/test_preamble_gen11.cpp b/shared/test/common/gen11/test_preamble_gen11.cpp index 00b8a3d8b9..031e64cc54 100644 --- a/shared/test/common/gen11/test_preamble_gen11.cpp +++ b/shared/test/common/gen11/test_preamble_gen11.cpp @@ -62,7 +62,7 @@ GEN11TEST_F(Gen11PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgramm LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties, nullptr); parseCommands(cs); @@ -82,7 +82,7 @@ GEN11TEST_F(Gen11PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammi LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties, nullptr); parseCommands(cs); diff --git a/shared/test/common/gen12lp/test_preamble_gen12lp.cpp b/shared/test/common/gen12lp/test_preamble_gen12lp.cpp index 07170389fa..33e6a638e3 100644 --- a/shared/test/common/gen12lp/test_preamble_gen12lp.cpp +++ b/shared/test/common/gen12lp/test_preamble_gen12lp.cpp @@ -64,7 +64,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgramm LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties, nullptr); parseCommands(cs); @@ -86,7 +86,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenCcsEngineWhenWaIsSetThenAppropriatePipeC auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::Compute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties, nullptr); parseCommands(cs); @@ -107,7 +107,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenRcsEngineWhenWaIsSetThenAppropriatePipeC auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties, nullptr); parseCommands(cs); diff --git a/shared/test/common/gen8/test_preamble_gen8.cpp b/shared/test/common/gen8/test_preamble_gen8.cpp index 2043a92d8e..4d1575ac67 100644 --- a/shared/test/common/gen8/test_preamble_gen8.cpp +++ b/shared/test/common/gen8/test_preamble_gen8.cpp @@ -104,7 +104,7 @@ BDWTEST_F(PreambleVfeState, WhenProgrammingVfeStateThenProgrammingIsCorrect) { LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 168u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, 0, 168u, emptyProperties, nullptr); 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 82e98641a6..627c7b3d90 100644 --- a/shared/test/unit_test/gen9/test_preamble_gen9.cpp +++ b/shared/test/unit_test/gen9/test_preamble_gen9.cpp @@ -93,7 +93,7 @@ GEN9TEST_F(PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsC LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties, nullptr); parseCommands(cs); @@ -113,7 +113,7 @@ GEN9TEST_F(PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammingIsCo LinearStream &cs = linearStream; auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties, nullptr); parseCommands(cs); diff --git a/shared/test/unit_test/preamble/preamble_tests.cpp b/shared/test/unit_test/preamble/preamble_tests.cpp index 54771f8234..c7f06e3553 100644 --- a/shared/test/unit_test/preamble/preamble_tests.cpp +++ b/shared/test/unit_test/preamble/preamble_tests.cpp @@ -224,7 +224,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, WhenProgramVFEStateIsCalledThenCorrect auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&preambleStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 1024u, addressToPatch, 10u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 1024u, addressToPatch, 10u, emptyProperties, nullptr); EXPECT_GE(reinterpret_cast(pVfeCmd), reinterpret_cast(preambleStream.getCpuBase())); EXPECT_LT(reinterpret_cast(pVfeCmd), reinterpret_cast(preambleStream.getCpuBase()) + preambleStream.getUsed()); @@ -247,7 +247,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, WhenGetScratchSpaceAddressOffsetForVfe auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&preambleStream, mockDevice->getHardwareInfo(), EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, mockDevice->getHardwareInfo(), 1024u, addressToPatch, 10u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, mockDevice->getHardwareInfo(), 1024u, addressToPatch, 10u, emptyProperties, nullptr); 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 f88b6e619e..2a40bb36cd 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 @@ -55,7 +55,7 @@ HWTEST2_F(PreambleTest, givenDisableEUFusionWhenProgramVFEStateThenFusedEUDispat auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&stream, *defaultHwInfo.get(), EngineGroupType::RenderCompute); StreamProperties props; props.frontEndState.disableEUFusion.set(true); - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo.get(), 0, 0, 0, props); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo.get(), 0, 0, 0, props, nullptr); auto cfeCmd = reinterpret_cast(pVfeCmd); EXPECT_EQ(1u, cfeCmd->getFusedEuDispatch()); diff --git a/shared/test/unit_test/xe_hp_core/xe_hp_sdv/test_preamble_xe_hp_sdv.cpp b/shared/test/unit_test/xe_hp_core/xe_hp_sdv/test_preamble_xe_hp_sdv.cpp index 3efc5aac31..8c73c5abee 100644 --- a/shared/test/unit_test/xe_hp_core/xe_hp_sdv/test_preamble_xe_hp_sdv.cpp +++ b/shared/test/unit_test/xe_hp_core/xe_hp_sdv/test_preamble_xe_hp_sdv.cpp @@ -103,7 +103,7 @@ XEHPTEST_F(XeHPPreambleVfeState, WhenProgramVFEStateIsCalledThenCorrectCfeStateA auto pCfeCmd = PreambleHelper::getSpaceForVfeState(&preambleStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pCfeCmd, *defaultHwInfo, 1024u, addressToPatch, 10u, emptyProperties); + PreambleHelper::programVfeState(pCfeCmd, *defaultHwInfo, 1024u, addressToPatch, 10u, emptyProperties, nullptr); EXPECT_GE(reinterpret_cast(pCfeCmd), reinterpret_cast(preambleStream.getCpuBase())); EXPECT_LT(reinterpret_cast(pCfeCmd), reinterpret_cast(preambleStream.getCpuBase()) + preambleStream.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 a1deb6f44f..004ea6293b 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 @@ -33,7 +33,7 @@ PVCTEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCalli hwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, *hwInfo); streamProperties.frontEndState.setProperties(kernelExecutionType, false, false, false, *hwInfo); - PreambleHelper::programVfeState(pVfeCmd, *hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, *hwInfo, 0u, 0, 0, streamProperties, nullptr); 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_preamble_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp index f3a824ea7f..a5bc3fb2e0 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, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); @@ -49,7 +49,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenKernelExecutionTypeConcurrentAndRevisio StreamProperties streamProperties{}; streamProperties.frontEndState.setProperties(true, false, false, false, hwInfo); - PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties); + PreambleHelper::programVfeState(pVfeCmd, hwInfo, 0u, 0, 0, streamProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end()); ASSERT_NE(cmdList.end(), cfeStateIt); @@ -74,7 +74,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenNotSetDebugFlagWhenPreambleCfeStateIsPr uint32_t expectedMaxThreads = HwHelper::getMaxThreadsForVfe(*defaultHwInfo); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, expectedMaxThreads, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); uint32_t maximumNumberOfThreads = cfeState->getMaximumNumberOfThreads(); EXPECT_EQ(numberOfWalkers, cfeState->getNumberOfWalkers()); @@ -101,7 +101,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, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties); + PreambleHelper::programVfeState(pVfeCmd, *defaultHwInfo, 0u, expectedAddress, 16u, emptyProperties, nullptr); parseCommands(linearStream); auto cfeStateIt = find(cmdList.begin(), cmdList.end());