Flush tag only if needed in deferred deleter

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-04-07 14:42:23 +00:00
committed by Compute-Runtime-Automation
parent dad49bd2ee
commit fffcf2612e
2 changed files with 25 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -27,7 +27,9 @@ bool DeferrableAllocationDeletion::apply() {
} else {
isStillUsed = true;
engine.commandStreamReceiver->flushBatchedSubmissions();
engine.commandStreamReceiver->updateTagFromWait();
if (engine.commandStreamReceiver->peekLatestFlushedTaskCount() < graphicsAllocation.getTaskCount(contextId)) {
engine.commandStreamReceiver->updateTagFromWait();
}
}
}
}