I tried to get multi-sampling working.

I check multi-sample support with CheckMultiSampleQualityLevels() after I created my back buffer with D3D10CreateDeviceAndSwapChain(). While creating this back buffer I specify 1 for the SampleDesc.Count and 0 for SampleDesc.Quality.

For the count CheckMultiSampleQualityLevels returns 17 and for quality it returns 0. This happens for a 8-bit per channel back buffer or a 16-bit per channel float back buffer. It also happens if I change the count number in the D3D10CreateDeviceAndSwapChain call.

The error message that is returned by the CreateTexture2D call then is:

CreateTexture2D: The Sample descriptor is invalid. DXGI_SAMPLE_DESC::Count (value = 16) must be between 1 and 32. For 16 samples, the current graphics implementation only supports DXGI_SAMPLE_DESC::Quality (value = 0) less than 0. <--if 0 is shown here for Quality, this means the graphics implementation doesn't support this number of samples. Use CheckMultiSampleQualityLevels to detect what the graphics implementation supports ...

I guess graphics implementation is the graphics card ...

- Wolfgang

Re: Direct3D 10 Multi-Sampling

Jacob Beaudoin

CheckMultiSampleQualityLevels will only tell you how many quality levels a format supports for a specific sample count.  The error message is telling you that 0 quality levels are supported with the sample count of 16 for that format.  If the number of quality levels is 0 then that format and sample count combination is not supported. 

For example:

UINT uNumLevels;
pDevice->CheckMultiSampleQualityLevels( DXGI_FORMAT_R8G8B8A8_UNORM, 8, &uNumLevels );

If uNumLevels was returned to be 4, then quality levels 0 to 3 are supported with that sample count and format.