Commit 579a7fff authored by Alexander Alekhin's avatar Alexander Alekhin

ocl: restore clFinish() in unmap() for AMD devices

This reverts commit 7d91b8ef.
parent e40567ea
......@@ -3979,6 +3979,11 @@ public:
u->markDeviceMemMapped(false);
CV_Assert( (retval = clEnqueueUnmapMemObject(q,
(cl_mem)u->handle, u->data, 0, 0, 0)) == CL_SUCCESS );
if (Device::getDefault().isAMD())
{
// required for multithreaded applications (see stitching test)
CV_OclDbgAssert(clFinish(q) == CL_SUCCESS);
}
u->data = 0;
}
else if( u->copyOnMap() && u->deviceCopyObsolete() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment