http://bugs.winehq.org/show_bug.cgi?id=22290
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2010-04-09 14:52:33 --- Created an attachment (id=27304) --> (http://bugs.winehq.org/attachment.cgi?id=27304) Pol fix
The app uses a 32 bit depth buffer, which doesn't work with the D24S8 onscreen depth buffer we request from WGL(that's a bug on its own). So wined3d falls back to rendering the backbuffer offscreen.
Unfortunately, there's a bug in the context manager that activates FBOs in this situation even if the app actually tries to access the front buffer. No good. This happens when the app tries to blit the backbuffer onto the front buffer(it has to, it's the only way when rendering to a window in ddraw.
The attached patch fixes the game, but it does two things: First, it avoids falling back to offscreen rendering when the front buffer is requested as target surface. This fixes the GL errors, but doesn't fix the black screen.
Second, it allows the Present-instead-of-blit hack with stretching, since Present() can now do that. This should be done in a nicer way though. The present-blit hack should old be used when using backbuffer ORM or be removed entirely. It's an old hack that was needed to make windowed d3d7 useable on old drivers. Now that we have FBOs pretty much everywhere it's not much of a concern any longer.
I'm surprised that the context.c part doesn't fix the black screen. However, even if I force backbuffer ORM I get a black screen. Is this expected? Or yet another regression of top of the two known ones?