mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
Add refcount on MemObj in blocked scenarios.
- Prevents destruction of MemObj while it may still be in use. - Add UNRECOVERABLE to check whether object is deleted while having dependencies, fix all problems is tests due to that fact. - Fix special queue setting, clean interfaces. Change-Id: I2a467e80df00ea1650decdcfa6866acf10b441f8
This commit is contained in:
committed by
sys_ocldev
parent
c838a7dfc6
commit
b00819cafe
@@ -123,7 +123,9 @@ CommandQueue::~CommandQueue() {
|
||||
}
|
||||
}
|
||||
|
||||
if (context && !context->isSpecialQueue(this)) {
|
||||
//for normal queue, decrement ref count on context
|
||||
//special queue is owned by context so ref count doesn't have to be decremented
|
||||
if (context && !isSpecialCommandQueue) {
|
||||
context->decRefInternal();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,6 +372,10 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
|
||||
bool setPerfCountersEnabled(bool perfCountersEnabled, cl_uint configuration);
|
||||
|
||||
void setIsSpecialCommandQueue(bool newValue) {
|
||||
this->isSpecialCommandQueue = newValue;
|
||||
}
|
||||
|
||||
uint16_t getPerfCountersUserRegistersNumber() {
|
||||
return perfCountersUserRegistersNumber;
|
||||
}
|
||||
@@ -406,6 +410,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
IndirectHeap *indirectHeap[NUM_HEAPS];
|
||||
|
||||
bool mapDcFlushRequired = false;
|
||||
bool isSpecialCommandQueue = false;
|
||||
};
|
||||
|
||||
typedef CommandQueue *(*CommandQueueCreateFunc)(
|
||||
|
||||
Reference in New Issue
Block a user