Commit c6fc7ccb authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #9968 from alalek:fix_9960

parents 37d99201 7809c415
......@@ -3613,11 +3613,12 @@ public:
if (u->tempUMat())
{
CV_Assert(u->mapcount == 0);
flushCleanupQueue(); // workaround for CL_OUT_OF_RESOURCES problem (#9960)
void* data = clEnqueueMapBuffer(q, (cl_mem)u->handle, CL_TRUE,
(CL_MAP_READ | CL_MAP_WRITE),
0, u->size, 0, 0, 0, &retval);
CV_Assert(retval == CL_SUCCESS);
CV_Assert(u->origdata == data);
CV_OclDbgAssert(retval == CL_SUCCESS);
if (u->originalUMatData)
{
CV_Assert(u->originalUMatData->data == data);
......
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