I find on some of my machines the unit test TooHighMultiSampleCountClampedToMaxSupported fails:
It came from https://github.com/MonoGame/MonoGame/pull/5477 by @Jure-BB,
Specifically i get errors on this line:
// Reference device supports 32 samples
Assert.AreEqual(gdm.GraphicsDevice.PresentationParameters.MultiSampleCount, 32);
(note the assert also should be fixed as expected and actual parameters are reversed)
In my case my reference device gets 16 and not 32.
So either:
a) we're not setting the reference device properly.
b) reference device can have different max multisample counts on different systems.
c) some other weird bug.
Someone needs to do a little research on this and fix this test.
Assuming A is not true... my guess is fixing it to verify that the resulting MultiSampleCount is < the set value might be a more robust test and covers what we're looking to verify anyway.
Also ideally we could also enable it to run on OpenGL and XNA now and not just Windows DX platforms.
In my case my reference device gets 16 and not 32.
I thought reference device should support every Direct3D feature at max levels. I'm not 100% sure. https://msdn.microsoft.com/en-us/library/windows/desktop/ff476328(v=vs.85).aspx
Could you provide what are the relevant differences between systems (OS version, SDK version etc)? It seems Windows SDK has to be installed for reference device to work.
note the assert also should be fixed as expected and actual parameters are reversed
My mistake :)
Assuming A is not true... my guess is fixing it to verify that the resulting MultiSampleCount is < the set value might be a more robust test and covers what we're looking to verify anyway.
That won't catch bugs that disable multisampling (e.g. force it to always be zero). In that case I think we should also verify that resulting MultiSampleCount is greater than 0. Otherwise I think it would be a good solution, especially if B is true.
It seems Windows SDK has to be installed for reference device to work.
Well the creation code is requesting the reference device and i get a device back. Don't know how to tell if i got the reference device or not.
OS version, SDK version etc
Windows 10 Pro 1709. I didn't have the Win 10 SDK installed... trying that next.
So have the latest Win 10 SDK and i still get this failure. Going to address it by altering the test as we discussed:
verify that the resulting MultiSampleCount is < the set value might be a more robust test and covers what we're looking to verify anyway.
also verify that resulting MultiSampleCount is greater than 0
I agree as I'm out of ideas what could be causing this failure. I did some research, but didn't find anything useful. It might not be caused by MG anyway, so it doesn't make sense to loose too much time over this. Another win is that altered test won't be dependent on reference device version (max MultiSampleCount could increase in the future) and as you said earlier that it can be enabled for other platforms.
it consistently fails on my machine as well. PR with proposed solution just pushed out
Fixed in #6446!