summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-05-07 02:01:05 +0200
committerMichael Bien <[email protected]>2011-05-07 02:01:05 +0200
commit8df524bf292051455005869ddfcfcc761af576e1 (patch)
treebd0a771200e105c6b57532df327b2668bb2f6121
parent7b85a8f6edcd4140da301248c54145bbf9b98781 (diff)
one context per device to workaround driver bugs - may change in future.
-rw-r--r--src/com/jogamp/opencl/util/CLMultiContext.java7
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;