mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
fix(ocl): handle gl sharing displayable textures
Displayable textures always need dc flush. Related-To: NEO-11694 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d1e56b4e1e
commit
76e8be5c39
@@ -622,12 +622,14 @@ cl_int CommandQueue::enqueueReleaseSharedObjects(cl_uint numObjects, const cl_me
|
||||
}
|
||||
|
||||
bool isImageReleased = false;
|
||||
bool isDisplayableReleased = false;
|
||||
for (unsigned int object = 0; object < numObjects; object++) {
|
||||
auto memObject = castToObject<MemObj>(memObjects[object]);
|
||||
if (memObject == nullptr || memObject->peekSharingHandler() == nullptr) {
|
||||
return CL_INVALID_MEM_OBJECT;
|
||||
}
|
||||
isImageReleased |= memObject->getMultiGraphicsAllocation().getAllocationType() == AllocationType::sharedImage;
|
||||
isDisplayableReleased |= memObject->isMemObjDisplayable();
|
||||
|
||||
memObject->peekSharingHandler()->release(memObject, getDevice().getRootDeviceIndex());
|
||||
DEBUG_BREAK_IF(memObject->acquireCount <= 0);
|
||||
@@ -635,7 +637,7 @@ cl_int CommandQueue::enqueueReleaseSharedObjects(cl_uint numObjects, const cl_me
|
||||
}
|
||||
|
||||
if (this->getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled()) {
|
||||
if (this->getDevice().getProductHelper().isDcFlushMitigated()) {
|
||||
if (this->getDevice().getProductHelper().isDcFlushMitigated() || isDisplayableReleased) {
|
||||
this->getGpgpuCommandStreamReceiver().registerDcFlushForDcMitigation();
|
||||
this->getGpgpuCommandStreamReceiver().sendRenderStateCacheFlush();
|
||||
} else if (isImageReleased) {
|
||||
|
||||
Reference in New Issue
Block a user