Two NVIDIA pipeline fixes: no blending on integer render targets; LDS-flag regions in waves of 32 #36
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/36"
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 Zettrox/ztrx. Originally posted by FrancescoGelosoEterea on 2026-11-25T04:41:37Z.
Hi! This PR has two fixes that make the driver accept pipelines it refuses on NVIDIA today. Both cherry-pick cleanly onto
main(90b529f).1. No blending on integer render targets (missing walls)
The title leaves blending enabled on an integer render target (
R8_UINT) in one world mesh pipeline. D3D12 does not allow that, soCreatePipelineStatefails withE_INVALIDARGand every draw of that pipeline is dropped:host_blend(inpipeline/host.rs) now turns blending off on*_UINT/*_SINTtargets, on both the graphics and the mesh path. The other targets are unchanged.2. A lane-branch region that only raises an LDS flag runs in waves of 32
On a 32-lane host, a console wave64 compute with LDS in a group over 32 threads runs as two host waves. They meet at group barriers on the edges of each lane-branch region. A region that both reads and writes LDS was refused, which keeps the program at
WaveSize(64), and NVIDIA refuses that:That program is
sr_tracing:CS_Tiling_Generate_Opaque, part of the ray-traced lighting.The new
lds_flag_regionaccepts such a region when it can prove the region only raises a flag:ds_read_b32/ds_write_b32at constant addresses, and every write stores the same constant;A read that misses the other half's write then changes nothing the region leaves behind.
VICTORY_LDS_FLAGS=0turns this off.Tested (RTX 5070 Ti, driver 621.24, Windows 11)
cargo test -p victory-shader --lib: 212 passed, including two new tests inwave64_tests.rs; one of them fails withVICTORY_LDS_FLAGS=0.cargo test -p victory-gpu --lib -- pipeline::host: 3 passed.cargo clippy -p victory-shader --all-targets -- -D warningsis clean.translate --validate --pipelines --listonshaders.rpfwithVICTORY_HOST_MAX_WAVE=32, fxceless/victory-forkc96b4f2with and without the LDS-flag change, which is the same code as here): of 25,889 programs, exactly one changes:2cc4c197…goes from refused to created. Nothing is lost, and every other count is the same. This check covers fix 2 only; the blend state of fix 1 is only set when the title creates the pipeline, which the in-game runs cover.Still refused on this card:
02384a60…(CS_DefragHeap_ComputeRelocations) and6b82bc7d…(CS_CollectTriangles_Meshlets). They use LDS atomics and lane reads across halves, which this check does not cover.🤖 Generated with Claude Code
Imported from Zettrox/ztrx. Originally posted by iGoldenNinja on 2026-11-25T05:00:39Z.
Independent RTX 5080 test at
1402bf7, Windows 11 Pro 26200, driver 617.14, 5900X, 32 GB RAM, DXC/validator 1.9.2609.5. WithVICTORY_HOST_MAX_WAVE=32, the same four matched compute inputs all validated. Separate processes on the same binary gave 0/4 host compute PSOs withVICTORY_LDS_FLAGS=0and 1/4 with=1. The only change was2cc4c197ee29e291, which went from an incorrect-parameter refusal to a created PSO. Both focused LDS fixtures and all three selected host pipeline tests passed.The original
f5e50eb2108c425b/ce3f0432a08f1d35mesh PSO refusal also appears in two earlier local title logs on this 5080, NVIDIA base310c6eband NVIDIA PR 6887e7bb18. Those were separate builds without this blend fix. The patched game program was tested through PSO creation, and the live blend fix remains to be verified locally. Method and results. Testing and reporting assisted by OpenAI Codex.Imported from Zettrox/ztrx. Originally posted by ifBars on 2026-11-25T05:59:12Z.
Adding an RTX 3060 Ti 8 GB result here. Both of the pipelines named in this PR were accepted on this card during a live title run.
Setup: Windows 10 22H2 (19045), NVIDIA driver 610.88, 32 GB RAM, Agility SDK 1.620.2. Local build is
mainat90b529fplus #21, #27 and this PR at1402bf7, with #35 excluded. Series X profile;VICTORY_DISPLAY_MODE=1920x1080was set, but the actual presentation surface remained 3840x2160.The runtime log records:
2cc4c197ee29e291: translated, host PSO created, bound by the title, and present in the GPU timing records.f5e50eb2108c425b+ pixelce3f0432a08f1d35: host mesh PSO created successfully. Nohost mesh pipeline refusedmessages appeared in this run.We can now see the world and characters in the opening in-engine cutscene, confirmed both on screen and in native frame captures. There is still missing geometry and broken rendering, and it runs around 1.0-1.2 FPS. Controllable gameplay hasn't been verified yet.
We haven't done a matched-cache on/off comparison for #36, so I can't say how much of the visible improvement comes from these two fixes or confirm the missing-walls result specifically. This does add live pipeline-acceptance evidence for both fixes on the 3060 Ti. The two focused LDS fixtures and integer-target blend-state tests also passed.
Imported from Zettrox/ztrx. Originally posted by yualk on 2026-11-25T06:37:58Z.
Independent no-draw result at
1402bf7b821fc4ca9c28073debed28e8ee65fb0don an RTX 5070 Ti (10de:2c05, 610.88), using Windows SDK 10.0.26100.0 DXIL validation. Both exact stages named in this PR validated. I created one native mesh PSO from both stages together, not separately with stub partners. The translated pixel shader declares its only unsigned color output at slot 2. I explicitly used the reportedR8_UINTin slot 2, kept the two inferred float targets and rest of the owned synthetic stream unchanged, and tested blending off / on / off: success /0x80070057/ success. The stock inferred-format test host also admits the pair with blending off.This isolates the driver-admission effect on the exact shader pair and reported integer format. It does not reproduce the rest of the guest pipeline state, bind any title resources, issue a draw, verify coverage, or measure FPS. No title files or captures are attached. AI-assisted test and write-up.
Imported from Zettrox/ztrx. Originally posted by futurepro62 on 2026-11-25T06:38:50Z.
Full-suite run, to go with iGoldenNinja's RTX 5080 and ifBars' RTX 3060 Ti pipeline checks above. Tested exact head
1402bf7(on its base90b529f).Tested
rust-toolchain.toml), DXC + dxil.dll 1.9.2602.17, debug.cargo test --workspace --locked: 500 passed, 0 failed, 7 ignored (main90b529fon this machine: 496 passed, 0 failed, 7 ignored).cargo clippy --workspace --all-targets --locked -- -D warnings(the CI lint step): passed.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(the CI lint step): passed.integer_targets_do_not_blend,blend_states_without_integer_blending_are_kept,a_branch_that_only_raises_an_lds_flag_runs_in_waves_of_32,a_branch_that_writes_lds_two_different_values_keeps_64_lanes.Not tested
AI use
Imported from Zettrox/ztrx. Originally posted by Bullet18x on 2026-11-25T08:23:55Z.
Tested on an RTX 5090 (driver 621.40), stacked with #68, #69, #35 and #33.
main(E_INVALIDARG) are now created:f5e50eb2108c425b+ pixelce3f0432a08f1d352cc4c197ee29e29102384a60fda6f2d0,2da4beb386509b77,369cbe906ea72764(and6b82bc7d22016cb5, not reached in this run).I tested these as a stack, so I can't say for certain that #36 alone made both fixes, but it's the only PR in the stack that touches pipeline creation and wave layout.
Imported from Zettrox/ztrx. Originally posted by carlosmegino on 2026-11-25T10:54:29Z.
Independent validation of the first commit only (
6615c720c41da5855aa2744c063e56df2617a4d7), on Windows 11 / RTX 5070 Ti / NVIDIA 621.01. The LDS-flag commit was not applied.I added a synthetic mesh-pipeline regression using the existing DXC/mesh test helpers, an integer pixel output and an
R8_UINTattachment. Before the fix, the blend-disabled control creates successfully; enabling blending fails with0x80070057. After this commit, all four combinations ofIndependentBlendEnableandBlendEnablecreate successfully. This exercises the actualmesh_pipelinepath, beyond checking the normalized description.The test is available as a separate, directly reusable commit:
github.com/carlosmegino/ztrx@6f6e2a8242. Its parent is your first commit, with no telemetry, input-helper or shader changes in that branch. The fourpipeline::host::testspassed on that exact branch; DXC and hardware mesh support were present, and no case skipped.The local combined compatibility branch also passed 113 normal GPU tests (1 ignored), 513 all-feature workspace tests (7 ignored), release/diagnostic builds and both CI Clippy configurations. That stack additionally includes #56 and opt-in diagnostics helpers; these are separate from the minimal test branch.
No assets or derived shader fixtures are included. This verifies pipeline acceptance, not rendered output or an FPS improvement; the runtime check is separate. No duplicate source PR has been opened.
Imported from Zettrox/ztrx. Originally posted by carlosmegino on 2026-11-25T11:58:08Z.
Follow-up on the second commit (
1402bf7b821fc4ca9c28073debed28e8ee65fb0d), with two reusable additions:github.com/carlosmegino/ztrx@4ec17b6f21. The synthetic hardware test validates four DXIL variants, runs 192 dispatches and checks a separate output dword for each of the 64 lanes. It covers lower-only/upper-only activity, thresholds around lanes 31/32/33, repeated writes of the same flag, empty/full masks and both scalar paths around the internal read. A negative test keeps wave64 when the internal read is used outside the region. All nine wave64 tests pass on the exact minimal branch, with no hardware/validator skip locally.github.com/carlosmegino/ztrx@4c3d2608aa.VICTORY_LDS_FLAGSaffects lowering but was missing fromshader_cache::build's settings list. A runtime could therefore reuse the opposite mode's cached DXIL. The new regression runs the real build fingerprint in isolated child processes: it fails before the fix (identical keys) and passes after, including stability checks for each mode. All three cache tests pass on the minimal branch. No parent test environment is mutated.This branch starts at your exact original head and contains only those two follow-ups, without our profiling, input helper or #56. Windows 11, RTX 5070 Ti, NVIDIA 621.01, SDK 10.0.26100.0.
The affected real compute emits/validates and now creates a hardware pipeline offline. With
VICTORY_LDS_FLAGS=0in the same executable it validates but fails pipeline creation again. The synthetic flag pipeline likewise failed before the lowering change. These checks do not establish all divergent-loop cases, real dispatch output, lighting correctness or FPS. Full runtime validation remains separate; no proprietary fixtures or raw captures are included.Runtime follow-up (not a stability pass)
The combined local stack (also containing #56 and our opt-in diagnostics helpers) exited with guest breakpoint 0x80000003 after about 759 s. With the same executable and LDS disabled, it also exited with 0x80000003 at the same guest-relative location (about 905 s including crash reporting). The disabled run used a recorded data snapshot after the first failure; these are not matched time-to-crash or FPS comparisons. Rendering remained partial. Both private title reports identify the same unsignaled cross-queue barrier/prestream state. This failure can occur without LDS, but its root cause and any LDS regression remain unresolved. Issue #28 has similar symptoms at a different reported fault location. No raw game reports or captures are uploaded. Final source checks passed (518 all-feature workspace tests, 7 ignored; 114 normal GPU tests, 1 ignored; release/diagnostic builds and both CI Clippy configurations). Do not interpret these tests or PSO acceptance as full runtime validation.
Imported from Zettrox/ztrx. Originally posted by Logan-Gaillard on 2026-11-25T13:12:27Z.
Tested on an RTX 5070 Laptop (8 GB), Windows 11, on top of
90b529fplus a port of upstream's heap mirroring (sync_heaps) and of victory-fork's view guard (both exes have both), release build, same warm pipeline cache.b7c3)ffcb)host mesh pipeline refused … [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]host pipeline refused(compute)So the integer-target blending fix removes the mesh pipeline refusal we had on this card.
Both runs later lost the device (
DEVICE_HUNG, 183 s with the PR, 211 s without) on the same event — one list of 3 689 ms (with) and 3 926 ms (without) with the same 19 compute pipelines bound — which also happens without the PR, so that death is not caused by it. One run each side.Measured on a three-agent test bench; both runs by @1mlesc, reviewed before posting. No game data.
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.