[gegl] opencl: bug in gegl:opacity



commit d1b044b0234b7bca5968578583ff14343c8d6673
Author: Victor Oliveira <victormatheus gmail com>
Date:   Mon Jan 28 22:01:36 2013 -0200

    opencl: bug in gegl:opacity

 operations/common/opacity.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/opacity.c b/operations/common/opacity.c
index 3314e7f..3c454ac 100644
--- a/operations/common/opacity.c
+++ b/operations/common/opacity.c
@@ -208,6 +208,7 @@ cl_process (GeglOperation       *op,
 {
   cl_int cl_err = 0;
   int kernel;
+  gfloat value;
 
   if (!cl_data)
     {
@@ -216,13 +217,17 @@ cl_process (GeglOperation       *op,
     }
   if (!cl_data) return TRUE;
 
+  value = GEGL_CHANT_PROPERTIES (op)->value;
+
   kernel = (GEGL_CHANT_PROPERTIES (op)->chant_data != NULL);
 
-  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 0, sizeof(cl_mem), (void*)&in_tex);
+  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 0, sizeof(cl_mem),   (void*)&in_tex);
+  CL_CHECK;
+  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 1, sizeof(cl_mem),   (void*)&aux_tex);
   CL_CHECK;
-  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 1, sizeof(cl_mem), (void*)&aux_tex);
+  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 2, sizeof(cl_mem),   (void*)&out_tex);
   CL_CHECK;
-  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 2, sizeof(cl_mem), (void*)&out_tex);
+  cl_err = gegl_clSetKernelArg(cl_data->kernel[kernel], 3, sizeof(cl_float), (void*)&value);
   CL_CHECK;
 
   cl_err = gegl_clEnqueueNDRangeKernel(gegl_cl_get_command_queue (),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]