0
\$\begingroup\$

I can check it with ID3D11Device::CheckMultisampleQualityLevels(). So to use it I need to create the device: D3D11CreateDeviceAndSwapChain(). To call it I need to fill the DXGI_SWAP_CHAIN_DESC which, among others, specifies... the multisample quality level. Vicious circle.

Do I have to split D3D11CreateDeviceAndSwapChain() into creating the device and the swap chain separately? Or what?

\$\endgroup\$
1
  • \$\begingroup\$ You could create a swapchain with the default multisample parameters, check for the supported values, then recreate. You normally check for these when you initialize the program so the user will not even notice it. \$\endgroup\$ Commented Feb 23, 2014 at 22:35

1 Answer 1

3
\$\begingroup\$

If you aren't going to request a multisampling quality value that is guaranteed (certain feature levels require certain levels of multisample quality support), then you need to create the device without the swap chain, check the quality support level, and then create your swap chain.

You should do this anyway, since the "guess and check" method is error prone: you usually don't get enough information about invalid parameters without the debug layer (which you cannot enable in shipping code) to know if it's the MSAA level or feature level that causes a failure when creating the device and swap chain at the same time.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .