HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.91k stars 199 forks source link

Unity Enemies Demo SIGQUITs itself #1482

Closed mbriar closed 1 year ago

mbriar commented 1 year ago

Software information

The Unity Enemies Demo SIGQUITs itself with latest vkd3d-proton and DXVK on the loading screen. Before D3D11on12 was implemented, it would not use d3d12 at all and run on d3d11 with broken rendering, but without crashes, see https://github.com/doitsujin/dxvk/issues/3086 for some context.

The demo can be downloaded here: https://unity.com/demos/enemies

System information

Log files

trace log: https://mega.nz/file/r34XDRZR#HCgX5ceFDwmXBU-5FpkOUBKnkPydneJNBwNQs47Brgg

HansKristian-Work commented 1 year ago

Based on the log, it's a plausible dxil-spirv bug. If someone can dump the shaders, that'd save me time.

mbriar commented 1 year ago

Shader dump: enemies-shaders.zip

I don't see any validation errors or compiler crashes though.

doitsujin commented 1 year ago

Vulkan validation layers don't work at all, there's no stack trace or anything and no indication if there's even a crash at all, or whether the demo just closes due to some unsupported feature or whatever. No idea how to debug this.

doitsujin commented 1 year ago

Turns out that dxil-spirv asserts somewhere, so yeah, looks like a bug there.

mbriar commented 1 year ago

Still happens with dxil-spirv 353d28718881.

Can be reproduced with the dxil-spirv cli application and b034d0902cf76bbc.dxil from the shader archive above:

dxil-spirv: /tmp/dxil-spirv/node.cpp:284: static dxil_spv::CFGNode* dxil_spv::CFGNode::find_common_post_dominator(dxil_spv::CFGNode*, dxil_spv::CFGNode*): Assertion `b->immediate_post_dominator' failed.
HansKristian-Work commented 1 year ago

Yes, it is known. The shader is extremely difficult and I haven't been able to prioritize a demo.

mbriar commented 1 year ago

This runs now on master, there are a few warnings printed when compiling the shaders, not sure if that's actually an issue:

[WARN]: There is no candidate for ladder merging.

It looks a bit noisy and broken, but that might be because it's supposed to use ray tracing? Running it with VKD3D_CONFIG=dxr11 RADV_PERFTEST=rt results in RADV crashing, however, reported to Mesa here: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9003

oscarbg commented 1 year ago

seems to render correctly now on Windows+NV driver!