performance: Limit tlb flush in state cache flush to wddm

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-05-06 09:27:41 +00:00
committed by Compute-Runtime-Automation
parent 0a59a26a2c
commit c1004b77bf
9 changed files with 21 additions and 10 deletions

View File

@@ -98,7 +98,7 @@ struct UnitTestHelper {
static size_t getAdditionalDshSize(uint32_t iddCount);
static bool expectNullDsh(const DeviceInfo &deviceInfo);
static bool findStateCacheFlushPipeControl(LinearStream &csrStream);
static bool findStateCacheFlushPipeControl(CommandStreamReceiver &csr, LinearStream &csrStream);
static void verifyDummyBlitWa(const RootDeviceEnvironment *rootDeviceEnvironment, GenCmdList::iterator &cmdIterator);
static GenCmdList::iterator findWalkerCmd(GenCmdList::iterator begin, GenCmdList::iterator end, bool heapless);
};

View File

@@ -79,7 +79,7 @@ bool UnitTestHelper<GfxFamily>::expectNullDsh(const DeviceInfo &deviceInfo) {
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::findStateCacheFlushPipeControl(LinearStream &csrStream) {
bool UnitTestHelper<GfxFamily>::findStateCacheFlushPipeControl(CommandStreamReceiver &csr, LinearStream &csrStream) {
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
HardwareParse hwParserCsr;
@@ -94,8 +94,8 @@ bool UnitTestHelper<GfxFamily>::findStateCacheFlushPipeControl(LinearStream &csr
if (pipeControl->getRenderTargetCacheFlushEnable() &&
pipeControl->getStateCacheInvalidationEnable() &&
pipeControl->getTlbInvalidate() &&
pipeControl->getTextureCacheInvalidationEnable()) {
pipeControl->getTextureCacheInvalidationEnable() &&
((csr.isTlbFlushRequiredForStateCacheFlush() && pipeControl->getTlbInvalidate()) || (!csr.isTlbFlushRequiredForStateCacheFlush() && !pipeControl->getTlbInvalidate()))) {
stateCacheFlushFound = true;
break;
}

View File

@@ -3405,7 +3405,7 @@ HWTEST_F(CommandStreamReceiverHwTest, givenFlushPipeControlWhenFlushWithoutState
commandStreamReceiver.flushPipeControl(false);
EXPECT_FALSE(UnitTestHelper<FamilyType>::findStateCacheFlushPipeControl(commandStreamReceiver.commandStream));
EXPECT_FALSE(UnitTestHelper<FamilyType>::findStateCacheFlushPipeControl(commandStreamReceiver, commandStreamReceiver.commandStream));
}
HWTEST_F(CommandStreamReceiverHwTest, givenFlushPipeControlWhenFlushWithStateCacheFlushThenExpectStateCacheFlushFlagsSet) {
@@ -3413,7 +3413,7 @@ HWTEST_F(CommandStreamReceiverHwTest, givenFlushPipeControlWhenFlushWithStateCac
commandStreamReceiver.sendRenderStateCacheFlush();
EXPECT_TRUE(UnitTestHelper<FamilyType>::findStateCacheFlushPipeControl(commandStreamReceiver.commandStream));
EXPECT_TRUE(UnitTestHelper<FamilyType>::findStateCacheFlushPipeControl(commandStreamReceiver, commandStreamReceiver.commandStream));
}
HWTEST2_F(CommandStreamReceiverHwTest,