提交 00890aec 编写于 作者: A Alexander Alekhin

core(ocl): fix ocl::Image2d::isFormatSupported()

in case of OPENCV_OPENCL_DEVICE=disabled
上级 2171cae8
......@@ -6458,6 +6458,9 @@ struct Image2D::Impl
CV_Error(Error::OpenCLApiCallError, "OpenCL runtime not found!");
cl_context context = (cl_context)Context::getDefault().ptr();
if (!context)
return false;
// Figure out how many formats are supported by this context.
cl_uint numFormats = 0;
cl_int err = clGetSupportedImageFormats(context, CL_MEM_READ_WRITE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册