Cycles: Add debug print about CLEW initialization status

This commit is contained in:
Sergey Sharybin
2015-07-07 14:37:12 +02:00
parent 37539962fe
commit 3dc86f586c

View File

@@ -3424,7 +3424,17 @@ bool device_opencl_init(void)
initialized = true;
result = clewInit() == CLEW_SUCCESS;
int clew_result = clewInit();
if(clew_result == CLEW_SUCCESS) {
VLOG(1) << "CLEW initialization succeeded.";
result = true;
}
else {
VLOG(1) << "CLEW initialization failed: "
<< ((clew_result == CLEW_ERROR_ATEXIT_FAILED)
? "Error setting up atexit() handler"
: "Error opening the library");
}
return result;
}