IDXGIFactory::EnumAdapters() does not return any adapters
Asked Answered
K

2

5

I'm developing an DirectX11 application. During initialization I enumerate the available graphics adapters as described here.

Now, for one of our customers the number of available adapters appears to be zero: EnumAdapters(0, &pAdapter) already returns DXGI_ERROR_NOT_FOUND.

How is this possible? Shouldn't there always be at least one graphics adapter available? The computer has a graphics card with newest drivers installed and the display is working.

Note: Our application actually uses SharpDX but the procedure is the same. The failing equivalent is GetAdapterCount() returning 0.

Karate answered 20/6, 2014 at 7:16 Comment(10)
Are you doing this via IDXGIFactory or via IDXGIFactory1?Bekah
SharpDX.DXGI.Factory which uses IDXGIFactory internally. What would be the difference between the two?Karate
I don't know, it's a strange problem, I was wondering if this failing system doesn't support the later interface, but really just guessing. I can't see why it shouldn't work for adapter zero. Can you still create a device on that adapter and display ok?Bekah
I don't even get to the point where I could create a device since there is no adapter I could create it from.Karate
Ok, but I mean if you ignore the error and just carry on assuming adapter zero. Is it possible to test that? Depending on the result, it might indicate where to look next. What is the gfx card and OS of the failing system? Is the gfx card definitely DX11 capable? (although that shouldn't matter for the enum).Bekah
When there are no adapters I go the same code path as when the device does not support feature level 10, that is, display an error message and start the application but with the preview window disabled. This doesn't work either but I suppose this is a separate issue. Not sure about which gfx card and which OS version. Waiting for an answer from the customer.Karate
Ok, better wait for that answer, if they're still using XP, it would explain a lot, but I guess you would have detected that during installation.Bekah
Yes our application does not support XP. I'll came back to you once I have an answer. Thanks for your help so far!Karate
I think this can happen when there are no displays connected (i.e. a "headless" system).Isidora
I found the problem (see my own answer). Thanks for your help anyway!Karate
K
5

I'll answer my own question:

As it turned out this problem occurred when our customer tried to run our application in safe-mode because of another unrelated problem. In safe-mode the graphics driver isn't loaded and hence there would not be any adapters.

Karate answered 20/6, 2014 at 12:20 Comment(1)
+1 - that's useful information for anyone else seeing the same problem.Bekah
S
3

Note that with Windows 8.x you would get the "Microsoft Basic Renderer" adapter in 'safe-mode', which is essentially WARP + a legacy VGA output driver. See this post for some implications.

Spurge answered 26/6, 2014 at 7:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.