P4 to Git Change 1759096 by todli@todli-win-opencl-kv1 on 2019/03/20 15:07:10
SWDEV-165960 - Add check for duplicate vendors of different libraries using vendor suffix after vendor info is loaded from library
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd.c#11 edit
[ROCm/clr commit: 21ecd9c93a]
This commit is contained in:
@@ -187,12 +187,23 @@ void khrIcdVendorAdd(const char *libraryName)
|
||||
// add this vendor to the list of vendors at the tail
|
||||
{
|
||||
KHRicdVendor **prevNextPointer = NULL;
|
||||
for (prevNextPointer = &khrIcdVendors; *prevNextPointer; prevNextPointer = &( (*prevNextPointer)->next) );
|
||||
*prevNextPointer = vendor;
|
||||
for (prevNextPointer = &khrIcdVendors; *prevNextPointer; prevNextPointer = &( (*prevNextPointer)->next) )
|
||||
{
|
||||
if (!strcmp(vendor->suffix, (*prevNextPointer)->suffix)) {
|
||||
free(suffix);
|
||||
free(vendor);
|
||||
vendor = NULL;
|
||||
KHR_ICD_TRACE("already loaded vendor with suffix %s, nothing to do here\n", suffix);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (vendor)
|
||||
{
|
||||
*prevNextPointer = vendor;
|
||||
KHR_ICD_TRACE("successfully added vendor %s with suffix %s\n", libraryName, suffix);
|
||||
}
|
||||
}
|
||||
|
||||
KHR_ICD_TRACE("successfully added vendor %s with suffix %s\n", libraryName, suffix);
|
||||
|
||||
}
|
||||
|
||||
Done:
|
||||
|
||||
Reference in New Issue
Block a user