Add Unrecoverable if GraphicsAllocation in use is being destroyed.

Change-Id: I74a54ef023c62e12d711db07d79942166e002188
This commit is contained in:
Mrozek, Michal
2018-01-17 16:23:51 +01:00
committed by sys_ocldev
parent a9a24e82e5
commit e923c2211b
4 changed files with 19 additions and 5 deletions

View File

@@ -87,11 +87,6 @@ Device::~Device() {
performanceCounters->shutdown();
}
delete commandStreamReceiver;
if (memoryManager) {
memoryManager->freeGraphicsMemory(tagAllocation);
}
tagAllocation = nullptr;
commandStreamReceiver = nullptr;
if (memoryManager) {
if (preemptionAllocation) {
memoryManager->freeGraphicsMemory(preemptionAllocation);
@@ -99,6 +94,11 @@ Device::~Device() {
}
memoryManager->waitForDeletions();
}
if (memoryManager) {
memoryManager->freeGraphicsMemory(tagAllocation);
}
tagAllocation = nullptr;
commandStreamReceiver = nullptr;
delete memoryManager;
memoryManager = nullptr;
alignedFree(this->slmWindowStartAddress);

View File

@@ -90,6 +90,8 @@ class Device : public BaseObject<_cl_device_id> {
}
CommandStreamReceiver &getCommandStreamReceiver();
CommandStreamReceiver *peekCommandStreamReceiver();
volatile uint32_t *getTagAddress() const;
const char *getProductAbbrev() const;
@@ -176,6 +178,10 @@ inline CommandStreamReceiver &Device::getCommandStreamReceiver() {
return *commandStreamReceiver;
}
inline CommandStreamReceiver *Device::peekCommandStreamReceiver() {
return commandStreamReceiver;
}
inline volatile uint32_t *Device::getTagAddress() const {
return tagAddress;
}