add condition to skip unmapping for internally allocated host memory. this should fix map_unmap_counting UMat test.
This commit is contained in:
parent
8e5ce69ee8
commit
58934f1e16
@ -4572,6 +4572,8 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// CL_MEM_USE_HOST_PTR (nothing is required) and OTHER cases
|
// CL_MEM_USE_HOST_PTR (nothing is required) and OTHER cases
|
||||||
|
if (u->flags & UMatData::USER_ALLOCATED)
|
||||||
|
{
|
||||||
cl_int retval = 0;
|
cl_int retval = 0;
|
||||||
void* data = clEnqueueMapBuffer(q, (cl_mem)u->handle, CL_TRUE,
|
void* data = clEnqueueMapBuffer(q, (cl_mem)u->handle, CL_TRUE,
|
||||||
(CL_MAP_READ | CL_MAP_WRITE),
|
(CL_MAP_READ | CL_MAP_WRITE),
|
||||||
@ -4581,6 +4583,7 @@ public:
|
|||||||
CV_OclDbgAssert(clFinish(q) == CL_SUCCESS);
|
CV_OclDbgAssert(clFinish(q) == CL_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
u->markHostCopyObsolete(false);
|
u->markHostCopyObsolete(false);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_OPENCL_SVM
|
#ifdef HAVE_OPENCL_SVM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user