ambient: the light estimate's passes build under Proton (no isnan, system compiler, root signature apart) #2160
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2160"
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 birdneststream on 2026-11-29T10:02:09Z.
Fixes #2158. Three commits on main, all in
ambient.rs(+hlsl.rs):isnan/isinfintrinsics in the passes' source. Wine's system compiler is fxc, which has neither (E5005: Function "isnan" is not defined), and a shader that fails there never reaches the fallback whole. The two uses are a clamp that amax/minpair does the same.hlsl::system_codecompiles the source as it is (no[RootSignature]check: fxc drops the block with W5302 and the check turned that into a DXC cs_6_0 fallback, which vkd3d-proton refuses withvsir_parse: Failed to parse shader). The signature is built inambient.rs::root_signature()from theRSdefinition. (DXC's-extractrootsignatureblob gives E_INVALIDARG under Wine, hence the builder.)RS(num32BitConstants=N): main'sRSgrew to 14; with a signature made for 13 the RAISE pass read zeros —raise_opt_in_chroma_scrub_…catches it on hardware.What does not change on Windows: the passes are cs_5_x HLSL that fxc compiles on every Windows host too; the signature built from
RSis the one the passes declare.Rig (wine-staging 11.22, RTX 5090, vkd3d-proton master),
ambient::tests: main 10 passed / 4 failed (the_passes_build:Module not found;the_passes_compile:KEEP: … Module not found) → this branch 13 / 2, the two left being WARP-only (neutral_probe_…,raise_opt_in_chroma_scrub_…: "clamp shader must compile on WARP", no WARP DLL under Wine). In play under GE-Proton 11 the passes build and the light estimate acts (VICTORY_AMBIENT=0.8default;0is #1957's fallback), indoors lit for the first time.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-29T10:35:31Z.
Source review of
b727808d94bef8cca492198d5ab5c18655fba235: the separate root signature is a useful direction for Wine, but the neutral pass currently gets the wrong descriptor-table type.ambient.rs:723–748constructs parameters in the order constants, SRV table (ranges[0]), UAV table (ranges[1]), UAV u1, UAV u2.root_signature(..., false)serializes the first two parameters (NumParameters = 2at lines 761–764). That gives the neutral pass at0SRV table, not itsu0UAV table.NEUTRAL_SOURCEat lines 932–935 declares three constants andDescriptorTable(UAV(u0));make_neutralat lines 959–969 selects thatfalsebranch, andneutral_afterat line 996 binds the image as the second parameter. The original main implementation derives the signature directly from this shader.I would keep the five-parameter layout for the screen passes and explicitly select the UAV range as parameter 1 for the two-parameter neutral layout. This is a static binding mismatch, not a reproduced driver failure. It is also outside the coverage of
the_passes_build(lines 1607–1612, which callsmake, notmake_neutral). The existing neutral pixel/bounds readback test starts by requiring WARP, so the reported Wine results do not establish the neutral path. A game-free root-layout check and the existingmake_neutralcolour/bounds readback on a physical adapter, as well as WARP where available, would make a good regression gate after correcting the layout.For context, our two current-main RTX 4060/16 GiB Linux/GE-Proton11-14 startup trials have not reached visible gameplay. Their logs contain no ambient-module creation/failure records, and the requested RT builder stayed inactive with missing host pipelines. I therefore cannot yet corroborate the claimed lighting restoration or attribute our defective opening cinematic to the compiler path in #2158. Please keep the compiler fix and that separate builder-readiness problem distinct.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by birdneststream on 2026-11-29T11:02:35Z.
You were right, and thank you:
root_signature(.., false)serialized the first two parameters — constants and the SRV table — whileNEUTRAL_SOURCE'sRSdeclares constants andDescriptorTable(UAV(u0)). So the neutral pass has been dispatching with an SRV handle where it binds its UAV: a silent no-op, which is why nothing failed here either.Fixed in the branch (
Layout: the neutral pass's one table is theu0UAV range; the screen passes' first table thet0SRV), with a game-free regression gate,the_signatures_lay_out_as_the_passes_declare, that reads the layout back for both signatures (count, parameter types, each table's range type, the constants' count) — it fails on the previous commit and passes now, under Wine on hardware, no WARP needed. The screen passes' build test is green again too (my first cut of the refactor moved the ranges array under the parameters' pointers; caught bythe_passes_build, fixed by building the parameters over the ranges where they lie).Agreed on keeping the builder-readiness problem separate: #2158/#2160 are about the passes compiling at all under Proton, nothing about the RT builder. Your GE-Proton 11-14 trials never reaching gameplay is a different matter — if you open it with the logs, I will read them, but not in this PR.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-29T11:10:05Z.
Thanks for fixing that. I independently rechecked the exact new head
3fe250a8a79c26634ae23cd326a7cb585d6d300a(the previous reviewed head is its direct parent, andhlsl.rsis unchanged in the follow-up).Layout::parametersnow choosesranges[1]for the neutral table andranges[0]for the screen table, with counts 2 and 5 respectively. The owning layout remains alive through the synchronous serialization call. This resolves the specific descriptor-type mismatch I reported at source level.The new game-free test does use the production layout construction and catches the former neutral-table selection. One small coverage suggestion: its
map_or(0, ...)can also yield the SRV range-type value when a range pointer is absent. I would explicitly assert the non-null range and its one descriptor/register, and regard this test as pre-serialization layout coverage, not GPU colour/bounds readback. The existing neutral-output readback still requires WARP. Your reported Wine build/layout results are useful; I have not yet executed the revised head on our RTX 4060.Agreed on scope. Our separate startup observations are in the #2148 discussion, with the independently confirmed Proton compiler-memory measurement issue. The correction to that measurement is being qualified separately. I will keep startup evidence out of this lighting PR.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by birdneststream on 2026-11-29T12:49:27Z.
Taken: the test now asserts each table's range pointer (
expect),NumDescriptorRanges == 1and the range'sNumDescriptors == 1before its type, and its doc says what it is — pre-serialization layout coverage; the neutral pass's colour/bounds readback still needs WARP. Pushed as the branch's head.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.