# How to check if user has integrated graphics card?

I'm almost done with my Direct3D game. When user starts game first time it will adjust settings (and maximum settings) based on DirectX feature level starting from 9_1 up to 11_1. I have different shaders/multisampling/anisotropy/LOD/shadows. I used my personal PC for development and I had so much backup power I thought performance wont be a problem. Then I bought laptop with integrated graphic card which supports 11_1 but is extremly slow (AMD A6-4400M, Radeon 7520G). First I thought it's my game but after few days of intense testing in other games it feels like integrated card has not enough power. In my game on full settings game drops to 30fps. When I disable few settings I can easly get up to 60 (which is required by Windows store apps).

I don't want to ruin user experience first time he runs app so I would prefer to adjust his settings to 60 fps and here is my question. Is there any way to check if it's integrated card and does it make any sense? I don't want to force user to run some simulator. I could also check ram but I won't solve my problem since game is not using much ram.

Edit: Fixed hardware description.

• The Windows Store requirement interests me. Maybe it's just really not meant to be a target for high-performance, high-spectacle games. You might also have to build for ARM processors like the NVidia Tegra 3 if that's really the case... Sep 9 '13 at 18:39
• You might enumerate the bus location of the graphics device to figure out whether it's integrated or discrete, this is ridiculous though. I know some games use a database of card names to identify the "optimal" graphics settings above and beyond what querying the device capabilities would provide. This sounds good in theory, but if the database is not updated it only makes life more difficult for the end-user. GTA IV has this kind of issue when it tries to enforce maximum graphics settings based on the amount of installed VRAM, but cannot properly compute the amount of VRAM on modern GPUs. Sep 9 '13 at 21:53

My laptop has an "integrated" Nvidia 5400M. It plays most games with ease. Make sure your laptop is not using the Intel 4400 graphics GPU and is actually using the AMD 7520G. (Many newer laptops have two graphics options these days).

To answer your question, it doesn't make much sense to test for integrated or not, you need to know the capabilities of the GPU, not if it's user replaceable. You can do that by compiling a list of the most common graphics cards and creating pre-configured settings for them based on how powerful they are.

Or you can a very short simulation and ask the user to check their settings if you find the simulation isn't running well, or continue with the standard settings if no problems are detected.

• +1 for checking capabilities. Many games will check for GPU specifically, which is unnecessary in most cases as the capabilities should tell you what a card can or cannot do. Sep 9 '13 at 16:40
• That is not the definition of integrated most commonly used. The whole premise behind Optimus would not make a lot of sense if integrated simply meant non-user-servicable. When a distinction between integrated and discrete is made, it usually refers to whether the GPU is integrated into the CPU/APU, SoC, etc.. or a discrete piece of hardware dedicated to graphics. Sep 9 '13 at 21:42
• @AndonM.Coleman True enough. Though they typically go hand in hand (with desktop machines), laptops can easily have a discrete GPU and still be non-user-serviceable. Even though, the definition is not strictly adhered to, the basic premise behind the answer remains the same.
– House
Sep 9 '13 at 21:47
• A list of common GPUs isn't a good idea, because new GPUs come the market every few months. With a predefined list your game will soon be unable to tell if an unknown GPU is very new, very old or just very uncommon. Sep 10 '13 at 8:01

Along the lines of other answers here, figuring out what card the user is using may not be the most effective course of action. DirectX9 has a built in method to query the current video hardware by capability. Interestingly enough, DirectX 10+ does not follow this idea, where instead running DirectX 10+ is a sign in of itself that the hardware is compatible with everything DirectX 10+ does. Dropping down versions is a sign of missing power.

Running dxdiag would tell you what version you are personally running, and you can draw conclusions from there.

Source for capability query for DX9: How can I check for Shader Model 3 support?

Specifically, you will need a list of hardware PCI IDs you explicitly you want to specially handle. Typically, modern games do this with a large bevy of settings and simply have a "detect best settings" option that allows the user to tweak further as desired.

You can use feature detection, but this doesn't particularly indicate speed or efficiency. Sometimes a driver version is just busted or lying, too.

You can use DXGI_ADAPTER_DESC used from IDXGIAdaptor::GetDesc to read the PCI ID of the device for DX10+ cards. Use IDXGIFactory::EnumAdaptors to get the interfaces. There are similar methods to use for DX9 cards (if you support them), but I don't know them off the top of my head. You can also, with some manual string parsing (at least the only way I recall) get the driver version number.

Given that info, you can consult your own database of known hardware and driver versions you've tested to select decent defaults, with a "low quality" setting being a good guess for unknown cards. Just be sure to let the user tweak the setting values. Even if, e.g., you detect an Intel GPU, those GPUs have improved a lot in recent iterations and for all you know might even be NVIDIA/AMD contenders a few years down the line; don't presume to know the future or know the user's hardware better than he does.

• So when in a few months from now I buy the newest and shiniest high-end graphic card available, and it isn't on your list of known hardware because it didn't even exist when you made that list, it will be detected as "unknown" and you will give me the low quality settings? Sep 10 '13 at 8:07
• @Philipp: that's pretty common with most of the games I've looked at that do this. You can try "normal" as a default instead if you don't like that. I'm unsure why "low" is the usual default for games I've paid attention to; maybe the thinking was that a player is more likely to be upset by an out-of-the-box laggy game than an ugly one? Or maybe defaulting to low isn't that common and I just have bad taste in games. :) I forget what we do with our games; I don't really have anything to do with the launcher or graphics. Sep 10 '13 at 8:24