summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-03-26 21:50:12 +0100
committerGitHub <[email protected]>2019-03-26 21:50:12 +0100
commit91910792e4ba0e552e2914e6c6ae75be997314e9 (patch)
tree24173b5324b3d44a09d3e8fd17f20fce6ee1c2ba /src/com
parentbc915ab43007b827f021b18e84a5d7645f7f4185 (diff)
parent0f1ed8774549d51b45ade69e8883dcd5565951b2 (diff)
Merge pull request #1 from ghost/master
adding support for Android x86 platforms
Diffstat (limited to 'src/com')
-rw-r--r--src/com/jogamp/opencl/CLPlatform.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java
index 34265465..f64df614 100644
--- a/src/com/jogamp/opencl/CLPlatform.java
+++ b/src/com/jogamp/opencl/CLPlatform.java
@@ -281,7 +281,12 @@ public class CLPlatform {
* @see #listCLDevices(com.jogamp.opencl.CLDevice.Type...)
*/
public CLDevice[] listCLDevices() {
- return this.listCLDevices(CLDevice.Type.ALL);
+ try{
+ return this.listCLDevices(CLDevice.Type.ALL);
+ }
+ catch(CLInvalidDeviceTypeException ignore){ //trying to list GPUs if CL_DEVICE_TYPE_ALL isn't valid. on some non-standard implementations (Android PowerVR), only CL_DEVICE_TYPE_GPU is supported and use of other types including ALL will lead to a CL_INVALID_DEVICE_TYPE
+ return this.listCLDevices(CLDevice.Type.GPU);
+ }
}
/**