Wine/vkd3d-proton: the built-in shaders' ladder that renders the world on Linux #338
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!338
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-338"
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?
@GustawMatuszewski on GitHub · 2026-11-26 17:30 UTC · original
GustawMatuszewski:linux/wine-vkd3d-built-ins→main· +481 −43 · 13 files · 1 commits · openWhat this is
Five fixes that make this tree's built-in shaders and pipelines work under Wine + vkd3d-proton, and with them the world renders on Linux. Before them the 3D world was black: the same symptoms as the "black screen" reports on Windows hosts whose view heap is capped (issue #3081's "before" row), but reached a different way — every built-in pipeline failed to build, so the indirect argument clamp and the ambient light were dead and every world indirect dispatch was dropped.
Tested on one machine: RX 9060 XT 16 GB, RADV (Mesa), GE-Proton 11.14 (wine 11.0 + vkd3d-proton), Series X profile, commit
c9c932c+ this branch. The operator watched the world render on the display. No game files, code only.The ladder, in the order each rung was hit
E5005: Method 'InterlockedAdd' is not defined on type 'RWByteAddressBuffer'(the ambient's stats)#ifdef STATS; the light itself is untouchedE5005: Method 'InterlockedOr'/'InterlockedMax'/'InterlockedCompareExchange' …(the argument clamp's budget)RWStructuredBuffer<uint>view and the free-functionInterlockedOr/Max/Add/CompareExchangeformE5005: Function "isnan"/"isinf"(the ambient)c != c/ the same check written outE5017: … Unhandled attribute 'allow_uav_condition'CreateRootSignature(<the whole compiled blob>)returnsE_FAIL— the host rejects wine's embedded root signature, exactly as it rejects it for any built-in pipelinerootstring.rsreads each source's own#define RS "…", builds theD3D12_ROOT_SIGNATURE_DESCand serializes it withD3D12SerializeRootSignature— the path the title's own signatures already takeRung 5 is the one that mattered most: it is the same 12 call sites, and every built-in pipeline (both clamps, the ambient, the composer, the host's plane pipelines, the card compare, awake, send, upcheck, the light probe, in-place, the replay merge) fell with it.
Measured, before and after (RX 9060 XT, RADV)
no argument clamp: indirect execution droppedno stand-in for the indirect lightindirect mesh dispatches: … groups asked per frameNotes for reviewers
ambient.rsonly inside the diagnostic stats block and one NaN/Inf guard; the lighting math is unchanged.RSstring the HLSL already carries, so the two cannot drift.d3dcompileris still the compiler for these sources; the ladder removes every construct it rejects today, not the compiler.The rest of what this port needed on Linux — a CPU-side overflow view heap for the slots past a capped host's heap, the 2020 DirectStorage queue slots, and a plain copy mode that only copies committed pages — is in
wip/allon my fork if any of it is wanted here.@ArturoWolff on GitHub · 2026-11-26 20:57 UTC · original
Independent NVIDIA/Proton qualification of this patch, and one remaining compositor parser fix.
I compared the exact direct parent
c9c932cbcc38defd8f1683d62dd298187f565031, the authored heada8c28bac2f265d829a386c569c839f5e5a0e5b5e, and that same head with a one-line correction inrootstring.rs. Hardware: RTX 4060 8 GiB, 16 GiB system RAM, GE-Proton 11-14 (Wine 11.0 Staging, vkd3d-proton 3.2.0 build71cae091b06571e, NVIDIA 620.73.04). Actual loader log confirms builtind3dcompiler_47.dllin all three arms. Separate Windows Cargo targets, identical cloned starting prefixes, initially empty per-arm driver-cache directories, identical DLLs and graphics settings. A private virtual X server provided DXGI initialization only. No game assets, title execution, display capture, input, or feature reductions.The compiler probes independently separate compilation from signature extraction. Parent: 8/13 entry-point/profile probes compiled; the other five hit the
isnanorRWByteAddressBufferatomic-method errors described here. PR head: 13/13 compiled. Every successful builtin compilation still warnedW5302: Ignoring unknown attribute "RootSignature";D3DGetBlobPart(D3D_BLOB_ROOT_SIGNATURE)returned0x80004005, zero signature bytes, and using the entire compiled blob as a root signature also returned0x80004005. The new explicit serialization path restores the named constructor groups and real compute execution despite this. All five successful smoke dispatches/readbacks matched 16 transformed u32s plus four untouched sentinel words (400 bytes in total), with an independent CPU oracle and a completed fence.Remaining failure in the authored head:
Composer::newreturnedErrwith HRESULT0x00000000(Error::empty()), not a working pipeline.compose.rsdeclaresfilter=FILTER_MIN_MAG_MIP_LINEAR, butrootstring.rs::filterdoes not recognize that token. I added only this match arm to the production code:The corrected constructor passes. I also ran the existing
compose::tests::composes_scaled_premultiplied_plane_on_gpuwith a test-only wrapper requiring the actual RTX 4060, so a no-device skip cannot pass the qualification. The 3x1 output is[127, 0, 0, 255, 64, 127, 0, 255, 0, 0, 255, 255]versus its existing expectation[128, 0, 0, 255, 64, 128, 0, 255, 0, 0, 255, 255]. All 12 channels satisfy the existing ±1 tolerance. The same filter spelling also occurs in an ignored diagnostic test inindirect.rs; I did not run that test. I recommend adding the match arm and keeping the compositor regression as a required hardware check. Returning a failing HRESULT for parser refusal would also make future missing-token errors less misleading.All three cross-builds succeeded (
cargo test --profile diag -p victory-gpu --lib --features diagnostics --no-run --locked --offline --target x86_64-pc-windows-gnullvm). The focused tests ran serially with fresh prefixes; their exits above are assertion-test outcomes, not title crashes. External host-memory guard 512 MiB, no restrictive memory/swap cgroup caps, no host OOM kills or detected kernel GPU faults. This is NVIDIA corroboration of the ordinary built-in compiler/signature compatibility changes, not verification of the reported lit world, AMD/native Windows behavior, the complete set of built-ins, retail FPS, or gameplay.AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol Max).
@Tymon3310 on GitHub · 2026-11-27 00:20 UTC · original
The
rootstringparser is missingFILTER_MIN_MAG_MIP_LINEAR, one of the most common filters.On Belobug's
a-publier(4eb6cfd + this commit cherry-picked), the two-plane composer's root signature (compose.rs:StaticSampler(s0, filter=FILTER_MIN_MAG_MIP_LINEAR, ...)) is refused withthe RS is of a word not understood.Composer::newthen fails every frame (two-plane composer not made; showing base plane only), so under Proton the intro video, menus and loading screens are all black while the audio plays.One line in
filter()fixes it:Tested on an RX 6800 XT (RADV, Mesa 26.3.1), proton-cachyos 11.0 and GDK-Proton 11-7: with it, the composer is made and everything renders. I checked every other
#define RSincrates/victory-gpu/srcagainst the parser, and nothing else is missing.AI-assisted (Claude Code). No game files.
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.