diff options
Diffstat (limited to 'test/com/jogamp')
-rw-r--r-- | test/com/jogamp/opencl/CLCommandQueueTest.java | 24 | ||||
-rw-r--r-- | test/com/jogamp/opencl/HighLevelBindingTest.java | 3 | ||||
-rw-r--r-- | test/com/jogamp/opencl/gl/CLGLTest.java | 2 |
3 files changed, 27 insertions, 2 deletions
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java index 3df894e5..0ea1cae4 100644 --- a/test/com/jogamp/opencl/CLCommandQueueTest.java +++ b/test/com/jogamp/opencl/CLCommandQueueTest.java @@ -12,6 +12,7 @@ import static org.junit.Assert.*; import static java.lang.System.*; import static com.jogamp.opencl.TestUtils.*; import static com.jogamp.opencl.CLEvent.*; +import static com.jogamp.opencl.CLVersion.*; import static com.jogamp.common.nio.Buffers.*; /** @@ -167,7 +168,28 @@ public class CLCommandQueueTest { final int elements = roundUp(groupSize, ONE_MB / SIZEOF_INT * 5); // 5MB per buffer - final CLContext context = CLContext.create(); + // 5MB per buffer + CLPlatform[] platforms = CLPlatform.listCLPlatforms(); + CLPlatform theChosenOne = platforms[0]; + for (CLPlatform platform : platforms) { + if(platform.isAtLeast(CL_1_1)) { + theChosenOne = platform; + break; + } + } + + final CLContext context = CLContext.create(theChosenOne); + + // we expect an UOE if CL 1.1 is not supported + if(!theChosenOne.isAtLeast(CL_1_1)) { + try{ + CLUserEvent.create(context); + fail(""); + }catch(UnsupportedOperationException ex) { + out.println("test dissabled, required CLVersion: "+CL_1_1+" available: "+theChosenOne.getVersion()); + return; + } + } try{ diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index e08fadc7..588be480 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -108,7 +108,8 @@ public class HighLevelBindingTest { out.println(" name: "+platform.getName()); out.println(" id: "+platform.ID); out.println(" profile: "+platform.getProfile()); - out.println(" version: "+platform.getVersion()); + out.println(" spec version: "+platform.getSpecVersion()); + out.println(" impl version: "+platform.getVersion().getImplVersion()); out.println(" vendor: "+platform.getVendor()); out.println(" max FLOPS device: "+platform.getMaxFlopsDevice()); out.println(" extensions: "+platform.getExtensions()); diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index b7dfe1dc..1fa582b8 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -34,6 +34,8 @@ public class CLGLTest { @BeforeClass public static void init() { + GLProfile.initSingleton(); + Display display = NewtFactory.createDisplay(null); // local display assertNotNull(display); |