Commit f3adb089 authored by Richard B. Kreckel's avatar Richard B. Kreckel Committed by Øyvind "pippin" Kolås

gegl: pick the first opencl platform with image support

Fixing issue #117
parent 4a1df866
......@@ -599,8 +599,13 @@ gegl_cl_init_load_device_info (cl_platform_id platform,
{
platform = platforms[platform_idx];
err = gegl_clGetDeviceIDs (platform, requested_device_type, 1, &device, NULL);
if (err == CL_SUCCESS)
if (err == CL_SUCCESS) {
cl_bool tmp_image_support = FALSE;
err = gegl_clGetDeviceInfo (device, CL_DEVICE_IMAGE_SUPPORT, sizeof(cl_bool), &tmp_image_support, NULL);
if (err == CL_SUCCESS && tmp_image_support == FALSE)
continue;
break;
}
}
g_free (platforms);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment