Use DXGI EnumAdapters to collect GPU info instead of SetupAPI.

Code in CollectDriverInfoD3D has a couple of problems:

First, code in CollectDriverInfoD3D assumed the format of deviceId
strings returned by the setup API are always PCI devices. Scenarios
such as Windows Virtual Desktop, Remote Desktop and VM connection
are not PCI displays. Parsing them PCI devices led to random
numerical vendor and device ids being looked up in the software
fallback list.

Second, the display marked as "active" does not always match
the adapter enumerated first by ANGLE and other adapter
enumerating components. DXGI may decide to change the enumeration
based on the behavior of the application, control panel settings
and other factors. These are not reflected in the setup APIs.

This CL removes the setupAPI code in gpu_info_collector_win.cc
and replaces it with DXGI EnumAdapters. Driver versions are now
supplied by CheckInterfaceSupport.

Since CheckInterfaceSupport returns driver versions using the File
version, not the version in the registry, we must change the driver
versions in the fallback lists to reflect the File version. We also
no longer need to use an NVidia helper library to do the conversion
for us.

Bug: 973695
Change-Id: I9c41fb1d52a85bd4004894e1c1124299ff67aa17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1747131
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Maggie Chen <magchen@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687038}
11 files changed