GPU vendor string ala CPUID - slightly OT

I’m looking for a method to read the vendor string directly off the GPU or video board. glGetString(…) suffices for most scenarios, but I’d prefer to perform the recognition before I initialize the graphics subsystem. I’m making the assumption that there’s some sort of CPUID-style instruction that’s supported by most vendors, and that I just don’t know how to access it.

Any help or snippet (preferably x86 ASM or C) would be greatly appreciated, and please accept my apologies if this topic has already been beaten to death.


Unfortunately I don’t know the answer to your question, but I would suggest that you try the advanced section for this one.
Good luck!

Well you could enumerate all PCI devices in the system and use the vendor id and device id to identify the card.

I have no code for that but my friend will help you.

This list may come in handy too: (its the free PCI Vendor and Device list)

OR (assuming you are using Windows)

You could use coughDirectXcough to get the driver name.

You only have to call IDirect3D9::GetAdapterIdentifier(…)

There is probably a place in the registry where this information is also available but I am not sure.

Hope that gave you some pointers…

[This message has been edited by HS (edited 02-01-2003).]

Thanks for the reply. I did indeed find the vendor string in the registry (machine\system\currentcontrolset\video), and will probably end up using this method with currently unknown consequences. Although it was designed for these issues in mind, I find that frolicking around the registry is a bit on the invasive side, if not just plain rude.

Enumerating devices without the help of some bloated com-based or win32 extension appears beyond the jurisdiction of us humble ring3 folk. It just seemed logical that some sort of brand-recognition circuit would have been integrated into the GPU, but since I know nothing about DSP development, I don’t have any right to comment. Of course, even if it was there, accessing it would probably require ring0 priviledge (under win32) and I’d fall out of specs again.

Anyways, I’ll have to start kicking the '51 uC guys out of my office and learn to appreciate what facilities the OS gives me

Thanks again,

[This message has been edited by Dave.D (edited 02-01-2003).]

I just realized that the registry key you mentioned doesnt exist on my machines (W2K and XP) but I found a nice enumeration of all PCI/AGP devices in:


And no, reading this kind of information out of the registry isnt rude, thats why its there in the first place.

It would be rude to alter that information though

Hmm, I thought at first I must have typo’d the address, as the string is not found in my 2k machine. But, it does exist in that location on my XP Pro box. I’m just going to add this to my list of things I don’t quite understand and switch over to reading PCI information from the keys as recommended. Good thing I’m making these decisions on a weekend…

You make a good point about the registry. I guess it’s that ease of altering the keys that makes me weary. Under the “correct” security profiles, the operating system can guard write access, but how many of us, much less our clients, are 100% confident in this area?

Thanks again,