[gegl] video-degradataion: fix to opencl misbehavior by jan vesely
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] video-degradataion: fix to opencl misbehavior by jan vesely
- Date: Sun, 15 May 2016 14:04:10 +0000 (UTC)
commit 734a53526bb90b37370ee01eb28c1747590d6ebf
Author: Øyvind Kolås <pippin gimp org>
Date: Sun May 15 14:06:36 2016 +0200
video-degradataion: fix to opencl misbehavior by jan vesely
operations/common/video-degradation.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/operations/common/video-degradation.c b/operations/common/video-degradation.c
index 29197ff..e01e050 100644
--- a/operations/common/video-degradation.c
+++ b/operations/common/video-degradation.c
@@ -201,13 +201,16 @@ cl_process (GeglOperation *operation,
const size_t gbl_size[2] = {roi->width, roi->height};
const size_t gbl_off[2] = {roi->x, roi->y};
cl_int cl_err = 0;
+ cl_mem filter_pat = NULL;
- cl_mem filter_pat = gegl_clCreateBuffer (gegl_cl_get_context (),
- CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
- pattern_width[o->pattern] *
- pattern_height[o->pattern] * sizeof(cl_int),
- (void*)pattern[o->pattern],
- &cl_err);
+ if (!cl_data)
+ goto error;
+ filter_pat = gegl_clCreateBuffer (gegl_cl_get_context (),
+ CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
+ pattern_width[o->pattern] *
+ pattern_height[o->pattern] * sizeof(cl_int),
+ (void*)pattern[o->pattern],
+ &cl_err);
CL_CHECK;
cl_err = gegl_cl_set_kernel_args (cl_data->kernel[0],
sizeof(cl_mem), &in_buf,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]