Refactor encode dispatch kernel class interface

Related-To: NEO-6589

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-01-12 17:53:00 +00:00
committed by Compute-Runtime-Automation
parent 0a4554ab23
commit 9785ab7828
13 changed files with 1346 additions and 550 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -45,11 +45,23 @@ HWTEST_F(CommandEncodeStatesTest, givenDispatchInterfaceWhenDispatchKernelThenWa
uint32_t dims[] = {2, 1, 1};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -69,23 +81,24 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
cmdContainer->setDirtyStateForAllHeaps(true);
bool requiresUncachedMocs = true;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(),
dims,
false,
false,
dispatchInterface.get(),
0,
false,
false,
pDevice,
NEO::PreemptionMode::Disabled,
requiresUncachedMocs,
false,
partitionCount,
false,
false);
EXPECT_FALSE(requiresUncachedMocs);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -110,23 +123,24 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
cmdContainer->setDirtyStateForAllHeaps(false);
bool requiresUncachedMocs = true;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(),
dims,
false,
false,
dispatchInterface.get(),
0,
false,
false,
pDevice,
NEO::PreemptionMode::Disabled,
requiresUncachedMocs,
false,
partitionCount,
false,
false);
EXPECT_FALSE(requiresUncachedMocs);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -151,23 +165,24 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
cmdContainer->setDirtyStateForAllHeaps(true);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(),
dims,
false,
false,
dispatchInterface.get(),
0,
false,
false,
pDevice,
NEO::PreemptionMode::Disabled,
requiresUncachedMocs,
false,
partitionCount,
false,
false);
EXPECT_FALSE(requiresUncachedMocs);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -192,23 +207,24 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
cmdContainer->setDirtyStateForAllHeaps(false);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(),
dims,
false,
false,
dispatchInterface.get(),
0,
false,
false,
pDevice,
NEO::PreemptionMode::Disabled,
requiresUncachedMocs,
false,
partitionCount,
false,
false);
EXPECT_FALSE(requiresUncachedMocs);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -232,23 +248,24 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
cmdContainer->setDirtyStateForAllHeaps(false);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(),
dims,
false,
false,
dispatchInterface.get(),
0,
false,
false,
pDevice,
NEO::PreemptionMode::Disabled,
requiresUncachedMocs,
false,
partitionCount,
false,
false);
EXPECT_FALSE(requiresUncachedMocs);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -269,11 +286,23 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWithUsedAvailableSizeWhen
cmdContainer->getCommandStream()->getSpace(cmdContainer->getCommandStream()->getAvailableSpace() - sizeof(typename FamilyType::MI_BATCH_BUFFER_END));
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto cmdBuffersCountAfter = cmdContainer->getCmdBufferAllocations().size();
@@ -289,11 +318,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterThan
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -312,11 +353,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroW
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -348,11 +401,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenOneBindingTableEntryWh
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -380,11 +445,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhen
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -411,11 +488,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDispa
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -448,11 +537,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersZeroWhenDisp
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -475,11 +576,23 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsCountsWhenDispatchingKerne
dispatchInterface->kernelDescriptor.payloadMappings.dispatchTraits.numWorkGroups[2] = offsets[2];
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
true,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, true, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -505,11 +618,23 @@ HWTEST_F(CommandEncodeStatesTest, givenIndarectOffsetsSizeWhenDispatchingKernelT
dispatchInterface->kernelDescriptor.payloadMappings.dispatchTraits.globalWorkSize[2] = offsets[2];
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
true,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, true, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -547,11 +672,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
cmdContainer.reset(new MyMockCommandContainer());
cmdContainer->initialize(pDevice, nullptr);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
@@ -581,11 +718,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
cmdContainer->initialize(pDevice, nullptr);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
@@ -610,11 +759,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
cmdContainer->initialize(pDevice, nullptr);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
@@ -643,11 +804,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -664,11 +837,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
bool requiresUncachedMocs = true;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -693,11 +878,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsAndSlmNotCha
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -718,11 +915,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsWhenDispatch
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList cmdList;
CmdParse<FamilyType>::parseCommandBuffer(cmdList, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -760,11 +969,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmChange
auto slmSizeBefore = cmdContainer->slmSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -786,11 +1007,23 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNextIddInBlockZeorWhenD
cmdContainer->nextIddInBlock = 0;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -821,11 +1054,23 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindfulKernelWhenDispatchingKernelThenS
auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
@@ -852,11 +1097,23 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindlessKernelWhenDispatchingKernelThen
bool requiresUncachedMocs = false;
auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
@@ -913,11 +1170,23 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(pattern, *patchLocation);
@@ -943,9 +1212,8 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching
ioh->replaceBuffer(ioh->getCpuBase(), ioh->getMaxAvailableSpace());
memset(ioh->getCpuBase(), 0, ioh->getMaxAvailableSpace());
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
dispatchArgs.dispatchInterface = dispatchInterface.get();
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_THAT(ptrOffset(ioh->getCpuBase(), iohOffset), MemoryZeroed(ioh->getMaxAvailableSpace() - iohOffset));
}
@@ -1175,11 +1443,23 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindlessKernelAndBindlessModeEn
bool requiresUncachedMocs = false;
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
}
@@ -1213,11 +1493,23 @@ HWTEST2_F(BindlessCommandEncodeStatesTesttt, givenBindlessKernelAndBindlessModeE
bool requiresUncachedMocs = false;
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
auto globalDSHIterator = std::find(commandContainer->getResidencyContainer().begin(), commandContainer->getResidencyContainer().end(),
pDevice->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH)->getGraphicsAllocation());
@@ -1254,11 +1546,23 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindfulKernelWhenBindlessModeEn
bool requiresUncachedMocs = false;
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
}
@@ -1292,23 +1596,29 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindlessModeEnabledWhenDispatch
bool requiresUncachedMocs = false;
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
auto sshBefore = commandContainer->getIndirectHeap(HeapType::SURFACE_STATE);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
auto sshAfter = commandContainer->getIndirectHeap(HeapType::SURFACE_STATE);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
EXPECT_EQ(sshBefore, sshAfter);
}
@@ -1338,11 +1648,23 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenGlobalBindlessHeapsWhenDispatchin
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_NE(std::find(cmdContainer->getResidencyContainer().begin(), cmdContainer->getResidencyContainer().end(), pDevice->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH)->getGraphicsAllocation()), cmdContainer->getResidencyContainer().end());
}
@@ -1372,11 +1694,23 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenBindlessModeDisabledelWithSampler
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(std::find(cmdContainer->getResidencyContainer().begin(), cmdContainer->getResidencyContainer().end(), pDevice->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH)->getGraphicsAllocation()), cmdContainer->getResidencyContainer().end());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -30,10 +30,22 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeAndPVCA
uint64_t eventAddress = MemoryConstants::cacheLineSize * 123;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), eventAddress, true, true,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
eventAddress,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
true,
true,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -53,10 +65,22 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeAndDG2T
uint64_t eventAddress = MemoryConstants::cacheLineSize * 123;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), eventAddress, true, true,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
eventAddress,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
true,
true,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -148,10 +172,22 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenOverridePreferredSlmAllocatio
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -38,10 +38,22 @@ HWTEST2_F(CommandEncodeStatesTestPvcAndLater, givenOverrideSlmTotalSizeDebugVari
for (int32_t valueToProgram = 0x0; valueToProgram < maxValueToProgram; valueToProgram++) {
DebugManager.flags.OverrideSlmAllocationSize.set(valueToProgram);
cmdContainer->reset();
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -40,10 +40,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterTha
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -69,10 +81,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSimdSizeWhenDispatchi
dispatchInterface->kernelDescriptor.kernelAttributes.simdSize = simdSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -94,10 +118,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZero
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -130,10 +166,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenOverrideSlmTotalSizeD
DebugManager.flags.OverrideSlmAllocationSize.set(valueToProgram);
cmdContainer->reset();
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -168,10 +216,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givennumBindingTableOneWhe
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -207,10 +267,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhe
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -246,10 +318,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDisp
dispatchInterface->getDynamicStateHeapDataResult = samplerStateRaw;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -277,10 +361,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAllocationWhenDi
uint64_t eventAddress = MemoryConstants::cacheLineSize * 123;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), eventAddress, true, true,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
eventAddress,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
true,
true,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -300,10 +396,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAddressWhenEncod
uint64_t eventAddress = MemoryConstants::cacheLineSize * 123;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), eventAddress, true, true,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
eventAddress,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
true,
true,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -328,10 +436,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenCleanHeapsWhenDispatc
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -370,10 +490,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
cmdContainer->initialize(pDevice, nullptr);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -397,10 +529,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
cmdContainer->initialize(pDevice, nullptr);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -419,10 +563,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
cmdContainer->initialize(pDevice, nullptr);
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -455,10 +611,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredWhe
dispatchInterface->kernelDescriptor.kernelAttributes.flags.passInlineData = true;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -484,10 +652,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredIsF
dispatchInterface->kernelDescriptor.kernelAttributes.flags.passInlineData = false;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -513,10 +693,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredAnd
dispatchInterface->getCrossThreadDataSizeResult = 0u;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -544,10 +736,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredAnd
dispatchInterface->requiresGenerationOfLocalIdsByRuntimeResult = false;
bool requiresUncachedMocs = false;
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false,
pDevice, NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount,
false, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -914,15 +1118,27 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesImplicitScaling,
uint32_t dims[] = {16, 1, 1};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
uint32_t partitionCount = 0;
bool requiresUncachedMocs = false;
uint64_t eventAddress = 0xFF112233000;
constexpr bool timestampEvent = false;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), eventAddress, timestampEvent, false, pDevice,
NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount, false, false);
EncodeDispatchKernelArgs dispatchArgs{
eventAddress,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
timestampEvent,
false,
requiresUncachedMocs,
false,
false,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
size_t usedBuffer = cmdContainer->getCommandStream()->getUsed();
EXPECT_EQ(2u, partitionCount);
EXPECT_EQ(2u, dispatchArgs.partitionCount);
GenCmdList partitionedWalkerList;
CmdParse<FamilyType>::parseCommandBuffer(
@@ -966,9 +1182,23 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
bool isInternal = false;
size_t regularEstimateSize = EncodeDispatchKernel<FamilyType>::estimateEncodeDispatchKernelCmdsSize(
pDevice, Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1), isInternal, false, false, nullptr);
uint32_t partitionCount = 0;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false, pDevice,
NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount, isInternal, false);
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
isInternal,
false};
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
size_t containerUsedAfterBase = cmdContainer->getCommandStream()->getUsed();
@@ -984,8 +1214,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
size_t partitionEstimateSize = EncodeDispatchKernel<FamilyType>::estimateEncodeDispatchKernelCmdsSize(
pDevice, Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1), isInternal, false, false, nullptr);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false, pDevice,
NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount, isInternal, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
size_t total = cmdContainer->getCommandStream()->getUsed();
size_t partitionedWalkerSize = total - containerUsedAfterBase;
@@ -1012,7 +1241,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
ASSERT_NE(itor, partitionedWalkerList.end());
auto partitionWalkerCmd = genCmdCast<WALKER_TYPE *>(*itor);
EXPECT_EQ(WALKER_TYPE::PARTITION_TYPE::PARTITION_TYPE_X, partitionWalkerCmd->getPartitionType());
uint32_t expectedPartitionSize = (dims[0] + partitionCount - 1u) / partitionCount;
uint32_t expectedPartitionSize = (dims[0] + dispatchArgs.partitionCount - 1u) / dispatchArgs.partitionCount;
EXPECT_EQ(expectedPartitionSize, partitionWalkerCmd->getPartitionSize());
}
@@ -1036,15 +1265,28 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
DebugManager.flags.EnableWalkerPartition.set(1);
uint32_t partitionCount = 0;
bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
isInternal,
false};
size_t partitionEstimateSize = EncodeDispatchKernel<FamilyType>::estimateEncodeDispatchKernelCmdsSize(
pDevice, Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1), isInternal, false, false, dispatchInterface.get());
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false, pDevice,
NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount, isInternal, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(2u, partitionCount);
EXPECT_EQ(2u, dispatchArgs.partitionCount);
size_t partitionedWalkerSize = cmdContainer->getCommandStream()->getUsed();
size_t expectedPartitionedWalkerSize = ImplicitScalingDispatch<FamilyType>::getSize(true, false, pDevice->getDeviceBitfield(), Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1));
@@ -1069,13 +1311,13 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
ASSERT_NE(itor, partitionedWalkerList.end());
auto partitionWalkerCmd = genCmdCast<WALKER_TYPE *>(*itor);
EXPECT_EQ(WALKER_TYPE::PARTITION_TYPE::PARTITION_TYPE_X, partitionWalkerCmd->getPartitionType());
uint32_t expectedPartitionSize = (dims[0] + partitionCount - 1u) / partitionCount;
uint32_t expectedPartitionSize = (dims[0] + dispatchArgs.partitionCount - 1u) / dispatchArgs.partitionCount;
EXPECT_EQ(expectedPartitionSize, partitionWalkerCmd->getPartitionSize());
WalkerPartition::WalkerPartitionArgs args = {};
args.initializeWparidRegister = true;
args.emitPipeControlStall = true;
args.partitionCount = partitionCount;
args.partitionCount = dispatchArgs.partitionCount;
args.emitSelfCleanup = true;
auto cleanupSectionOffset = WalkerPartition::computeControlSectionOffset<FamilyType>(args);
@@ -1142,15 +1384,28 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling,
DebugManager.flags.EnableWalkerPartition.set(1);
uint32_t partitionCount = 0;
bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
isInternal,
false};
size_t partitionEstimateSize = EncodeDispatchKernel<FamilyType>::estimateEncodeDispatchKernelCmdsSize(
pDevice, Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1), isInternal, false, false, dispatchInterface.get());
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false, pDevice,
NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount, isInternal, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(2u, partitionCount);
EXPECT_EQ(2u, dispatchArgs.partitionCount);
size_t partitionedWalkerSize = cmdContainer->getCommandStream()->getUsed();
size_t expectedPartitionedWalkerSize = ImplicitScalingDispatch<FamilyType>::getSize(true, false, pDevice->getDeviceBitfield(), Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1));
@@ -1175,7 +1430,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling,
ASSERT_NE(itor, partitionedWalkerList.end());
auto partitionWalkerCmd = genCmdCast<WALKER_TYPE *>(*itor);
EXPECT_EQ(WALKER_TYPE::PARTITION_TYPE::PARTITION_TYPE_X, partitionWalkerCmd->getPartitionType());
uint32_t expectedPartitionSize = (dims[0] + partitionCount - 1u) / partitionCount;
uint32_t expectedPartitionSize = (dims[0] + dispatchArgs.partitionCount - 1u) / dispatchArgs.partitionCount;
EXPECT_EQ(expectedPartitionSize, partitionWalkerCmd->getPartitionSize());
HardwareParse hwParser;
@@ -1208,15 +1463,28 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
DebugManager.flags.EnableWalkerPartition.set(1);
isInternal = true;
uint32_t partitionCount = 0;
bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs{
0,
pDevice,
dispatchInterface.get(),
dims,
NEO::PreemptionMode::Disabled,
0,
false,
false,
false,
false,
requiresUncachedMocs,
false,
isInternal,
false};
size_t internalEstimateSize = EncodeDispatchKernel<FamilyType>::estimateEncodeDispatchKernelCmdsSize(
pDevice, Vec3<size_t>(0, 0, 0), Vec3<size_t>(16, 1, 1), isInternal, false, false, dispatchInterface.get());
EXPECT_EQ(baseEstimateSize, internalEstimateSize);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dims, false, false, dispatchInterface.get(), 0, false, false, pDevice,
NEO::PreemptionMode::Disabled, requiresUncachedMocs, false, partitionCount, isInternal, false);
EXPECT_EQ(1u, partitionCount);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(1u, dispatchArgs.partitionCount);
size_t internalWalkerSize = cmdContainer->getCommandStream()->getUsed();
GenCmdList internalWalkerList;