aboutsummaryrefslogtreecommitdiffstats
path: root/test/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'test/com/jogamp')
-rw-r--r--test/com/jogamp/opencl/CLCommandQueueTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java
index c9b1b567..672cc8b0 100644
--- a/test/com/jogamp/opencl/CLCommandQueueTest.java
+++ b/test/com/jogamp/opencl/CLCommandQueueTest.java
@@ -474,7 +474,9 @@ public class CLCommandQueueTest extends UITestCase {
@Override
public void run() {
- int groupSize = queue2.getDevice().getMaxWorkItemSizes()[0];
+ int maxWorkItemSize = queue2.getDevice().getMaxWorkItemSizes()[0];
+ int kernelWorkGroupSize = (int)vectorAddKernel2.getWorkGroupSize( queue2.getDevice() );
+ int localWorkSize = Math.min( maxWorkItemSize, kernelWorkGroupSize );
fillBuffer(clBufferA2.buffer, 12345);
fillBuffer(clBufferB2.buffer, 67890);
@@ -488,7 +490,7 @@ public class CLCommandQueueTest extends UITestCase {
// System.out.println("D kernels");
CLEventList events2 = new CLEventList(2);
- queue2.put1DRangeKernel(vectorAddKernel2, 0, elements, groupSize, events2);
+ queue2.put1DRangeKernel(vectorAddKernel2, 0, elements, localWorkSize, events2);
queue2.putReadBuffer(clBufferD, false, events2);
barrier.waitFor(queue2, events2);