vkd3d-proton icon indicating copy to clipboard operation
vkd3d-proton copied to clipboard

Age of Empire 4 hangs on Intel shortly after intro screen

Open djdeath opened this issue 1 year ago • 6 comments

I've traced this to 2 issues. One of them doesn´t seem to be a driver problem. It seems Vkd3d-proton is reusing a mutable descriptor as an image/sampler or a buffer view without writing it prior to submission. In the descriptor the image part normally would have the bottom 6 bits to 0 (if it was written by the driver) : https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/intel/vulkan/anv_descriptor_set.c#L1355 But we're not getting zeros and the HW reads that as a message length which makes it go off the rails.

The fix/workaround for the Intel/Mesa driver : https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17247 It was reported again with proton experimental yesterday : https://gitlab.freedesktop.org/mesa/mesa/-/issues/7111

djdeath avatar Aug 24 '22 05:08 djdeath

This sounds like a game bug then? Is this something descriptor_qa_checks catches?

HansKristian-Work avatar Aug 24 '22 08:08 HansKristian-Work

I didn't know that tool existed, would need to check.

I don't know the status of validation layers for this extension, but I suppose it could be caught there too.

djdeath avatar Aug 24 '22 08:08 djdeath

There is no GPU validation support of mutable with update-after-bind. descriptor_qa_checks is a tailor made variant of that for vkd3d-proton.

HansKristian-Work avatar Aug 24 '22 08:08 HansKristian-Work

I think I just ran into another instance of this with a different title (Hellblade: Senua's Sacrifice) : https://gitlab.freedesktop.org/mesa/mesa/-/issues/7110

Except this time I can't workaround it with a compiler change.

Do you know if descriptor_qa_checks is available in any of the proton version shipping with steam?

djdeath avatar Sep 24 '22 11:09 djdeath

As far as I'm aware there is no Proton build on steam that ships with descriptor_qa_checks enabled. You'll have to build vkd3d-proton manually with meson --cross-file build-win64.txt -Denable_descriptor_qa=true and then copy the resulting d3d12.dll to e.g. $HOME/.local/share/Steam/steamapps/common/Proton - Experimental/files/lib64/wine/vkd3d-proton, overwriting the existing one.

mbriar avatar Sep 24 '22 13:09 mbriar

Well it sucks. With descriptor_qa_checks I cannot reproduce the problem anymore.

djdeath avatar Oct 17 '22 20:10 djdeath

The Hellblade issue turned out to be an driver issue, fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19275

Checking Age Of Empire 4 and will close if also fixed.

djdeath avatar Nov 11 '22 09:11 djdeath

FWIW, it looks like AoE4 currently also hangs on AMD in some scenarios https://github.com/HansKristian-Work/vkd3d-proton/issues/1279 You might want to try with https://github.com/HansKristian-Work/vkd3d-proton/pull/1285, or wait until it lands.

mbriar avatar Nov 11 '22 09:11 mbriar

Confirm, AoE4 is also fixed for us.

We have some rendering issue, but it's probably thing else.

djdeath avatar Nov 11 '22 09:11 djdeath

Given the comment at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19275#note_1635850, is this really fixed already?

heftig avatar Nov 12 '22 23:11 heftig

Partly, there are other issues.

djdeath avatar Nov 12 '22 23:11 djdeath