GPU: helper shaders compiled at run time fall back to DXC (Wine's compiler refuses many and drops [RootSignature]) #925
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!925
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-925"
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?
@kc01-8 on GitHub · 2026-11-28 09:10 UTC · original
kc01-8:pr/dxc-helpers→main· +381 −119 · 6 files · 3 commits · merged 2026-11-29 00:24 UTCSummary
d3dcompiler_47refuses many of these helpers. Worse, it accepts[RootSignature(...)]but leaves it out of the code. vkd3d-proton then finds noRTS0part and failsCreateRootSignaturewithE_FAIL, and the helper quietly turns itself off. Such code now counts as refused, so DXC compiles it.How
crates/victory-gpu/src/hlsl.rs(new):compile_for(name, source, entry, target).D3DCompilefirst, then DXC at the 6.0 model of the same stage (cs_5_1becomescs_6_0, and so on).dxcompiler.dll, looked for in this order:VICTORY_DXC(the DLL or its folder), then the executable's folder, then System32.RTS0part.host::compile, the card compare, the composer and the indirect clamp go through it. The depth planes' vertex shader follows its pixel shader to DXC, so a pipeline's two stages are of one kind.Win32_Graphics_Direct3D_Dxcfeature ofwindows.Testing
victory.execross-builds (x86_64-pc-windows-gnullvm, release) on this branch, which is63b902feplus these commits.hlsl::tests(3) pass under Proton Experimental's Wine with DXC.E_FAIL.Where this comes from
This is part of kc01-8/VIctoryNVIDIALINUX (branch
kc/foxhound). It is this tree running on an NVIDIA GeForce card under Linux and Proton. So far, on an RTX 3080 Ti:Its README has the progress by run, what works and what doesn't, and a ranked list of next steps for people and agents taking it further.
Credits
dffc5924("Optionally cross-compile the built-in GPU helper shaders with host DXC", Codex).🤖 Generated with Claude Code
Under Proton run 35 lost, to Wine's builtin d3dcompiler_47 refusing them, the ambient light's stand-in for the title's ray tracing ("no stand-in for the indirect light"), the card compare ("no host copies in the card's memory"), keeping the card awake, and the depth planes' passes. They all compile through crate::host::compile or beside it. crate::hlsl::compile_for compiles any entry point for a _5_1 target with the system's compiler, then with DXC at the 6.0 model of the same stage; host::compile, the card compare and the composer use it. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit b97ad9950e8b8d400629f45c814c557bd75fd878)@Dukestar69 on GitHub · 2026-11-28 09:18 UTC · original · approved these changes
Tested locally merged onto
main(63b902f).cargo xtask policypassed (295 files ok).cargo test -p victory-gpu --lib hlslpassed (3 passed; 0 failed:a_root_signature_is_declared_for_its_function,compiled_code_holds_its_root_signature,raw_buffer_shader_compiles_with_a_fallback).cargo test -p victory-gpu --lib ambient::passed (5 passed; 0 failed).cargo test -p victory-gpu --lib host::card_steps::passed (9 passed; 0 failed; 1 ignored).Clean DXC fallback and root-signature preservation for runtime-compiled helper shaders. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@ArturoWolff on GitHub · 2026-11-28 09:32 UTC · original
This overlaps a compiler defect we independently isolated on RTX 4060/16 GB under GE-Proton11-14: the system-only
host::compilereturned a scatter shader whose root-signature creation failed with E_FAIL, so the ordinary submission-owned upload path never ran. Routing that one pass to the existing DXC fallback restored actual upload work (#628 measurements). Thank you for addressing the wider class of helper shaders here; credits to kc01-8 and JMAN730/victorydffc5924as noted in the PR.Independent numerical validation of your exact head
8fb73e2d50899c8f467ce1c3c966b707b71e979f: I added a test-only fixture invoking the actualhost/send.rs::pass()constructor, then dispatched that unchanged scatter shader into an owned 256-byte device-local buffer. The buffer was initialized from 64 distinct CPU words, and the input pairs at byte offset 16 requested three aligned in-bounds updates at word indices 3, 29 and 61. Fenced whole-output readback matched the independent CPU expectation for all 64 words, including every untouched word. No game files mounted, no hardware skip. Windows MSVC release cross-build, verified physical RTX 4060, NVIDIA 620.73.04, GE11-14/vkd3d-proton 3.2.0, DXC 1.9.2609.Actual game: exact PR with only the already-tested Linux file-backing adaptation (and the above
cfg(test)fixture, absent from the release), Series X 1080to1440, DLSS/FG off, cloned profile/fresh external caches, full write-back, ordinary waits and effects intact. No private compiler adapter or compact bucket experiment layered onto this PR. Four DXC successes (two generic host helper root-signature omissions, the card compare's Load4 refusal, and the clamp's InterlockedOr refusal), zero DXC failures. Submission-own send summaries: 26/49 nonzero, maximum reported 21.8 MB/frame; the prior system-only scatter configuration reported zero throughout. This confirms broader fallback compilation and real restored upload activity; the generic log label does not identify every helper, so I cannot claim local coverage of all named passes.The launch still reaches loading artwork and a black overlay, then actual exit 5 after 127.9 s, minimum available host RAM 1914 MiB. Our previous scatter-only fallback run with standard allocation buckets was 133.7 s / 2312 MiB / exit 5. No guard stop, OOM increment, recorded GPU fault or reported device/fence failure. Not an in-world FPS or visual-quality comparison; no title check or watchdog changes. No game files, dumps or extracted data attached.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
@Aniseto on GitHub · 2026-11-28 09:38 UTC · original
Ran the HLSL fallback tests at
8fb73e2on Windows with an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build.All three tests pass. The PR description says the
hlsl::testswere run under Wine/Proton and that Windows with this exact branch was not tested; this run fills that gap. On Windows the system compiler takes every helper, so the DXC fallback path itself is not exercised here. The thread has an RTX 4060/Proton report but no 5070 Ti or Windows run.Not tested: the Wine/Proton fallback path, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
github-bot referenced this pull request2026-11-29 02:06:45 +00:00