From 8df524bf292051455005869ddfcfcc761af576e1 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sat, 7 May 2011 02:01:05 +0200 Subject: one context per device to workaround driver bugs - may change in future. --- src/com/jogamp/opencl/util/CLMultiContext.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/com/jogamp/opencl/util') diff --git a/src/com/jogamp/opencl/util/CLMultiContext.java b/src/com/jogamp/opencl/util/CLMultiContext.java index f45df90f..f588fcef 100644 --- a/src/com/jogamp/opencl/util/CLMultiContext.java +++ b/src/com/jogamp/opencl/util/CLMultiContext.java @@ -60,8 +60,11 @@ public class CLMultiContext implements CLResource { CLMultiContext mc = new CLMultiContext(); for (Map.Entry> entry : platformDevicesMap.entrySet()) { List list = entry.getValue(); - CLContext context = CLContext.create(list.toArray(new CLDevice[list.size()])); - mc.contexts.add(context); + // one context per device to workaround driver bugs + for (CLDevice device : list) { + CLContext context = CLContext.create(device); + mc.contexts.add(context); + } } return mc; -- cgit v1.2.3