Fix redundant state base address dispatch

This fix handles scenario when regular command list uses context first,
then immediate command list is used for the first time.

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2023-02-28 19:46:30 +00:00
committed by Compute-Runtime-Automation
parent ce1a56e406
commit 42b8a536db
4 changed files with 37 additions and 3 deletions

View File

@@ -1255,6 +1255,9 @@ void CommandQueueHw<gfxCoreFamily>::updateBaseAddressState(CommandList *lastComm
if (ssh != nullptr) {
csrHw->getSshState().updateAndCheck(ssh);
}
auto ioh = lastCommandList->commandContainer.getIndirectHeap(NEO::HeapType::INDIRECT_OBJECT);
csrHw->getIohState().updateAndCheck(ioh);
}
template <GFXCORE_FAMILY gfxCoreFamily>

View File

@@ -1708,9 +1708,13 @@ HWTEST2_F(CommandListStateBaseAddressTest,
EXPECT_EQ(ssBaseAddress, sbaCmd->getSurfaceStateBaseAddress());
EXPECT_EQ((statlessMocs << 1), sbaCmd->getStatelessDataPortAccessMemoryObjectControlState());
auto &csrImmediate = neoDevice->getUltCommandStreamReceiver<FamilyType>();
auto csrIohStateCopy = csrImmediate.getIohState();
bool iohDirty = csrIohStateCopy.updateAndCheck(container.getIndirectHeap(NEO::HeapType::INDIRECT_OBJECT));
EXPECT_FALSE(iohDirty);
auto &containerImmediate = commandListImmediate->commandContainer;
auto &csrImmediate = neoDevice->getUltCommandStreamReceiver<FamilyType>();
auto &csrStream = csrImmediate.commandStream;
size_t csrUsedBefore = csrStream.getUsed();