Skip to content
Permalink
Browse files

clGetPlatformIDs return value fix

It should return CL_SUCCESS in case num_platforms == NULL && num_entries
== 0.  At least Glow checks for availability of OpenCL (in general)
using these parameters.

Specs say:
"If platforms is not NULL, the num_entries must be greater than zero."
  • Loading branch information
pjaaskel committed Nov 16, 2019
1 parent f1dee8d commit 8d618feca432ff580b8a087d72f2fdb10f4d8b49
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/CL/clGetPlatformIDs.c
@@ -251,7 +251,7 @@ POname(clGetPlatformIDs)(cl_uint num_entries,
CL_INVALID_VALUE);

POCL_RETURN_ERROR_COND ((num_platforms == NULL && num_entries == 0),
CL_INVALID_VALUE);
CL_SUCCESS);

if (platforms != NULL) {
platforms[0] = &_platforms[0];

0 comments on commit 8d618fe

Please sign in to comment.
You can’t perform that action at this time.