Minor fixes to para-virtualization support
Changes to following aspects of para-virtualization changes -
1. Revert platform[0] override when platform is NULL
diff --git a/loader/icd_dispatch.c b/loader/icd_dispatch.c
index 0a20777..df967cb 100644
--- a/loader/icd_dispatch.c
+++ b/loader/icd_dispatch.c
@@ -99,12 +99,6 @@
{
// 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 @@
// 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 @@
// 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(
diff --git a/loader/windows/icd_windows_hkr.h b/loader/windows/icd_windows_hkr.h
index b2e16cb..46b75a5 100644
--- a/loader/windows/icd_windows_hkr.h
+++ b/loader/windows/icd_windows_hkr.h
@@ -21,7 +21,7 @@
bool khrIcdOsVendorsEnumerateHKR(void);
-LUID ZeroLuid;
+extern LUID ZeroLuid;
void AdapterAdd(const char* szName, LUID luid);