When OpenCL kernels are compiled, is_compiled flag is being set for each kernel. But, in opencl uninit, this flag is not being cleared. This causes an error when an OpenCL kernel is tried on different OpenCL devices on same platform.
Here is the patch with a fix >From df43e0aaad951c43fa7f4c9d9e074fd6b2d09792 Mon Sep 17 00:00:00 2001 From: srikanth <gska...@gmail.com> Date: Wed, 4 Mar 2015 17:46:13 -0600 Subject: [PATCH] Bug Fix: When OpenCL kernels are compiled, is_compiled flag is being set. But, on opencl uninit, this flag is not being cleared. When openCl uninit is done and again use OpenCl for different device on same platform, we get an error as is_compiled flag stays set. --- libavutil/opencl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/opencl.c b/libavutil/opencl.c index 36cb6fe..a56029c 100644 --- a/libavutil/opencl.c +++ b/libavutil/opencl.c @@ -611,6 +611,9 @@ void av_opencl_uninit(void) } opencl_ctx.context = NULL; } + for (i = 0; i < opencl_ctx.kernel_code_count; i++) { + opencl_ctx.kernel_code[i].is_compiled = 0; + } free_device_list(&opencl_ctx.device_list); end: if (opencl_ctx.init_count <= 0) -- 1.9.0.msysgit.0 Regards Srikanth
0001-Bug-Fix-When-OpenCL-kernels-are-compiled-is_compiled.patch
Description: Binary data
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel