Fix to allow windows ICD detection to detect AMD ICD drivers
authorJohn Alexander <john.alexander@datapath.co.uk>
Fri, 7 Feb 2020 11:37:57 +0000 (11:37 +0000)
committerBen Ashbaugh <ben.ashbaugh@intel.com>
Wed, 26 Feb 2020 15:38:08 +0000 (07:38 -0800)
loader/windows/icd_windows_dxgk.c

index 088abca..8844378 100644 (file)
@@ -118,9 +118,15 @@ bool khrIcdOsVendorsEnumerateDXGK(void)
             Status = D3DKMTQueryAdapterInfo(&queryAdapterInfo);
             if (!NT_SUCCESS(Status))
             {
-                // Continue trying to get as much info on each adapter as possible.
-                // It's too late to return FALSE and claim WDDM2_4 enumeration is not available here.
-                continue;
+                // Try a different value type.  Some vendors write the key as a multi-string type.
+                queryArgs.ValueType = REG_MULTI_SZ;
+                Status = D3DKMTQueryAdapterInfo(&queryAdapterInfo);
+                if (!NT_SUCCESS(Status))
+                {
+                   // Continue trying to get as much info on each adapter as possible.
+                   // It's too late to return FALSE and claim WDDM2_4 enumeration is not available here.
+                   continue;
+                }
             }
             if (NT_SUCCESS(Status) && pQueryArgs->Status == D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW)
             {