diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/jogamp/opencl/util/CLMultiContext.java | 7 |
1 files changed, 5 insertions, 2 deletions
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<CLPlatform, List<CLDevice>> entry : platformDevicesMap.entrySet()) { List<CLDevice> 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; |