1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

ocl: CL_MEM_USE_HOST_PTR workaround test

This commit is contained in:
Alexander Alekhin
2018-04-20 14:51:55 +03:00
parent 7ea5029ae5
commit d76b41b50e
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -4666,7 +4666,9 @@ public:
#endif
{
tempUMatFlags = UMatData::TEMP_UMAT;
if (u->origdata == cv::alignPtr(u->origdata, 4)) // There are OpenCL runtime issues for less aligned data
if (u->origdata == cv::alignPtr(u->origdata, 4) // There are OpenCL runtime issues for less aligned data
&& !(u->originalUMatData && u->originalUMatData->handle) // Avoid sharing of host memory between OpenCL buffers
)
{
handle = clCreateBuffer(ctx_handle, CL_MEM_USE_HOST_PTR|createFlags,
u->size, u->origdata, &retval);