Minor fixes to para-virtualization support
authorNikhil Joshi <nikhilj@nvidia.com>
Mon, 12 Aug 2019 14:33:26 +0000 (20:03 +0530)
committerNikhil Joshi <nikhilj@nvidia.com>
Mon, 12 Aug 2019 15:35:18 +0000 (21:05 +0530)
Changes to following aspects of para-virtualization changes -
1. Revert platform[0] override when platform is NULL

loader/icd_dispatch.c
loader/windows/icd_windows_hkr.h

index 0a207774d8548c77aaadcc3af3203f0affb40a80..df967cb902b6459a1684a3efd2fc644bb710486c 100644 (file)
@@ -99,12 +99,6 @@ clGetDeviceIDs(cl_platform_id   platform,
 {
     // initialize the platforms (in case they have not been already)
     khrIcdInitialize();
-
-    if (!platform && khrIcdVendors != NULL)
-    {
-        platform = khrIcdVendors[0].platform;
-    }
-
     KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);   
     return platform->dispatch->clGetDeviceIDs(
         platform,
@@ -202,12 +196,8 @@ clCreateContextFromType(const cl_context_properties * properties,
     // initialize the platforms (in case they have not been already)
     khrIcdInitialize();
 
-    // determine the platform to use from the properties and device_type specified
+    // determine the platform to use from the properties specified
     khrIcdContextPropertiesGetPlatform(properties, &platform);
-    if (!platform && khrIcdVendors != NULL)
-    {
-        platform = khrIcdVendors[0].platform;
-    }
 
     // validate the platform handle and dispatch
     KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(platform, CL_INVALID_PLATFORM);
@@ -1833,10 +1823,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetGLContextInfoKHR(
 
     // determine the platform to use from the properties specified
     khrIcdContextPropertiesGetPlatform(properties, &platform);
-    if (!platform && khrIcdVendors != NULL)
-    {
-        platform = khrIcdVendors[0].platform;
-    }
 
     KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);    
     return platform->dispatch->clGetGLContextInfoKHR(
index b2e16cb661695a3416faef51abbd7b8530782d09..46b75a59ff0f0228797c48a3333a3ec2318573a4 100644 (file)
@@ -21,7 +21,7 @@
 
 bool khrIcdOsVendorsEnumerateHKR(void);
 
-LUID ZeroLuid;
+extern LUID ZeroLuid;
 
 void AdapterAdd(const char* szName, LUID luid);