diff options
author | Wade Walker <[email protected]> | 2014-03-08 16:17:36 -0600 |
---|---|---|
committer | Wade Walker <[email protected]> | 2014-03-08 16:17:36 -0600 |
commit | 7a7f87a1fc7419f758ba9b134764ae544fd6d566 (patch) | |
tree | b640a9e29883b46444d6f01334f8e8cacf1a8431 /test/com/jogamp/opencl/LowLevelBindingTest.java | |
parent | 7ab26044167c84fc6386cc179e8a8736d8978c91 (diff) |
Fix crashes due to AMD driver bugs.
programBinariesTest() failure was due to AMD drivers crashing
in clCreateKernelsInProgram() when the program is not built yet,
instead of returning error code CL_INVALID_PROGRAM_EXECUTABLE as they
should.
lowLevelVectorAddTest() failure was apparently due to the AMD drivers
writing past the end of a direct byte buffer in such a way that it made
System.gc() crash when called during teardown (this crash didn't even
dump stack). Making the buffer larger solved the problem.
Diffstat (limited to 'test/com/jogamp/opencl/LowLevelBindingTest.java')
-rw-r--r-- | test/com/jogamp/opencl/LowLevelBindingTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/com/jogamp/opencl/LowLevelBindingTest.java b/test/com/jogamp/opencl/LowLevelBindingTest.java index 90027e13..52d74882 100644 --- a/test/com/jogamp/opencl/LowLevelBindingTest.java +++ b/test/com/jogamp/opencl/LowLevelBindingTest.java @@ -256,7 +256,10 @@ public class LowLevelBindingTest extends UITestCase { int deviceCount = (int) (longBuffer.get(0) / (is32Bit() ? 4 : 8)); out.println("context created with " + deviceCount + " devices"); - ByteBuffer bb = newDirectByteBuffer(4096); + // Was originally 4096, but had to make this bigger or it would crash in UITestCase.oneTimeTearDown(){ System.gc() } + // without even dumping a stack when using AMD drivers. Presumably the drivers would write past the end + // of the block and mess up GC info somehow. + ByteBuffer bb = newDirectByteBuffer(8192); ret = cl.clGetContextInfo(context, CL.CL_CONTEXT_DEVICES, bb.capacity(), bb, null); checkError("on clGetContextInfo", ret); |