From 0bd4fd3a87ddee808419e1e4d656c2cbe7dc94ca Mon Sep 17 00:00:00 2001 From: Alexander Karsakov Date: Mon, 17 Mar 2014 12:18:55 +0400 Subject: [PATCH] Workaround for Intel platform: replace min() with ternary operator --- modules/imgproc/src/opencl/morph.cl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/imgproc/src/opencl/morph.cl b/modules/imgproc/src/opencl/morph.cl index cb6e733ed4..35c0a27ff6 100644 --- a/modules/imgproc/src/opencl/morph.cl +++ b/modules/imgproc/src/opencl/morph.cl @@ -69,8 +69,13 @@ #endif #ifdef ERODE +#ifdef INTEL_DEVICE +// workaround for bug in Intel HD graphics drivers (10.18.10.3496 or older) +#define MORPH_OP(A,B) ((A) < (B) ? (A) : (B)) +#else #define MORPH_OP(A,B) min((A),(B)) #endif +#endif #ifdef DILATE #define MORPH_OP(A,B) max((A),(B)) #endif