Revert "refactor: move empty sba programming in heapless prolog to base class"

This reverts commit 809feca620.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation 2025-05-12 10:39:42 +02:00 committed by Compute-Runtime-Automation
parent d9ae813584
commit 4ab91eab1e
11 changed files with 55 additions and 133 deletions

View File

@ -3,7 +3,7 @@ components:
branch: master
dest_dir: infra
fetch_tags: true
revision: v6941
revision: v6939
type: git
converter: M-3107
version: '1'

View File

@ -8,7 +8,6 @@
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/command_stream/command_stream_receiver_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/test/common/helpers/dispatch_flags_helper.h"
@ -55,11 +54,6 @@ struct MiAtomicAubFixture : public AUBFixture {
taskStream.replaceGraphicsAllocation(streamAllocation);
taskStream.replaceBuffer(streamAllocation->getUnderlyingBuffer(),
streamAllocation->getUnderlyingBufferSize());
auto &compilerProductHelper = device->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(device->getHardwareInfo());
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
}
void tearDown() {
@ -77,20 +71,11 @@ struct MiAtomicAubFixture : public AUBFixture {
csr->makeResident(*deviceSurface);
csr->makeResident(*systemSurface);
if (this->heaplessStateInitEnabled) {
csr->flushTaskStateless(taskStream, 0,
&csr->getIndirectHeap(IndirectHeapType::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeapType::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeapType::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
} else {
csr->flushTask(taskStream, 0,
&csr->getIndirectHeap(IndirectHeapType::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeapType::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeapType::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
}
csr->flushTask(taskStream, 0,
&csr->getIndirectHeap(IndirectHeapType::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeapType::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeapType::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
csr->flushBatchedSubmissions();
}
@ -99,7 +84,6 @@ struct MiAtomicAubFixture : public AUBFixture {
GraphicsAllocation *streamAllocation = nullptr;
GraphicsAllocation *deviceSurface = nullptr;
GraphicsAllocation *systemSurface = nullptr;
bool heaplessStateInitEnabled = false;
};
using MiAtomicAubTest = Test<MiAtomicAubFixture>;

View File

@ -7,7 +7,6 @@
#include "shared/source/helpers/array_count.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/utilities/io_functions.h"
#include "shared/source/utilities/tag_allocator.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
@ -392,12 +391,7 @@ struct MultiLevelBatchAubFixture : public AUBFixture {
thirdLevelBatch = memoryManager->allocateGraphicsMemoryWithProperties(*commandBufferProperties);
secondLevelBatchStream = std::make_unique<LinearStream>(secondLevelBatch);
thirdLevelBatchStream = std::make_unique<LinearStream>(thirdLevelBatch);
auto &compilerProductHelper = device->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(device->getHardwareInfo());
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
}
};
void tearDown() {
debugManager.flags.AubDumpAddMmioRegistersList.getRef() = "unk";
debugManager.flags.AubDumpAddMmioRegistersList.getRef().shrink_to_fit();
@ -409,27 +403,18 @@ struct MultiLevelBatchAubFixture : public AUBFixture {
memoryManager->freeGraphicsMemory(helperSurface);
AUBFixture::tearDown();
}
};
void flushStream() {
DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags();
dispatchFlags.guardCommandBufferWithPipeControl = true;
csr->makeResident(*helperSurface);
if (this->heaplessStateInitEnabled) {
csr->flushTaskStateless(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
} else {
csr->flushTask(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
}
csr->flushTask(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
csr->flushBatchedSubmissions();
}
@ -446,7 +431,6 @@ struct MultiLevelBatchAubFixture : public AUBFixture {
GraphicsAllocation *secondLevelBatch = nullptr;
GraphicsAllocation *thirdLevelBatch = nullptr;
bool heaplessStateInitEnabled = false;
};
using MultiLevelBatchTestsWithNesting = Test<MultiLevelBatchAubFixture<true>>;

View File

@ -6,7 +6,6 @@
*/
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/register_offsets.h"
#include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/memory_manager.h"
@ -36,10 +35,6 @@ struct MiMath : public AUBFixture, public ::testing::Test {
streamAllocation = this->device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), MemoryConstants::pageSize, AllocationType::commandBuffer, device->getDeviceBitfield()});
taskStream = std::make_unique<LinearStream>(streamAllocation);
auto &compilerProductHelper = device->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(device->getHardwareInfo());
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
}
void TearDown() override {
this->device->getMemoryManager()->freeGraphicsMemory(streamAllocation);
@ -50,19 +45,11 @@ struct MiMath : public AUBFixture, public ::testing::Test {
DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags();
dispatchFlags.guardCommandBufferWithPipeControl = true;
if (this->heaplessStateInitEnabled) {
csr->flushTaskStateless(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeapType::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeapType::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeapType::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
} else {
csr->flushTask(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeapType::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeapType::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeapType::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
}
csr->flushTask(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeapType::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeapType::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeapType::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
csr->flushBatchedSubmissions();
}
@ -138,7 +125,6 @@ struct MiMath : public AUBFixture, public ::testing::Test {
const uint32_t numberOfOperationToLoadAddressToMiMathAccu = 7;
std::unique_ptr<LinearStream> taskStream;
GraphicsAllocation *streamAllocation = nullptr;
bool heaplessStateInitEnabled = false;
};
using MatcherIsDg2OrPvc = IsWithinProducts<IGFX_DG2, IGFX_PVC>;

View File

@ -10,7 +10,6 @@
#include "shared/source/command_container/walker_partition_xehp_and_later.h"
#include "shared/source/helpers/array_count.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/timestamp_packet.h"
#include "shared/source/utilities/io_functions.h"
#include "shared/source/utilities/tag_allocator.h"
@ -121,11 +120,6 @@ void AubWalkerPartitionZeroFixture::setUp() {
helperSurface = memoryManager->allocateGraphicsMemoryWithProperties(*commandBufferProperties);
memset(helperSurface->getUnderlyingBuffer(), 0, MemoryConstants::pageSize);
taskStream = std::make_unique<LinearStream>(streamAllocation);
auto &compilerProductHelper = device->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(device->getHardwareInfo());
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
}
void AubWalkerPartitionZeroFixture::tearDown() {
auto memoryManager = this->device->getMemoryManager();
@ -139,20 +133,11 @@ void AubWalkerPartitionZeroFixture::flushStream() {
dispatchFlags.guardCommandBufferWithPipeControl = true;
csr->makeResident(*helperSurface);
if (this->heaplessStateInitEnabled) {
csr->flushTaskStateless(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
} else {
csr->flushTask(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
}
csr->flushTask(*taskStream, 0,
&csr->getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&csr->getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
0u, dispatchFlags, device->getDevice());
csr->flushBatchedSubmissions();
}

View File

@ -120,7 +120,6 @@ struct AubWalkerPartitionFixture : public KernelAUBFixture<SimpleKernelFixture>
HardwareParse hwParser;
DispatchParameters dispatchParamters;
bool heaplessStateInitEnabled = false;
};
struct AubWalkerPartitionTest : public AubWalkerPartitionFixture,

View File

@ -29,8 +29,6 @@
using namespace NEO;
#include "shared/test/common/test_macros/header/heapless_matchers.h"
typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTaskTests;
HWTEST_F(CommandStreamReceiverFlushTaskTests, WhenFlushingTaskThenCommandStreamReceiverGetsUpdated) {
@ -762,7 +760,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskTests, GivenPreambleSentAndMediaSamplerR
EXPECT_NE(nullptr, getCommand<typename FamilyType::PIPELINE_SELECT>());
}
HWTEST2_F(CommandStreamReceiverFlushTaskTests, GivenStateBaseAddressNotSentWhenFlushingTaskThenStateBaseAddressIsSent, IsHeapfulSupported) {
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenStateBaseAddressNotSentWhenFlushingTaskThenStateBaseAddressIsSent) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.isPreambleSent = true;
commandStreamReceiver.setMediaVFEStateDirty(false);
@ -776,7 +774,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskTests, GivenStateBaseAddressNotSentWhenF
EXPECT_NE(cmdList.end(), stateBaseAddressItor);
}
HWTEST2_F(CommandStreamReceiverFlushTaskTests, GivenSizeChangedWhenFlushingTaskThenStateBaseAddressIsSent, IsHeapfulSupported) {
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenSizeChangedWhenFlushingTaskThenStateBaseAddressIsSent) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
auto dshSize = dsh.getMaxAvailableSpace();
auto iohSize = ioh.getMaxAvailableSpace();
@ -805,7 +803,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskTests, GivenSizeChangedWhenFlushingTaskT
EXPECT_NE(cmdList.end(), stateBaseAddressItor);
}
HWTEST2_F(CommandStreamReceiverFlushTaskTests, givenDshHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded, IsHeapfulSupported) {
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDshHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded) {
bool deviceUsesDsh = pDevice->getHardwareInfo().capabilityTable.supportsImages;
if (!deviceUsesDsh) {
GTEST_SKIP();
@ -821,7 +819,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskTests, givenDshHeapChangeWhenFlushTaskIs
EXPECT_NE(cmdList.end(), stateBaseAddressItor);
}
HWTEST2_F(CommandStreamReceiverFlushTaskTests, givenSshHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded, IsHeapfulSupported) {
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenSshHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
configureCSRtoNonDirtyState<FamilyType>(false);
@ -833,7 +831,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskTests, givenSshHeapChangeWhenFlushTaskIs
EXPECT_NE(cmdList.end(), stateBaseAddressItor);
}
HWTEST2_F(CommandStreamReceiverFlushTaskTests, givenIohHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded, IsHeapfulSupported) {
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenIohHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
configureCSRtoNonDirtyState<FamilyType>(false);
@ -845,7 +843,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskTests, givenIohHeapChangeWhenFlushTaskIs
EXPECT_NE(cmdList.end(), stateBaseAddressItor);
}
HWTEST2_F(CommandStreamReceiverFlushTaskTests, GivenStateBaseAddressNotChangedWhenFlushingTaskThenStateBaseAddressIsNotSent, IsHeapfulSupported) {
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenStateBaseAddressNotChangedWhenFlushingTaskThenStateBaseAddressIsNotSent) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.isPreambleSent = true;
configureCSRHeapStatesToNonDirty<FamilyType>();
@ -1271,14 +1269,14 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelRequiringDCFlush
cmdList.clear();
// Parse command list
parseCommands<FamilyType>(commandStreamTask, usedAfter - usedBefore);
parseCommands<FamilyType>(commandStreamTask, usedBefore);
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), itorPC);
EXPECT_NE(cmdList.end(), itorPC);
if (UnitTestHelper<FamilyType>::isPipeControlWArequired(pDevice->getHardwareInfo())) {
itorPC++;
itorPC = find<PIPE_CONTROL *>(itorPC, cmdList.end());
ASSERT_NE(cmdList.end(), itorPC);
EXPECT_NE(cmdList.end(), itorPC);
}
// Verify that the dcFlushEnabled bit is set in PC

View File

@ -216,7 +216,7 @@ HWTEST2_F(PreambleCfeStateXeHPAndLater, givenSetDebugFlagWhenPreambleCfeStateIsP
}
using XeHpCommandStreamReceiverFlushTaskTests = UltCommandStreamReceiverTest;
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamReceiverThenExpectStateBaseAddressEqualsIndirectObjectBaseAddress, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamReceiverThenExpectStateBaseAddressEqualsIndirectObjectBaseAddress) {
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
if (commandStreamReceiver.heaplessModeEnabled) {
@ -236,7 +236,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamRece
}
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOn, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOn) {
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
auto gmmHelper = pDevice->getRootDeviceEnvironment().getGmmHelper();
@ -261,7 +261,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseA
EXPECT_EQ(expectedMocsForStateless, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlState());
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOffWhenDebugFlagIsPresent, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOffWhenDebugFlagIsPresent) {
DebugManagerStateRestore restorer;
debugManager.flags.DisableCachingForHeaps.set(1);
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
@ -287,7 +287,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseA
EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlState());
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn) {
DebugManagerStateRestore restore;
debugManager.flags.ForceL1Caching.set(1u);
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
@ -303,7 +303,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, givenL3ToL1DebugFlagWhenState
EXPECT_EQ(expectedMocs, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlState());
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, givenForceL1CachingDebugFlagDisabledWhenStatelessMocsIsProgrammedThenItHasL3CachingOn, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, givenForceL1CachingDebugFlagDisabledWhenStatelessMocsIsProgrammedThenItHasL3CachingOn) {
DebugManagerStateRestore restore;
debugManager.flags.ForceL1Caching.set(0u);
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
@ -322,7 +322,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, givenForceL1CachingDebugFlagD
EXPECT_EQ(expectedMocs, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlState());
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamReceiverThenExpectBindlessBaseAddressEqualSurfaceStateBaseAddress, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamReceiverThenExpectBindlessBaseAddressEqualSurfaceStateBaseAddress) {
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
@ -343,7 +343,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamRece
EXPECT_EQ(bindlessSurfaceSize, stateBaseAddress->getBindlessSurfaceStateSize());
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamReceiverThenSetBindlessSamplerStateBaseAddressModifyEnable, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamReceiverThenSetBindlessSamplerStateBaseAddressModifyEnable) {
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
if (commandStreamReceiver.heaplessModeEnabled) {
@ -361,7 +361,7 @@ HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, whenFlushingCommandStreamRece
EXPECT_EQ(dsh.getHeapSizeInPages(), stateBaseAddress->getBindlessSamplerStateBufferSize());
}
HWTEST2_F(XeHpCommandStreamReceiverFlushTaskTests, givenDebugKeysThatOverrideMultiGpuSettingWhenStateBaseAddressIsProgrammedThenValuesMatch, IsHeapfulSupportedAndAtLeastXeHpCore) {
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, givenDebugKeysThatOverrideMultiGpuSettingWhenStateBaseAddressIsProgrammedThenValuesMatch) {
DebugManagerStateRestore restorer;
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();

View File

@ -2322,10 +2322,6 @@ inline void CommandStreamReceiverHw<GfxFamily>::handleBatchedDispatchImplicitFlu
}
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::programStateBaseAddressHeapless(Device &device, LinearStream &commandStream) {
}
template <typename GfxFamily>
inline BatchBuffer CommandStreamReceiverHw<GfxFamily>::prepareBatchBufferForSubmission(LinearStream &commandStreamTask,
size_t commandStreamStartTask,

View File

@ -54,6 +54,11 @@ SubmissionStatus CommandStreamReceiverHw<GfxFamily>::programHeaplessProlog(Devic
return SubmissionStatus::unsupported;
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::programStateBaseAddressHeapless(Device &device, LinearStream &commandStream) {
UNRECOVERABLE_IF(true);
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::programComputeModeHeapless(Device &device, LinearStream &commandStream) {
UNRECOVERABLE_IF(true);

View File

@ -5962,6 +5962,7 @@ HWTEST_F(CommandStreamReceiverHwHeaplessTest, whenHeaplessCommandStreamReceiverF
EXPECT_ANY_THROW(csr->flushTaskStateless(commandStream, 0, nullptr, nullptr, nullptr, 0, csr->recordedDispatchFlags, *pDevice));
EXPECT_ANY_THROW(csr->programHeaplessProlog(*pDevice));
EXPECT_ANY_THROW(csr->programStateBaseAddressHeapless(*pDevice, commandStream));
EXPECT_ANY_THROW(csr->programComputeModeHeapless(*pDevice, commandStream));
EXPECT_ANY_THROW(csr->getCmdSizeForHeaplessPrologue(*pDevice));
EXPECT_ANY_THROW(csr->handleAllocationsResidencyForHeaplessProlog(commandStream, *pDevice));
@ -6368,20 +6369,12 @@ HWTEST_F(CommandStreamReceiverHwTest, givenEpilogueStreamAvailableWhenFlushBcsTa
HWTEST_F(CommandStreamReceiverHwTest, givenEpilogueStreamAvailableWhenFlushImmediateTaskCalledThenDispachEpilogueCommandsIntoEpilogueStream) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
auto heaplessStateInit = commandStreamReceiver.heaplessStateInitialized;
// first flush can carry preamble, no interest in flags here
if (heaplessStateInit) {
commandStreamReceiver.flushImmediateTaskStateless(commandStream,
commandStream.getUsed(),
immediateFlushTaskFlags,
*pDevice);
} else {
commandStreamReceiver.flushImmediateTask(commandStream,
commandStream.getUsed(),
immediateFlushTaskFlags,
*pDevice);
}
// first flush can carry preamble, no interest in flags here
commandStreamReceiver.flushImmediateTask(commandStream,
commandStream.getUsed(),
immediateFlushTaskFlags,
*pDevice);
// regular dispatch here
GraphicsAllocation *commandBuffer = commandStreamReceiver.getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{commandStreamReceiver.getRootDeviceIndex(), MemoryConstants::pageSize});
@ -6394,18 +6387,10 @@ HWTEST_F(CommandStreamReceiverHwTest, givenEpilogueStreamAvailableWhenFlushImmed
immediateFlushTaskFlags.requireTaskCountUpdate = true;
immediateFlushTaskFlags.optionalEpilogueCmdStream = &epilogueStream;
if (heaplessStateInit) {
commandStreamReceiver.flushImmediateTaskStateless(commandStream,
commandStream.getUsed(),
immediateFlushTaskFlags,
*pDevice);
} else {
commandStreamReceiver.flushImmediateTask(commandStream,
commandStream.getUsed(),
immediateFlushTaskFlags,
*pDevice);
}
commandStreamReceiver.flushImmediateTask(commandStream,
commandStream.getUsed(),
immediateFlushTaskFlags,
*pDevice);
EXPECT_TRUE(commandStreamReceiver.isMadeResident(commandBuffer));
EXPECT_TRUE(commandStreamReceiver.latestFlushedBatchBuffer.dispatchMonitorFence);