summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLProgram.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/CLProgram.java')
-rw-r--r--src/com/jogamp/opencl/CLProgram.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java
index fd19cd8f..56804533 100644
--- a/src/com/jogamp/opencl/CLProgram.java
+++ b/src/com/jogamp/opencl/CLProgram.java
@@ -584,7 +584,12 @@ public class CLProgram extends CLObject implements CLResource {
* each call of this method calls into Open
*/
public String getSource() {
- return getProgramInfoString(CL_PROGRAM_SOURCE);
+ // some drivers return IVE codes if the program haven't been built from source.
+ try{
+ return getProgramInfoString(CL_PROGRAM_SOURCE);
+ }catch(CLException.CLInvalidValueException ingore) {
+ return "";
+ }
}
/**