[fix] invalidate state caches only for heaps used by initialized context

This is number of small tweaks to state cache invalidation:
1. Invalidate if heap was actually created.
2. Check if os context was actually initialized.
3. Heap allocation was actually submitted, as it might attain zero task count
value, when allocation is stored in csr internal storage, as csr wasn't used,
but the csr task count being zero is assigned to heap allocation when stored.

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2023-04-04 19:15:07 +00:00
committed by Compute-Runtime-Automation
parent 5a4c10bec2
commit 9ce5351d3f
6 changed files with 130 additions and 13 deletions

View File

@@ -382,6 +382,13 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
pollForCompletionCalled++;
}
SubmissionStatus sendRenderStateCacheFlush() override {
if (callBaseSendRenderStateCacheFlush) {
return BaseClass::sendRenderStateCacheFlush();
}
return *flushReturnValue;
}
std::vector<std::string> aubCommentMessages;
BatchBuffer latestFlushedBatchBuffer = {};
@@ -430,6 +437,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
bool shouldFlushBatchedSubmissionsReturnSuccess = false;
bool callBaseFillReusableAllocationsList = false;
bool callBaseFlushBcsTask{true};
bool callBaseSendRenderStateCacheFlush = true;
};
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -12,6 +12,7 @@ namespace NEO {
class MockOsContext : public OsContext {
public:
using OsContext::checkDirectSubmissionSupportsEngine;
using OsContext::contextInitialized;
using OsContext::debuggableContext;
using OsContext::engineType;
using OsContext::engineUsage;