diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_base.inl b/level_zero/core/source/cmdlist/cmdlist_hw_base.inl index 593d4b921b..d35f6c4787 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_base.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_base.inl @@ -136,7 +136,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K cmdListType == CommandListType::TYPE_IMMEDIATE // isKernelDispatchedFromImmediateCmdList }; - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, getLogicalStateHelper()); this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs; if (neoDevice->getDebugger()) { 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 9f268c140e..f266392396 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 @@ -246,7 +246,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K isKernelUsingSystemAllocation, // isKernelUsingSystemAllocation cmdListType == CommandListType::TYPE_IMMEDIATE // isKernelDispatchedFromImmediateCmdList }; - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, getLogicalStateHelper()); this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs; if (event) { 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 c5bf2af04f..e2af585b98 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 @@ -128,7 +128,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithThreadArbitrationPolicySe delete (pHint); } -HWTEST_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenAppendingKernelThenBbEndIsAddedAndNewCmdBufferAllocated) { +HWTEST2_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenAppendingKernelThenBbEndIsAddedAndNewCmdBufferAllocated, MatchAny) { using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END; createKernel(); @@ -162,7 +162,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenAp false, false, false}; - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, static_cast *>(commandList.get())->getLogicalStateHelper()); auto usedSpaceAfter = commandContainer.getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, 0u); @@ -323,7 +323,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenTimestampEventsWhenAppendingKernel itor++; auto numPCs = findAll(itor, cmdList.end()); - //we should not have PC when signal scope is device + // we should not have PC when signal scope is device ASSERT_EQ(0u, numPCs.size()); { @@ -536,7 +536,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenIndirectDispatchWhenAppendingThenWo itor = find(++itor, cmdList.end()); EXPECT_NE(itor, cmdList.end()); - itor++; //MI_MATH_ALU_INST_INLINE doesn't have tagMI_COMMAND_OPCODE, can't find it in cmdList + itor++; // MI_MATH_ALU_INST_INLINE doesn't have tagMI_COMMAND_OPCODE, can't find it in cmdList EXPECT_NE(itor, cmdList.end()); itor++; EXPECT_NE(itor, cmdList.end()); @@ -546,7 +546,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenIndirectDispatchWhenAppendingThenWo itor = find(++itor, cmdList.end()); EXPECT_NE(itor, cmdList.end()); - itor++; //MI_MATH_ALU_INST_INLINE doesn't have tagMI_COMMAND_OPCODE, can't find it in cmdList + itor++; // MI_MATH_ALU_INST_INLINE doesn't have tagMI_COMMAND_OPCODE, can't find it in cmdList EXPECT_NE(itor, cmdList.end()); itor++; EXPECT_NE(itor, cmdList.end()); @@ -557,7 +557,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenIndirectDispatchWhenAppendingThenWo itor = find(++itor, cmdList.end()); EXPECT_NE(itor, cmdList.end()); - itor++; //MI_MATH_ALU_INST_INLINE doesn't have tagMI_COMMAND_OPCODE, can't find it in cmdList + itor++; // MI_MATH_ALU_INST_INLINE doesn't have tagMI_COMMAND_OPCODE, can't find it in cmdList EXPECT_NE(itor, cmdList.end()); itor++; EXPECT_NE(itor, cmdList.end()); @@ -565,7 +565,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenIndirectDispatchWhenAppendingThenWo itor = find(++itor, cmdList.end()); EXPECT_NE(itor, cmdList.end()); - itor = find(++itor, cmdList.end()); //kernel with groupSize[2] = 2 + itor = find(++itor, cmdList.end()); // kernel with groupSize[2] = 2 EXPECT_NE(itor, cmdList.end()); itor = find(++itor, cmdList.end()); 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 456a0ebdff..d6d31055a8 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 @@ -490,7 +490,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenA false, false, false}; - NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs); + NEO::EncodeDispatchKernel::encode(commandContainer, dispatchKernelArgs, nullptr); auto usedSpaceAfter = commandContainer.getCommandStream()->getUsed(); ASSERT_GT(usedSpaceAfter, 0u); diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index f5c46a0922..f7ebbda1ab 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -60,8 +60,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); + static void encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper); static void encodeAdditionalWalkerFields(const HardwareInfo &hwInfo, WALKER_TYPE &walkerCmd, const EncodeWalkerArgs &walkerArgs); 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 b27baa171f..e510d41033 100644 --- a/shared/source/command_container/command_encoder_bdw_and_later.inl +++ b/shared/source/command_container/command_encoder_bdw_and_later.inl @@ -42,8 +42,7 @@ void EncodeDispatchKernel::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterf } template -void EncodeDispatchKernel::encode(CommandContainer &container, - EncodeDispatchKernelArgs &args) { +void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper) { 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_xehp_and_later.inl b/shared/source/command_container/command_encoder_xehp_and_later.inl index ef2f661d8d..359058eb9a 100644 --- a/shared/source/command_container/command_encoder_xehp_and_later.inl +++ b/shared/source/command_container/command_encoder_xehp_and_later.inl @@ -42,8 +42,7 @@ void EncodeDispatchKernel::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterf } template -void EncodeDispatchKernel::encode(CommandContainer &container, - EncodeDispatchKernelArgs &args) { +void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper) { 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; 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 7c1951752a..f65a2ece8b 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp @@ -47,7 +47,7 @@ HWTEST_F(CommandEncodeStatesTest, givenDispatchInterfaceWhenDispatchKernelThenWa bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -69,7 +69,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -97,7 +97,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -125,7 +125,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -153,7 +153,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -180,7 +180,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); GenCmdList commands; @@ -204,7 +204,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWithUsedAvailableSizeWhen bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto cmdBuffersCountAfter = cmdContainer->getCmdBufferAllocations().size(); @@ -222,7 +222,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterThan bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -243,7 +243,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroW bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -277,7 +277,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenOneBindingTableEntryWh bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -307,7 +307,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhen bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -336,7 +336,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDispa bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -371,7 +371,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersZeroWhenDisp bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto interfaceDescriptorData = static_cast(cmdContainer->getIddBlock()); @@ -397,7 +397,7 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsCountsWhenDispatchingKerne EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isIndirect = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -426,7 +426,7 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsSizeWhenDispatchingKernelT EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isIndirect = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -466,7 +466,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); @@ -498,7 +498,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); @@ -525,7 +525,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); @@ -556,7 +556,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -575,7 +575,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -602,7 +602,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsAndSlmNotCha bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -625,7 +625,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsWhenDispatch bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList cmdList; CmdParse::parseCommandBuffer(cmdList, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -665,7 +665,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmChange bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -689,7 +689,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNextIddInBlockZeorWhenD bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -722,7 +722,7 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindfulKernelWhenDispatchingKernelThenS bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); @@ -751,7 +751,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); @@ -810,7 +810,7 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(pattern, *patchLocation); @@ -837,7 +837,7 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching memset(ioh->getCpuBase(), 0, ioh->getMaxAvailableSpace()); dispatchArgs.dispatchInterface = dispatchInterface.get(); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_TRUE(memoryZeroed(ptrOffset(ioh->getCpuBase(), iohOffset), ioh->getMaxAvailableSpace() - iohOffset)); } @@ -1069,7 +1069,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); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); } @@ -1105,7 +1105,7 @@ HWTEST2_F(BindlessCommandEncodeStatesContainerTest, givenBindlessKernelAndBindle EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); auto globalDSHIterator = std::find(commandContainer->getResidencyContainer().begin(), commandContainer->getResidencyContainer().end(), pDevice->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH)->getGraphicsAllocation()); @@ -1144,7 +1144,7 @@ HWTEST_F(BindlessCommandEncodeStatesContainerTest, givenBindfulKernelWhenBindles EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); } @@ -1180,13 +1180,13 @@ HWTEST_F(BindlessCommandEncodeStatesContainerTest, givenBindlessModeEnabledWhenD EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); auto sshBefore = commandContainer->getIndirectHeap(HeapType::SURFACE_STATE); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); auto sshAfter = commandContainer->getIndirectHeap(HeapType::SURFACE_STATE); - EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*commandContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(sshBefore, sshAfter); } @@ -1236,7 +1236,7 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenGlobalBindlessHeapsWhenDispatchin false, false}; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_NE(std::find(cmdContainer->getResidencyContainer().begin(), cmdContainer->getResidencyContainer().end(), pDevice->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH)->getGraphicsAllocation()), cmdContainer->getResidencyContainer().end()); } @@ -1282,7 +1282,7 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenBindlessModeDisabledelWithSampler false, false}; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(std::find(cmdContainer->getResidencyContainer().begin(), cmdContainer->getResidencyContainer().end(), pDevice->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH)->getGraphicsAllocation()), cmdContainer->getResidencyContainer().end()); } 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 2c20b195ff..70b4685eec 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 @@ -33,7 +33,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeAndPVCA dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -57,7 +57,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeAndDG2T dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -136,7 +136,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenOverridePreferredSlmAllocatio bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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 84491e3999..5bdc5e41c3 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 @@ -38,7 +38,7 @@ HWTEST2_F(CommandEncodeStatesTestPvcAndLater, givenOverrideSlmTotalSizeDebugVari cmdContainer->reset(); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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 2088cce6a8..cf4bd15a9f 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 @@ -42,7 +42,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -69,7 +69,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -92,7 +92,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -126,7 +126,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenOverrideSlmTotalSizeD cmdContainer->reset(); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -164,7 +164,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -201,7 +201,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -238,7 +238,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -284,7 +284,7 @@ HWTEST2_F(CommandEncodeStatesTest, giveNumSamplersOneWhenDispatchKernelThensampl bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -316,7 +316,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAllocationWhenDi dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -339,7 +339,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAddressWhenEncod EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -365,7 +365,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -405,7 +405,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -436,7 +436,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -458,7 +458,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -497,7 +497,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -524,7 +524,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -551,7 +551,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -580,7 +580,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -968,7 +968,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesImplicitScaling, dispatchArgs.eventAddress = eventAddress; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); size_t usedBuffer = cmdContainer->getCommandStream()->getUsed(); EXPECT_EQ(2u, dispatchArgs.partitionCount); @@ -1013,7 +1013,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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); size_t containerUsedAfterBase = cmdContainer->getCommandStream()->getUsed(); @@ -1026,7 +1026,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp EXPECT_EQ(16u, baseWalkerCmd->getThreadGroupIdXDimension()); dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); size_t total = cmdContainer->getCommandStream()->getUsed(); size_t partitionedWalkerSize = total - containerUsedAfterBase; @@ -1076,7 +1076,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp dispatchArgs.isInternal = isInternal; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(2u, dispatchArgs.partitionCount); size_t partitionedWalkerSize = cmdContainer->getCommandStream()->getUsed(); @@ -1174,7 +1174,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, dispatchArgs.isInternal = isInternal; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(2u, dispatchArgs.partitionCount); size_t partitionedWalkerSize = cmdContainer->getCommandStream()->getUsed(); @@ -1232,7 +1232,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp dispatchArgs.isInternal = isInternal; dispatchArgs.partitionCount = 2; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); size_t internalWalkerSize = cmdContainer->getCommandStream()->getUsed(); @@ -1259,7 +1259,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenNonTimestampEventWhen dispatchArgs.eventAddress = eventAddress; dispatchArgs.isTimestampEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -1285,7 +1285,7 @@ HWTEST2_F(CommandEncodeStatesTest, bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -1315,7 +1315,7 @@ HWTEST2_F(CommandEncodeStatesTest, bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, @@ -1342,7 +1342,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, 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 02f3a37771..90b48a72af 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 @@ -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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); 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 8066e81e83..5d6b17c569 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 @@ -82,7 +82,7 @@ PVCTEST_F(EncodeKernelPvcTest, givenRevisionBAndAboveWhenSpecialModeRequiredThen EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.preemptionMode = NEO::PreemptionMode::Initial; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); EXPECT_EQ(testInput.expectedValue, cmdContainer->lastPipelineSelectModeRequired); } } 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 1c0b0cd5fa..a748d36d13 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 @@ -305,7 +305,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenNoFenceAsPostSyncOperationInCo bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -331,7 +331,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenFenceAsPostSyncOperationInComp bool requiresUncachedMocs = false; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -366,7 +366,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceAsPostSy dispatchArgs.isKernelUsingSystemAllocation = true; dispatchArgs.isHostScopeSignalEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -399,7 +399,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKern EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isKernelUsingSystemAllocation = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer( @@ -435,7 +435,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenEven EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); dispatchArgs.isHostScopeSignalEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer( @@ -471,7 +471,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKern dispatchArgs.isKernelUsingSystemAllocation = true; dispatchArgs.isHostScopeSignalEvent = true; - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); @@ -494,7 +494,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenCleanHeapsAndSlmNotChangedAndU bool requiresUncachedMocs = true; EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs); + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); GenCmdList commands; CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());