Commit 9bcccb02 authored by Alexander Alekhin's avatar Alexander Alekhin

fixes

parent cd5c7069
...@@ -4516,7 +4516,14 @@ public: ...@@ -4516,7 +4516,14 @@ public:
} }
else else
{ {
// nothing with CL_MEM_USE_HOST_PTR // CL_MEM_USE_HOST_PTR (nothing is required) and OTHER cases
cl_int retval = 0;
void* data = clEnqueueMapBuffer(q, (cl_mem)u->handle, CL_TRUE,
(CL_MAP_READ | CL_MAP_WRITE),
0, u->size, 0, 0, 0, &retval);
CV_OclDbgAssert(retval == CL_SUCCESS);
CV_OclDbgAssert(clEnqueueUnmapMemObject(q, (cl_mem)u->handle, data, 0, 0, 0) == CL_SUCCESS);
CV_OclDbgAssert(clFinish(q) == CL_SUCCESS);
} }
} }
u->markHostCopyObsolete(false); u->markHostCopyObsolete(false);
......
...@@ -897,8 +897,9 @@ TEST(UMat, ReadBufferRect) ...@@ -897,8 +897,9 @@ TEST(UMat, ReadBufferRect)
EXPECT_MAT_NEAR(t, t2, 0); EXPECT_MAT_NEAR(t, t2, 0);
} }
// Use iGPU or OPENCV_OPENCL_DEVICE=:CPU: to catch problem // Use iGPU or OPENCV_OPENCL_DEVICE=:CPU: to catch problem
TEST(UMat, DISABLED_synchronization_map_unmap) TEST(UMat, synchronization_map_unmap)
{ {
class TestParallelLoopBody : public cv::ParallelLoopBody class TestParallelLoopBody : public cv::ParallelLoopBody
{ {
...@@ -935,6 +936,7 @@ TEST(UMat, DISABLED_synchronization_map_unmap) ...@@ -935,6 +936,7 @@ TEST(UMat, DISABLED_synchronization_map_unmap)
} }
} }
TEST(UMat, async_unmap) TEST(UMat, async_unmap)
{ {
for (int i = 0; i < 20; i++) for (int i = 0; i < 20; i++)
...@@ -961,6 +963,7 @@ TEST(UMat, async_unmap) ...@@ -961,6 +963,7 @@ TEST(UMat, async_unmap)
} }
} }
TEST(UMat, unmap_in_class) TEST(UMat, unmap_in_class)
{ {
class Logic class Logic
...@@ -1024,7 +1027,7 @@ TEST(UMat, map_unmap_counting) ...@@ -1024,7 +1027,7 @@ TEST(UMat, map_unmap_counting)
TEST(UMat, Test_same_behaviour_read_and_read) TEST(UMat, DISABLED_Test_same_behaviour_read_and_read)
{ {
bool exceptionDetected = false; bool exceptionDetected = false;
try try
......
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