Commit: 4b0b1c84e09ff35d00d4d4ec0d6a492b37469c85
Author: Sergey Sharybin
Date:   Thu Jul 3 17:17:15 2014 +0600
https://developer.blender.org/rB4b0b1c84e09ff35d00d4d4ec0d6a492b37469c85

OpenSubdiv: hide OpenCL compute method if no devices found

===================================================================

M       intern/opensubdiv/clInit.h

===================================================================

diff --git a/intern/opensubdiv/clInit.h b/intern/opensubdiv/clInit.h
index 2a4e131..37de12d 100644
--- a/intern/opensubdiv/clInit.h
+++ b/intern/opensubdiv/clInit.h
@@ -48,6 +48,12 @@ static bool HAS_CL_VERSION_1_1() {
                if (!clewLoadSuccess) {
                        fprintf(stderr, "Loading OpenCL failed.\n");
                }
+               else {
+                       cl_uint num_platforms;
+                       if (clGetPlatformIDs(0, NULL, &num_platforms) != 
CL_SUCCESS) {
+                               clewLoadSuccess = false;
+                       }
+               }
        }
        return clewLoadSuccess;
 #  endif

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to