pull/4233/head
Alexander Alekhin 9 years ago
parent cd5c70691a
commit 9bcccb028b
  1. 9
      modules/core/src/ocl.cpp
  2. 7
      modules/core/test/test_umat.cpp

@ -4516,7 +4516,14 @@ public:
}
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);

@ -897,8 +897,9 @@ TEST(UMat, ReadBufferRect)
EXPECT_MAT_NEAR(t, t2, 0);
}
// 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
{
@ -935,6 +936,7 @@ TEST(UMat, DISABLED_synchronization_map_unmap)
}
}
TEST(UMat, async_unmap)
{
for (int i = 0; i < 20; i++)
@ -961,6 +963,7 @@ TEST(UMat, async_unmap)
}
}
TEST(UMat, unmap_in_class)
{
class Logic
@ -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;
try

Loading…
Cancel
Save