Handle properties==NULL in clCreateContextFromType
According to spec, for function clCreateContextFromType, properties can also be
NULL in which case the platform that is selected is implementation-defined,
while the current code returns CL_INVALID_PLATFORM.
void khrIcdContextPropertiesGetPlatform(const cl_context_properties *properties, cl_platform_id *outPlatform)
{
+ if (properties == NULL && khrIcdVendors != NULL)
+ {
+ *outPlatform = khrIcdVendors[0].platform;
+ return;
+ }
+
const cl_context_properties *property = (cl_context_properties *)NULL;
*outPlatform = NULL;
for (property = properties; property && property[0]; property += 2)