mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
trying to guess and fix strange failure in core test
This commit is contained in:
parent
d7f4a223cf
commit
f263fe145a
@ -2719,17 +2719,17 @@ public:
|
||||
cl_command_queue q = (cl_command_queue)Queue::getDefault().ptr();
|
||||
clFinish(q);
|
||||
|
||||
UMatDataAutoLock lock(u);
|
||||
|
||||
if( u->hostCopyObsolete() && u->handle &&
|
||||
u->tempCopiedUMat() && u->refcount > 0 && u->origdata)
|
||||
{
|
||||
UMatDataAutoLock lock(u);
|
||||
clEnqueueReadBuffer(q, (cl_mem)u->handle, CL_TRUE, 0,
|
||||
u->size, u->origdata, 0, 0, 0);
|
||||
u->markHostCopyObsolete(false);
|
||||
}
|
||||
else if( u->copyOnMap() && u->deviceCopyObsolete() && u->data )
|
||||
{
|
||||
UMatDataAutoLock lock(u);
|
||||
clEnqueueWriteBuffer(q, (cl_mem)u->handle, CL_TRUE, 0,
|
||||
u->size, u->data, 0, 0, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user