protonscr

[d3d8] GameMaker games trip up fullscreen presentation on the GDI fallback path

dxvkclosed
doitsujin/dxvk#4246 · opened 2024-09-08 by WinterSnowfall · updated 2024-10-09 · 5 comments · github
WWinterSnowfall 2024-09-08 github

The game will fail to present when in fullscreen, thus the result will be a perpetual black screen. The logs spam a lot of:

err:   D3D9SwapChainEx::BlitGDI Surface GetDC failed
err:   D3D9SwapChainEx::BlitGDI Surface GetDC failed

interweaved with device resets, until the game eventually gives up. Windowed more works just fine.

WineD3D also works just fine, both windowed and fullscreen.

Software information

Hydorah (2010) , a freeware side-scrolling shooter.

System information

  • GPU: Intel(R) Xe Graphics (TGL GT2)
  • Driver: Intel open-source Mesa driver 24.0.9
  • Wine version: 9.17 Staging
  • DXVK version: daccde7

Apitrace file(s)

Hydorah.trace.tar.xz (captured with dxvk, while the problem was manifesting)

Log files

Hydorah.log

WWinterSnowfall 2024-09-08 github

P.S.: Apparently it's a problem with GameMaker, the game's underlying middleware, which had a d3d8 renderer around ~2010 or so. I've tried a few other games built on GameMaker and they all exhibit the same problem when in fullscreen mode.

WWinterSnowfall 2024-09-08 github

Well, that would explain, I guess, why dxvk thinks partial presentation is involved and trips up the GDI path (render rect would be smaller than the screen resolution, I believe). Ideally we shouldn't end up here in the first place with these sort of games, but then again it's also odd it doesn't work as expected. Maybe @K0bin can have a look when time permits, as this entire GDI thing is his design.

WWinterSnowfall 2024-09-08 github

It seems had not worked as expected in 8to9 1.8.0 too, probably before doing something like this

Yes, I noticed that. See: #4245. But the GDI problem is unrelated and takes precedence, so it doesn't even really get up to the SetViewport calls at the moment.

WWinterSnowfall 2024-09-11 github

Apparently it's fine on Nvidia in terms of rendering (viewport is indeed squewed, but #4245 should take care of that), so those GDI calls were only failing on ANV??? That's really odd...

Edit: Nevermind, turns out that with #4245 it behaves the same on Nvidia. So apparently Nvidia has a higher tolerance of viewports being outside of the render target by default.

KK0bin maintainer 2024-09-12 github

Fixed by #4258

Nothing extracted yet.