Revert "fix: Flush caches on cmd list destroy with debugger"
This reverts commit 3b4d879321
.
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
6941aa6a83
commit
04108b9afa
|
@ -54,21 +54,21 @@ ze_result_t CommandListImp::destroy() {
|
||||||
getCsr(false)->waitForCompletionWithTimeout(NEO::WaitParams{false, false, false, timeoutMicroseconds}, getCsr(false)->peekTaskCount());
|
getCsr(false)->waitForCompletionWithTimeout(NEO::WaitParams{false, false, false, timeoutMicroseconds}, getCsr(false)->peekTaskCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto flushCachesForDebugger = this->getDevice() && this->getDevice()->getL0Debugger() && this->getDevice()->getProductHelper().isDcFlushAllowed();
|
if (!isImmediateType() &&
|
||||||
if (!isCopyOnly(false) &&
|
!isCopyOnly(false) &&
|
||||||
((!isImmediateType() && this->stateBaseAddressTracking) || flushCachesForDebugger) &&
|
this->stateBaseAddressTracking &&
|
||||||
this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps) {
|
this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps) {
|
||||||
|
|
||||||
auto surfaceStateHeap = this->commandContainer.getIndirectHeap(NEO::HeapType::surfaceState);
|
auto surfaceStateHeap = this->commandContainer.getIndirectHeap(NEO::HeapType::surfaceState);
|
||||||
|
if (surfaceStateHeap) {
|
||||||
|
auto heapAllocation = surfaceStateHeap->getGraphicsAllocation();
|
||||||
|
|
||||||
if (flushCachesForDebugger || surfaceStateHeap) {
|
|
||||||
auto rootDeviceIndex = device->getRootDeviceIndex();
|
auto rootDeviceIndex = device->getRootDeviceIndex();
|
||||||
auto &deviceEngines = device->getNEODevice()->getMemoryManager()->getRegisteredEngines(rootDeviceIndex);
|
auto &deviceEngines = device->getNEODevice()->getMemoryManager()->getRegisteredEngines(rootDeviceIndex);
|
||||||
for (auto &engine : deviceEngines) {
|
for (auto &engine : deviceEngines) {
|
||||||
if (NEO::EngineHelpers::isComputeEngine(engine.getEngineType())) {
|
if (NEO::EngineHelpers::isComputeEngine(engine.getEngineType())) {
|
||||||
auto contextId = engine.osContext->getContextId();
|
auto contextId = engine.osContext->getContextId();
|
||||||
if (engine.osContext->isInitialized() &&
|
if (heapAllocation->isUsedByOsContext(contextId) && engine.osContext->isInitialized() && heapAllocation->getTaskCount(contextId) > 0) {
|
||||||
((flushCachesForDebugger && engine.commandStreamReceiver->isDirectSubmissionEnabled()) || (surfaceStateHeap && surfaceStateHeap->getGraphicsAllocation()->isUsedByOsContext(contextId) && surfaceStateHeap->getGraphicsAllocation()->getTaskCount(contextId) > 0))) {
|
|
||||||
engine.commandStreamReceiver->sendRenderStateCacheFlush();
|
engine.commandStreamReceiver->sendRenderStateCacheFlush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
#include "shared/test/common/helpers/mock_product_helper_hw.h"
|
#include "shared/test/common/helpers/mock_product_helper_hw.h"
|
||||||
#include "shared/test/common/helpers/raii_product_helper.h"
|
#include "shared/test/common/helpers/raii_product_helper.h"
|
||||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
|
||||||
#include "shared/test/common/mocks/mock_bindless_heaps_helper.h"
|
#include "shared/test/common/mocks/mock_bindless_heaps_helper.h"
|
||||||
#include "shared/test/common/mocks/mock_gmm_helper.h"
|
#include "shared/test/common/mocks/mock_gmm_helper.h"
|
||||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||||
|
@ -79,37 +78,6 @@ TEST_F(L0DebuggerTest, givenL0DebuggerWhenGettingStateSaveAreaHeaderThenValidSip
|
||||||
EXPECT_EQ(expectedStateSaveAreaHeader, stateSaveAreaHeader);
|
EXPECT_EQ(expectedStateSaveAreaHeader, stateSaveAreaHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(L0DebuggerTest, givenL0DebuggerAndDirectSubmissionWhenDestroyCmdListThenFlushTagUpdateOnDcFlushPlatform) {
|
|
||||||
auto &engine = device->getNEODevice()->getDefaultEngine();
|
|
||||||
engine.osContext->ensureContextInitialized(false);
|
|
||||||
auto csr = reinterpret_cast<UltCommandStreamReceiver<FamilyType> *>(engine.commandStreamReceiver);
|
|
||||||
csr->directSubmissionAvailable = true;
|
|
||||||
csr->callBaseSendRenderStateCacheFlush = false;
|
|
||||||
csr->flushReturnValue = NEO::SubmissionStatus::success;
|
|
||||||
|
|
||||||
ze_result_t returnValue{};
|
|
||||||
L0::CommandList *commandList = L0::CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false);
|
|
||||||
commandList->destroy();
|
|
||||||
|
|
||||||
if (device->getProductHelper().isDcFlushAllowed()) {
|
|
||||||
EXPECT_TRUE(csr->renderStateCacheFlushed);
|
|
||||||
} else {
|
|
||||||
EXPECT_FALSE(csr->renderStateCacheFlushed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST_F(L0DebuggerTest, givenL0DebuggerWhenDestroyCmdListThenDoNotFlushTagUpdate) {
|
|
||||||
auto &engine = device->getNEODevice()->getDefaultEngine();
|
|
||||||
engine.osContext->ensureContextInitialized(false);
|
|
||||||
auto csr = reinterpret_cast<UltCommandStreamReceiver<FamilyType> *>(engine.commandStreamReceiver);
|
|
||||||
|
|
||||||
ze_result_t returnValue{};
|
|
||||||
L0::CommandList *commandList = L0::CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false);
|
|
||||||
commandList->destroy();
|
|
||||||
|
|
||||||
EXPECT_FALSE(csr->renderStateCacheFlushed);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(L0DebuggerTest, givenProgramDebuggingEnabledWhenDebuggerIsCreatedThenFusedEusAreDisabled) {
|
TEST_F(L0DebuggerTest, givenProgramDebuggingEnabledWhenDebuggerIsCreatedThenFusedEusAreDisabled) {
|
||||||
EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::online);
|
EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::online);
|
||||||
EXPECT_FALSE(neoDevice->getHardwareInfo().capabilityTable.fusedEuEnabled);
|
EXPECT_FALSE(neoDevice->getHardwareInfo().capabilityTable.fusedEuEnabled);
|
||||||
|
|
Loading…
Reference in New Issue