Home > Software design >  IDXGIOutput::GetDisplayModeList Finds No Display Modes
IDXGIOutput::GetDisplayModeList Finds No Display Modes

Time:03-29

I am trying to get a list of all the possible resolutions for a IDXGI_OUTPUT*. To do this, I found the IDXGIOutput::GetDisplayModeList API. Unfortunately, there are almost no examples of usage that I could find online. I tried the one on MSDN, and it failed to find any display modes (num is 0)

UINT num = 0;
DXGI_FORMAT format = DXGI_FORMAT_R32G32B32A32_FLOAT;
UINT flags         = DXGI_ENUM_MODES_INTERLACED;

pOutput->GetDisplayModeList( format, flags, &num, 0);

DXGI_MODE_DESC * pDescs = new DXGI_MODE_DESC[num];
pOutput->GetDisplayModeList( format, flags, &num, pDescs);

I noticed MSDN recommends to use GetDisplayModeList1() instead, so I tried that as well and num still is 0. I have also verified that the IDXGI_OUTPUT* is completely valid. I am at a loss what to do...

CodePudding user response:

You are asking for all display modes that support the DXGI_FORMAT_R32G32B32A32_FLOAT format. This format is never supported (at least at the time of this answer posting) for "display scan-out".

The only currently defined "display scan-out" DXGI formats are:

DXGI_FORMAT_R16G16B16A16_FLOAT
DXGI_FORMAT_R10G10B10A2_UNORM
DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM
DXGI_FORMAT_R8G8B8A8_UNORM
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
DXGI_FORMAT_B8G8R8A8_UNORM
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB

See Microsoft Docs.

  • Related