Repository navigation
Shaders, GPU: one back edge per loop header, and a large stack for pipeline threads - #1885
powplusplus wants to merge 2 commits into
Conversation
vkd3d-proton's DXIL conversion keeps one back edge per loop header, as DXC's code has. With several, the others stay in the header's forward predecessors and form a cycle, and in programs with wave shuffles its dominator search then recursed without end: the thread overflowed its stack and, under Wine, hung. The ray-tracing shadow passes do this once they translate. The back edges of a header with several now go through one new block that joins their phi values.
vkd3d-proton converts DXIL on the thread that creates the pipeline, recursively over its control flow. The ray-tracing shadow passes overflowed the default 2 MiB, and under Wine the overflow hung the thread instead of failing. The pipeline workers and the translate command's workers now get 256 MiB, reserved only.
catminou4
left a comment
There was a problem hiding this comment.
Mixed PR: shader/formats parts are macOS-tested in the batch; GPU/HLE parts are Windows-only statics.
One back edge per loop header + large-stack…: apps+gpu+shader mixed — shader part in batch.
|
Automated triage for the maintainers. Needs work. There are two parts. What needs answering before a merge:
CI: no check runs on this head. Generated by Claude Code |
Offline measurement on a retail dumpResult: no count change against I merged head 5aa10e5 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
Two hangs in vkd3d-proton's pipeline creation, both in its DXIL conversion (dxil-spirv), which runs on the thread that creates the pipeline.
Module::single_latches, before writing, sends the back edges of a header with several through one new block that joins their phi values.Found with a native dxil-spirv build under gdb on the DXIL vkd3d-proton dumped.
Results
No program changes whether it emits or validates (
translate --validateover shaders.rpf, identical to70564ae). On main the programs that hit this do not translate yet; with #1883 they do, and then, on an RTX 3080 under Proton, each pipeline created on its own with a 120 s limit:The second run stopped after 35 of the 45 (the machine ran short of memory, nothing to do with the run). Those 35 include 30 of the 35 that hung. Not run yet with this: the four
CS_RaytraceVBuffer_*ShaderBinning*passes andCS_RaytraceShadows_Shared, which hung before, and the fiveCS_Subdivision_*programs.Testing
cargo test -p victory-shader -p victory-gpuunder Proton (RTX 3080 and WARP): as on main (victory-shader 204 passed, victory-gpu 74 passed; the same 5 and 4 fail on main there).