Repository navigation
Conversation
…ine stack vkd3d-proton's DXIL-to-SPIR-V converter keeps a single back edge per loop header and treats additional back edges as forward edges, recursing indefinitely over the resulting cycle in shaders with wave shuffles. Large traversal shaders also overflow the default 2 MiB thread stack during vkd3d-proton DXIL conversion under Wine, hanging the worker thread instead of returning an error. Add Module::single_latches() before bitcode emission to route multi-latch loop headers through a single synthetic latch block joining their phi values, and raise the pipeline worker stack size to 256 MiB (reserved virtual space, committed on demand) in both victory-gpu and the translate CLI. Fixes all 6 previously hanging ray-tracing shadow shaders on RTX 3080 under Wine/vkd3d-proton (0 timeouts, 6/6 pipelines created).
|
Thanks @gmankab! Since this touches the shader translator for every card, we'll run it in game on our RX 9070 XT first (it goes into our next test build) and merge here once it holds. Will report back in this PR. |
|
I checked the loop rewrite on native Windows with a synthetic compute shader whose two back edges update a counter and an accumulator differently. The fixture runs 128 threads, including eight that skip the loop. It validates the generated DXIL, dispatches it on WARP, and compares both values from every thread with a CPU reference. All 256 output dwords matched in each of four runs on the parent ( |
|
Thanks for checking the loop rewrite on native Windows, that settles the Wine-only worry. We'll give it a run in game too. |
This ports powplusplus's shader-loop normalization and pipeline worker stack size from Fxceless. The DXIL conversion path expects a single back edge per loop header. Joining multiple back edges through a block also joins their phi inputs.
On an RX 6800, the unpatched beta reported six pipeline-worker stack overflows with its default stack and six again with a verified 64 MiB reservation. With this patch, the longer run drained the startup pipeline queue, logged zero worker stack overflows, and rendered the prologue courtyard in Series S mode with FSR 3.1.6. The run later hit the null-write exception at title offset
0x23cf683, which also occurred in an earlier stable build.The smoke and prologue tests used commit
7bcfe20with the same executable source as this branch. The intervening beta commits only changed documentation. The runs used different warm cache states, so the main evidence here is queue completion and disappearance of the overflow reports.Based-on: fxceless/victory-fork#737
Tested-on: RX 6800, Fedora Linux 45, Wine/vkd3d-proton, FSR 3.1.6
Assisted-by: gpt-6.2 sol xhigh