[gegl] operations: fix mono-mixer cl code and re-enable
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations: fix mono-mixer cl code and re-enable
- Date: Sun, 7 Dec 2014 19:08:12 +0000 (UTC)
commit dd87554c9ec47c46efdb29647851e84190acdb7c
Author: Alexia Death <alexiadeath gmail com>
Date: Sun Dec 7 21:06:31 2014 +0200
operations: fix mono-mixer cl code and re-enable
opencl/mono-mixer.cl | 4 ++--
opencl/mono-mixer.cl.h | 4 ++--
operations/common/mono-mixer.c | 10 ++--------
3 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/opencl/mono-mixer.cl b/opencl/mono-mixer.cl
index 0a17cac..e44e28a 100644
--- a/opencl/mono-mixer.cl
+++ b/opencl/mono-mixer.cl
@@ -1,9 +1,9 @@
__kernel void gegl_mono_mixer (__global const float4 *src_buf,
__global float2 *dst_buf,
+ const int preserve_luminocity,
float red,
float green,
- float blue,
- const int preserve_luminocity)
+ float blue)
{
int gid = get_global_id(0);
float4 in_v = src_buf[gid];
diff --git a/opencl/mono-mixer.cl.h b/opencl/mono-mixer.cl.h
index 7a655ac..d0353ba 100644
--- a/opencl/mono-mixer.cl.h
+++ b/opencl/mono-mixer.cl.h
@@ -1,10 +1,10 @@
static const char* mono_mixer_cl_source =
"__kernel void gegl_mono_mixer (__global const float4 *src_buf, \n"
" __global float2 *dst_buf, \n"
+" const int preserve_luminocity, \n"
" float red, \n"
" float green, \n"
-" float blue, \n"
-" const int preserve_luminocity) \n"
+" float blue) \n"
"{ \n"
" int gid = get_global_id(0); \n"
" float4 in_v = src_buf[gid]; \n"
diff --git a/operations/common/mono-mixer.c b/operations/common/mono-mixer.c
index be02770..1a675de 100644
--- a/operations/common/mono-mixer.c
+++ b/operations/common/mono-mixer.c
@@ -93,14 +93,8 @@ process (GeglOperation *op,
}
return TRUE;
}
-/* FIXME!
- * CL variant of the operation gives a different
- * result than the non-cl code even without the luminoscity preservation code
- * that seems to have no effect, as if toggle parameter never changes.
- * Disabling for now. */
-/*
+
#include "opencl/mono-mixer.cl.h"
- */
static void
gegl_op_class_init (GeglOpClass *klass)
@@ -119,7 +113,7 @@ gegl_op_class_init (GeglOpClass *klass)
"title", _("Mono Mixer"),
"categories", "color",
"description", _("Monochrome channel mixer"),
-/* "cl-source", mono_mixer_cl_source, */
+ "cl-source", mono_mixer_cl_source,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]