composer: make the root signature in code, so it works under Wine without DXC #2449
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2449"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HyperRamzey on 2026-11-29T13:10:02Z.
What
The composer's HLSL declared its root signature with
[RootSignature(RS)]. Wine's builtin d3dcompiler accepts the attribute and leaves theRTS0part out of the code; vkd3d-proton then failsCreateRootSignaturewithE_FAIL(noRTS0), the layer falls back to DXC, and on a machine without DXC the composer is never made: the title presents frames but only the base plane is shown, black during loading (#860). This ports #1702's idea with main's corrected shape:[RootSignature]attributes, theRSstring and the#defineare gone from the source;with_signature_descriptionbuilds a version-1.1 description in code: parameter 0 is one SRV descriptor table (t0, 2 descriptors) for the pixel stage, parameter 1 is 18 32-bit constants atb0for the pixel stage (main's shadow-lift constants; #605's 1-parameter version left them unbound), plus one static linear/clamp sampler ats0for all stages;D3D12SerializeVersionedRootSignature->pipeline::samplers::know_own->CreateRootSignature;SetGraphicsRootDescriptorTable(0)andSetGraphicsRoot32BitConstants(1)match the parameter order;compile()returns the code bytes throughhlsl::compile_for; the now-unusedhlsl::blobhelper is removed.Verified in game (Proton-CachyOS, vkd3d-proton)
two-plane composer not madeover 16,210 log lines; nocomposerefusal line, so Wine's compiler compiled the composer directly.dxcompiler.dllanddxil.dllmoved out of reach: picture again at 30.0 fps, 0 over 4,130 log lines, while another helper shader (card compare) still shows DXC absent by refusing and failing its fallback with0x80004005. The composer's success is the in-code signature's, not a fallback's.Test
compose::signature_tests::the_root_signature_matches_the_sources_rspins the parameter count, types, ranges, register/space, counts, visibilities, the static sampler and the flags, and fails when any is perturbed (sabotage:root_constants(0, 1)turns it red). Passes under Wine.Resolves / relates
[RootSignature]Wine drops).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-29T13:25:14Z.
Review: APPROVED
Tested locally merged onto
main(829188e9).crates/victory-gpu/src/compose.rs.cargo test -p victory-gpu --lib composepassed (2 passed; 0 failed, including the newcompose::signature_tests::the_root_signature_matches_the_sources_rstest) with 0 new warnings.Clean programmatic root-signature serialization avoiding DXC dependency under Wine. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.