[gegl] opencl: fix alignment issue for aux of shadows-highlights
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] opencl: fix alignment issue for aux of shadows-highlights
- Date: Thu, 9 Nov 2017 11:29:06 +0000 (UTC)
commit abbbd25f13f0f7e21333d78179fa655ec15eaaf4
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Nov 9 12:28:07 2017 +0100
opencl: fix alignment issue for aux of shadows-highlights
Fix following observations by Massimo in bug #789554.
opencl/shadows-highlights-correction.cl | 6 +++---
opencl/shadows-highlights-correction.cl.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/opencl/shadows-highlights-correction.cl b/opencl/shadows-highlights-correction.cl
index 88f35f0..72d6464 100644
--- a/opencl/shadows-highlights-correction.cl
+++ b/opencl/shadows-highlights-correction.cl
@@ -40,7 +40,7 @@ float3 overlay(const float3 in_a,
__kernel void shadows_highlights(__global const float4 *in,
- __global const float3 *aux,
+ __global const float *aux,
__global float4 *out,
const float shadows,
const float highlights,
@@ -63,7 +63,7 @@ __kernel void shadows_highlights(__global const float4 *in,
}
/* blurred, inverted and desaturaed mask in m */
- m.x = 100.0f - aux[gid].x;
+ m.x = 100.0f - aux[3 * gid].x;
/* white point adjustment */
io.x = io.x > 0.0f ? io.x/whitepoint : io.x;
@@ -78,4 +78,4 @@ __kernel void shadows_highlights(__global const float4 *in,
io.xyz = overlay(io.xyz, m, shadows, xform, shadows_ccorrect, low_approximation);
out[gid] = io;
-}
\ No newline at end of file
+}
diff --git a/opencl/shadows-highlights-correction.cl.h b/opencl/shadows-highlights-correction.cl.h
index 11cf477..1950707 100644
--- a/opencl/shadows-highlights-correction.cl.h
+++ b/opencl/shadows-highlights-correction.cl.h
@@ -41,7 +41,7 @@ static const char* shadows_highlights_correction_cl_source =
" \n"
" \n"
"__kernel void shadows_highlights(__global const float4 *in, \n"
-" __global const float3 *aux, \n"
+" __global const float *aux, \n"
" __global float4 *out, \n"
" const float shadows, \n"
" const float highlights, \n"
@@ -64,7 +64,7 @@ static const char* shadows_highlights_correction_cl_source =
" } \n"
" \n"
" /* blurred, inverted and desaturaed mask in m */ \n"
-" m.x = 100.0f - aux[gid].x; \n"
+" m.x = 100.0f - aux[3 * gid].x; \n"
" \n"
" /* white point adjustment */ \n"
" io.x = io.x > 0.0f ? io.x/whitepoint : io.x; \n"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]