4

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.

Roman Reiner
  • 1,089
  • 1
  • 10
  • 17
  • Are you doing this via `IDXGIFactory` or via `IDXGIFactory1`? – Roger Rowland Jun 20 '14 at 07:31
  • `SharpDX.DXGI.Factory` which uses `IDXGIFactory` internally. What would be the difference between the two? – Roman Reiner Jun 20 '14 at 07:39
  • 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? – Roger Rowland Jun 20 '14 at 07:41
  • I don't even get to the point where I could create a device since there is no adapter I could create it from. – Roman Reiner Jun 20 '14 at 07:44
  • 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). – Roger Rowland Jun 20 '14 at 07:47
  • 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. – Roman Reiner Jun 20 '14 at 07:57
  • 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. – Roger Rowland Jun 20 '14 at 08:01
  • 1
    Yes our application does not support XP. I'll came back to you once I have an answer. Thanks for your help so far! – Roman Reiner Jun 20 '14 at 08:02
  • I think this can happen when there are no displays connected (i.e. a "headless" system). – MooseBoys Jun 20 '14 at 08:13
  • I found the problem (see my own answer). Thanks for your help anyway! – Roman Reiner Jun 20 '14 at 12:20

2 Answers2

4

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.

Roman Reiner
  • 1,089
  • 1
  • 10
  • 17
2

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.

Chuck Walbourn
  • 211
  • 3
  • 2