I want to know via WMI or other means in c++ if the user has integrated or dedicated GPU card?
I have gone over Win32_VideoController and could not find anything that will help me to differentiate between the two.
Thanks in advance.
I want to know via WMI or other means in c++ if the user has integrated or dedicated GPU card?
I have gone over Win32_VideoController and could not find anything that will help me to differentiate between the two.
Thanks in advance.
It is surprising that no one brought this idea up after so many years. Most people said it is impossible, and it is true that Windows natively does not provide any means to detect whether it is an iGPU or dGPU. However, I managed to make it work to a certain extent, if you could bear with the limitations. The general idea is that you can use wmic to get the name of CPU installed, and maintain a list of all CPUs that has integrated graphics (which may be very short, depending on what you need this feature for.) For newer CPU models like 9th gen or newer Intel desktop processor and AMD Ryzen 1000 and newer, you can simply tell by the CPU naming. Intel processors without integrated graphics will end with letter F, while AMD processors with integrated graphics will end with letter G. Then you can use wmic to get list of all gpus (including iGPU), and by counting the number of gpus installed, you can easily tell if the user has an iGPU or dGPU, as it is impossible to have more than 1 iGPU. Thus, if you detect that the CPU comes with an iGPU, and if there is only 1 GPU reported by wmic, you know that it is definitely iGPU. On the other hand, if there are multiple GPUs reported, you know that one of them is definitely dGPU. Of course, this does not work if the user manually disabled iGPU themselves, thus I am saying this approach has limitations.
Very old question, but I guess it can still make sense if somebody is struggling with this. Starting from - I think - Windows 10, you can query the OS for a list of GPUs in performance order. This is done using IDXGIFactory6::EnumAdapterByGpuPreference method and requiring the list to be in performance order with DXGI_GPU_PREFERENCE::DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE
. Now, if one excludes from the list the cards that have zero dedicated video memory, one should be able to get rid of the integrated cards. This can be done by looking at DedicatedVideoMemory
variable in the card description.
© 2022 - 2025 — McMap. All rights reserved.
DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE
lets you get a list of the GPUs in performance order. If you are sure that you have (at least) one discrete card, you can use this API to find it. Unfortunately, it doesn't let you know if you have a discrete card, or only an integrated one, which is very annoying. – JinnahDedicatedVideoMemory
attribute in learn.microsoft.com/en-us/windows/win32/api/dxgi/… might be a good way to decide whether a card is integrated or not, at least assuming that an integrated card never has dedicated memory, or that a discrete card is defined by the fact that it has dedicated memory (not 100% sure). – Jinnah