Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#998 closed defect (fixed)

gfx::CardName gets confused by multiple GPUs

Reported by: Philip Taylor Owned by: Jan Wassenberg
Priority: Nice to Have Milestone: Alpha 8
Component: Core engine Keywords:
Cc: Jan Wassenberg Patch:

Description

I have an Intel HD Graphics 3000 plus a GeForce GTX 560 Ti, both enabled in the BIOS, on 64-bit Win7. My monitor is connected to the GF card, and that card is used for rendering the game. Also I have Lucid Virtu installed but set to "off" (I don't know if that will affect anything).

(If I switch the monitor connection to the motherboard's video output, then restart the game, the Intel GPU is used for rendering instead (judging by performance and the list of extensions), but I'm not doing that in this bug.)

system_info.txt says

Graphics Card  : Intel(R)  HD Graphics Family

which is wrong or at least misleading. (GL_RENDERER gives a more correct value of "NVIDIA Corporation GeForce GTX 560 Ti/PCI/SSE2".)

This happens because gfx::CardName calls wgfx_CardName which gets a wmiMap of

[0]	("AcceleratorCapabilities", NULL)
[1]	("AdapterCompatibility", BSTR = 0x00478a14 "Intel Corporation")
[2]	("AdapterDACType", BSTR = 0x00468854 "Internal")
[3]	("AdapterRAM", I4 = -244785152)
[4]	("Availability", I4 = 8)
[5]	("CapabilityDescriptions", NULL)
[6]	("Caption", BSTR = 0x00478a5c "Intel(R)  HD Graphics Family")
[7]	("ColorTableEntries", NULL)
[8]	("ConfigManagerErrorCode", I4 = 0)
[9]	("ConfigManagerUserConfig", BOOL =  0)
[10]	("CreationClassName", BSTR = 0x00478ab4 "Win32_VideoController")
[11]	("CurrentBitsPerPixel", NULL)
[12]	("CurrentHorizontalResolution", NULL)
[13]	("CurrentNumberOfColors", NULL)
[14]	("CurrentNumberOfColumns", NULL)
[15]	("CurrentNumberOfRows", NULL)
[16]	("CurrentRefreshRate", NULL)
[17]	("CurrentScanMode", NULL)
[18]	("CurrentVerticalResolution", NULL)
[19]	("Description", BSTR = 0x00478afc "Intel(R)  HD Graphics Family")
[20]	("DeviceID", BSTR = 0x0047844c "VideoController2")
[21]	("DeviceSpecificPens", NULL)
[22]	("DitherType", NULL)
[23]	("DriverDate", BSTR = 0x00478b54 "20110831000000.000000-000")
[24]	("DriverVersion", BSTR = 0x00478be4 "8.15.10.2509")
[25]	("ErrorCleared", NULL)
[26]	("ErrorDescription", NULL)
[27]	("ICMIntent", NULL)
[28]	("ICMMethod", NULL)
[29]	("InfFilename", BSTR = 0x00478c1c "oem2.inf")
[30]	("InfSection", BSTR = 0x00478c54 "iSNBD0")
[31]	("InstallDate", NULL)
[32]	("InstalledDisplayDrivers", BSTR = 0x00478d44 "igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumdx32,igd10umd32,igd10umd32")
[33]	("LastErrorCode", NULL)
[34]	("MaxMemorySupported", NULL)
[35]	("MaxNumberControlled", NULL)
[36]	("MaxRefreshRate", NULL)
[37]	("MinRefreshRate", NULL)
[38]	("Monochrome", BOOL =  0)
[39]	("Name", BSTR = 0x00478dfc "Intel(R)  HD Graphics Family")
[40]	("NumberOfColorPlanes", NULL)
[41]	("NumberOfVideoPages", NULL)
[42]	("PNPDeviceID", BSTR = 0x004786fc "PCI\VEN_8086&DEV_0112&SUBSYS_D0001458&REV_09\3&13C0B0C5&0&10")
[43]	("PowerManagementCapabilities", NULL)
[44]	("PowerManagementSupported", NULL)
[45]	("ProtocolSupported", NULL)
[46]	("ReservedSystemPaletteEntries", NULL)
[47]	("SpecificationVersion", NULL)
[48]	("Status", BSTR = 0x00478e54 "OK")
[49]	("StatusInfo", NULL)
[50]	("SystemCreationClassName", BSTR = 0x00478ec4 "Win32_ComputerSystem")
[51]	("SystemName", BSTR = 0x00478f0c "PHILIP-PC")
[52]	("SystemPaletteEntries", NULL)
[53]	("TimeOfLastReset", NULL)
[54]	("VideoArchitecture", I4 = 5)
[55]	("VideoMemoryType", I4 = 2)
[56]	("VideoMode", NULL)
[57]	("VideoModeDescription", NULL)
[58]	("VideoProcessor", BSTR = 0x00478f44 "Intel(R) HD Graphics Family")

so it's only seeing the Intel one.

Change History (5)

comment:1 by Jan Wassenberg, 12 years ago

I see that wmi.cpp's COM enumeration goop is actually retrieving all instances of the class, but continually overwriting the map's entries with the most recent instance's property. There is a simple solution: returning a vector of map. wgfx would simply concatenate all of their caption properties. How does that sound?

comment:2 by Philip Taylor, 12 years ago

We don't use CardName for anything except for system_info.txt and checking for "S3 SuperSavage/IXC 1014", so changing it to return more data sounds safe and would hopefully fix the problem.

comment:3 by Jan Wassenberg, 12 years ago

Owner: set to Jan Wassenberg
Status: newassigned

OK :) I do see that WMI reports availability="offline", which could be used to strike this card from the list. I'll make it happen tonight or tomorrow.

comment:4 by Jan Wassenberg, 12 years ago

Resolution: fixed
Status: assignedclosed

(In [10399]) add support for retrieving all WMI class instances (required for detecting multiple graphics and sound cards) fixes #998

comment:5 by Jan Wassenberg, 12 years ago

Milestone: BacklogAlpha 8

Done. Please re-open if there are any remaining issues :)

Note: See TracTickets for help on using tickets.