aboutsummaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl
diff options
context:
space:
mode:
authorWade Walker <[email protected]>2015-10-24 18:49:00 -0700
committerWade Walker <[email protected]>2015-11-08 14:05:34 -0600
commit2739f7be10bd7fbd11d4a85d2e7636793f9c815e (patch)
tree83a55bf91c9187061dcad49bdbe0a2d0ddb3b16e /test/com/jogamp/opencl
parentba691aeb833671c57f59d1bcfa1ffc842f09d6df (diff)
Fix CLProgramTest for Intel OpenCL
Added a couple of differences in test results for programs recreated from binaries (the programs are executable and have binary length > 0), and avoided the CL kernel creation test on a binary because it segfaults like it does on AMD drivers.
Diffstat (limited to 'test/com/jogamp/opencl')
-rw-r--r--test/com/jogamp/opencl/CLProgramTest.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/test/com/jogamp/opencl/CLProgramTest.java b/test/com/jogamp/opencl/CLProgramTest.java
index 5946deb4..ae09d2cb 100644
--- a/test/com/jogamp/opencl/CLProgramTest.java
+++ b/test/com/jogamp/opencl/CLProgramTest.java
@@ -147,6 +147,7 @@ public class CLProgramTest extends UITestCase {
assertNotNull(program.getCLDevices());
assertEquals(program.getCLDevices().length, 0);
+ // make sure kernel creation does nothing after program release
{
final Map<String, CLKernel> kernels = program.createCLKernels();
assertNotNull(kernels);
@@ -156,23 +157,31 @@ public class CLProgramTest extends UITestCase {
program = context.createProgram(binaries);
- assertFalse(program.isExecutable());
-
+ // as of 10/25/2015, Intel shows recreated programs as executable
+ if(!context.getPlatform().isVendorIntel())
+ assertFalse(program.isExecutable());
+ else
+ assertTrue(program.isExecutable());
+
assertNotNull(program.getCLDevices());
assertTrue(program.getCLDevices().length != 0);
assertNotNull(program.getBinaries());
- assertEquals(program.getBinaries().size(), 0);
+ // as of 10/25/2015, Intel shows recreated programs binaries as having size
+ if(!context.getPlatform().isVendorIntel())
+ assertEquals(program.getBinaries().size(), 0);
+ else
+ assertTrue(program.getBinaries().size() > 0);
assertNotNull(program.getBuildLog());
assertTrue(program.getBuildLog().length() != 0);
assertNotNull(program.getSource());
- assertEquals(program.getSource().length(), 0);
+ assertEquals(program.getSource().length(), 0);
- // only test kernel creation error on unbuilt program if we're not on AMD -- as of
- // 3/8/2014, AMD drivers segfault on this instead of returning CL_INVALID_PROGRAM_EXECUTABLE
- if(!context.getPlatform().isVendorAMD()) {
+ // only test kernel creation error on unbuilt program if we're not on AMD or Intel -- as of
+ // (3/8/2014, 10/31/2015) (AMD, Intel) drivers segfault on this instead of returning CL_INVALID_PROGRAM_EXECUTABLE
+ if(!context.getPlatform().isVendorAMD() && !context.getPlatform().isVendorIntel()) {
try{
final Map<String, CLKernel> kernels = program.createCLKernels();
fail("expected an exception from createCLKernels but got: "+kernels);