Zhigang Gong 2e49ca4903 Avoid unmap an umat(ocl) which hasn't been mapped at all.
According to opencl 1.2 spec 5.4.2:
  enqueues a command to unmap a previously mapped region of a memory object.
  ...
  CL_INVALID_VALUE if mapped_ptr is not a valid pointer returned by
  clEnqueueMapBuffer, or clEnqueueMapImage for memobj.

So if the u->data is not from a clEnqueueMapBuffer call, we should not
call clEnqueueUnmapMemObject() unmap it. With this patch, the cases
./opencv_test_video --gtest_filter=OCL_Video/FarnebackOpticalFlow.Mat/*
could work well with beignet 0.9.1, Otherwise, it will get a
CL_INVALID_VALUE at the clEnqueueUnmapMemObject().

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2014-07-09 16:21:20 +08:00
..
2014-02-25 14:14:42 +04:00
2014-04-17 18:06:14 +04:00
2014-02-04 16:48:35 +04:00
2014-04-28 19:40:11 +00:00
2013-09-02 14:00:44 +04:00
2013-09-02 14:00:44 +04:00
2014-02-04 19:55:11 +04:00
2013-08-21 18:59:25 +04:00
2014-04-03 14:53:27 +04:00
2013-11-28 00:45:58 +01:00
2014-01-17 11:13:28 +04:00
2014-02-19 20:58:40 +05:30