We're experiencing a crash with Ogre when trying to create render windows on a tablet PC (model is TEGATECH P10T).
Here's the OgreLog message :
I notice that sometimes the CreateRenderWindows is failing because of the acquireRenderWindowResources() function.17:26:26: OGRE EXCEPTION(3:RenderingAPIException): Unable to create an additional swap chain in D3D9RenderWindow::acquireRenderWindowResources at .\RenderSystems\Direct3D9\src\OgreD3D9Device.cpp (line 1026)
We had a crash that we fixed : the function CreateAdditionalSwapChain() can fail because of invalid param. In this case none of the two consecutive calls will work.
I found that the problem is in OgreD3D9RenderSystem.cpp. Ogre tries to guess the multisampletype by testing the best value (function determineFSAASettings). In the worst case, ie when even D3DMULTISAMPLE_2_SAMPLES cannot be supported by the device the function exits without setting the out parameters value :
Code: Select all
if (fsaa == 1)
{
// ran out of options, no FSAA
fsaa = 0;
ok = true;
}Code: Select all
if (fsaa == 1)
{
// ran out of options, no FSAA
fsaa = 0;
// JYC BEGIN 03/07/2012 : update out parameters !
// Not that we could ASSERT on SUCCEEDED( mpD3D->CheckDeviceMultiSampleType(...) );
*outMultisampleType = D3DMULTISAMPLE_NONE;
*outMultisampleQuality = 0;
// JYC END 03/07/2012
ok = true;
}Jean-Yves CORBEL
Developper at Ice-Dev.