From 0874fa955c0401dba9f54816a9654bb4380abed8 Mon Sep 17 00:00:00 2001 From: Wade Walker Date: Sat, 8 Feb 2014 14:00:41 -0600 Subject: Fix unit test bugs on Mac OS X 64-bit. This commit fixes bugs 959 (local work size set incorrectly), 960 (concurrencyTest() throws ConcurrentModificationException) 963 (programBinariesTest() causes SIGSEGV) and 964 (builderTest() cases CL_INVALID_VALUE). After this commit, all JOCL tests should pass on 64-bit Mac OS X. --- test/com/jogamp/opencl/CLCommandQueueTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/com/jogamp') 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); -- cgit v1.2.3