Direct3D9 Device Reset #1455
Labels
Confirmed
The issue has been confirmed as existing by another user or contributor.
Graphics
Game visuals including render state, geometry pipeline, rasterization, and related assets.
Reproducible
Can be triggered determininistically by a discrete series of steps.
This is a known pain with Direct3D9. If the window is resized a device reset needs to be performed to resize the backbuffer. The device will not properly reset without freeing some resources and recreating them, such as surfaces. I patched surfaces in #756 to save and reload themselves during the reset, which I recall fixed only Project Mario. I've now run into new issues with the device reset in other games including Wild Racing and GMS 3D Cube Demo.
The first one is problematic to games that attempt to draw and then read a heightmap in the create event of the game like Wild Racing. Draw anything in the create event of the game, such as the following:
And you'll get the following error message:
The bug can be reproduced in other games as well, such as the GMS High Polygonal Model Count by simply enabling the MSAA which requires a device reset to change the backbuffer.
There appears to be basically two ways to solve this. We need to save/restore more D3D9 resources, either vertex buffers or vertex formats, I'm not sure. The alternative is we can switch to Direct3D9Ex which does not have these problems. The only down side is that Direct3D9Ex does not support Windows XP.
The text was updated successfully, but these errors were encountered: