SWDEV-491375 - Limit the SW batch size

Applications may submit commands withoout waits
for GPU. That causes a growth of SW unreleased commands.
Make sure runtime flushes SW queue, if it grows over some
threshold, controlled by DEBUG_CLR_MAX_BATCH_SIZE.

Change-Id: Ia4d85c24210ef91c394f638ab6b53b14323a0396
This commit is contained in:
German Andryeyev
2024-10-15 15:03:47 -04:00
parent df9ae754a4
commit 8657a77029
4 changed files with 19 additions and 8 deletions
+2 -1
View File
@@ -373,7 +373,7 @@ void Command::enqueue() {
EnableProfiling();
// Update batch head for the current marker. Hence the status of all commands can be
// updated upon the marker completion
SetBatchHead(queue_->GetSubmittionBatch());
SetBatchHead(queue_->GetSubmissionBatch());
submit(*queue_->vdev());
@@ -381,6 +381,7 @@ void Command::enqueue() {
queue_->ResetSubmissionBatch();
} else {
submit(*queue_->vdev());
queue_->FlushSubmissionBatch(this);
}
} else {
queue_->append(*this);