Ensure that submissions are flushed prior to csr destruction.

Change-Id: Ie04de561d3d295f40f55a19f01274d873d259abd
This commit is contained in:
Mrozek, Michal
2018-03-09 14:48:42 +01:00
parent 3d139c204e
commit 8254d6a081
10 changed files with 78 additions and 18 deletions

View File

@@ -92,8 +92,12 @@ Device::~Device() {
if (performanceCounters) {
performanceCounters->shutdown();
}
delete commandStreamReceiver;
commandStreamReceiver = nullptr;
if (commandStreamReceiver) {
commandStreamReceiver->flushBatchedSubmissions();
delete commandStreamReceiver;
commandStreamReceiver = nullptr;
}
if (memoryManager) {
if (preemptionAllocation) {
memoryManager->freeGraphicsMemory(preemptionAllocation);