Why is there a problem with the DXGI_USAGE flag regardless of what I set it to?

CDev-8220 300 Reputation points
2025-04-03T17:28:05.7233333+00:00

My IDXGIFactory2::CreateSwapChainForComposition fails every time with the following error:

DXGI ERROR: IDXGIFactory::CreateSwapChain: The BufferUsage field of the swapchain description contains some DXGI_USAGE flags that are not supported. DXGI_SWAP_CHAIN_DESC{ SwapChainType = ..._Composition, BufferDesc = DXGI_MODE_DESC1{Width = 320, Height = 200, RefreshRate = DXGI_RATIONAL{ Numerator = 0, Denominator = 1 }, Format = B8G8R8A8_UNORM, ScanlineOrdering = ..._UNSPECIFIED, Scaling = ..._UNSPECIFIED, Stereo = FALSE }, SampleDesc = DXGI_SAMPLE_DESC{ Count = 1, Quality = 0 }, BufferUsage = 0xb, BufferCount = 3, OutputWindow = 0x0000000000000000, Scaling = ..._STRETCH, Windowed = TRUE, SwapEffect = ..._FLIP_SEQUENTIAL, AlphaMode = ..._PREMULTIPLIED, Flags = 0x0 } [ MISCELLANEOUS ERROR #114: ]

Why are none of the DXGI_USAGE flags supported?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,761 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.