[pr-fix][shaders][performance] Route 'no wave32 lowering' into the retry ladder; lower the memory floor to 512 MB #98

Closed
CRCODE22 wants to merge 1 commit from CRCODE22/Darner:fix/issue-66-70-wave32-and-memory-floor into main
First-time contributor

Summary

Two fixes for shader translation and performance issues:

Issue #66: CS_TemporalResolve1_Alpha dropped on 32-lane hosts

Problem: Programs in WIDE_SKIP_DEFAULT (like CS_TemporalResolve1_Alpha, hash 34992f2b65a789a5) were refused with
o wave32 lowering for this wave64 program, but the retry ladder in mit_strict never opened for them because
eeds_every_lane() didn't recognise that message. The folded form with ordered LDS (which the test
efused_programs_fold_with_ordered_lds promises) was never tried at runtime.

Fix: Add the message to
eeds_every_lane() in mit/lower/analysis.rs so the ladder opens and the exact forms can be taken.

Issue #70: Freezes up to 7 s while shaders built in play

Problem: The default DARNER_MEMORY_FLOOR_MB of 1024 serialised first-seen pipelines into multi-second freezes on a 32 GB PC (the title commits ~17 GB; the driver's compiler takes several more; free RAM sits near 1 GB in a world load). 140 of 141 compilemem lines said pressured=true; the PC ended with 20 MB free.

Fix: Lower the soft physical floor from 1024 MB to 512 MB. Compiles still go one at a time under it, but the 4096 MB commit floor remains the hard limit that keeps the process from ending in ptxas fatal: Memory allocation failure.

Testing

  • cargo test -p darner-shader --lib lower::analysis — 5 passed
  • cargo test -p darner-gpu --lib memguard — 6 passed
  • cargo test -p darner-gpu --lib compilemem — 13 passed
  • 2 failures in the full shader suite are pre-existing on main (DXIL validation, unrelated)

Fixes #66, Fixes #70

## Summary Two fixes for shader translation and performance issues: ### Issue #66: CS_TemporalResolve1_Alpha dropped on 32-lane hosts **Problem**: Programs in WIDE_SKIP_DEFAULT (like CS_TemporalResolve1_Alpha, hash 34992f2b65a789a5) were refused with o wave32 lowering for this wave64 program, but the retry ladder in mit_strict never opened for them because eeds_every_lane() didn't recognise that message. The folded form with ordered LDS (which the test efused_programs_fold_with_ordered_lds promises) was never tried at runtime. **Fix**: Add the message to eeds_every_lane() in mit/lower/analysis.rs so the ladder opens and the exact forms can be taken. ### Issue #70: Freezes up to 7 s while shaders built in play **Problem**: The default DARNER_MEMORY_FLOOR_MB of 1024 serialised first-seen pipelines into multi-second freezes on a 32 GB PC (the title commits ~17 GB; the driver's compiler takes several more; free RAM sits near 1 GB in a world load). 140 of 141 compilemem lines said pressured=true; the PC ended with 20 MB free. **Fix**: Lower the soft physical floor from 1024 MB to 512 MB. Compiles still go one at a time under it, but the 4096 MB commit floor remains the hard limit that keeps the process from ending in ptxas fatal: Memory allocation failure. ## Testing - cargo test -p darner-shader --lib lower::analysis — 5 passed - cargo test -p darner-gpu --lib memguard — 6 passed - cargo test -p darner-gpu --lib compilemem — 13 passed - 2 failures in the full shader suite are pre-existing on main (DXIL validation, unrelated) ## Related Fixes #66, Fixes #70
#66: CS_TemporalResolve1_Alpha (and other WIDE_SKIP_DEFAULT programs) refused
with 'no wave32 lowering for this wave64 program' never reached the retry
ladder because needs_every_lane did not recognise that message. DARNER_EXACT64
and the other exact forms were never tried for them. Add the message to
needs_every_lane so the ladder opens and the folded form with ordered LDS can
be taken, as the test refused_programs_fold_with_ordered_lds promises.

#70: the default DARNER_MEMORY_FLOOR_MB of 1024 serialised first-seen
pipelines into 7 s freezes on a 32 GB PC (the title commits ~17 GB; the
driver's compiler takes several more; free RAM sits near 1 GB in a world
load). Lower the soft floor to 512 MB: compiles still go one at a time under
it, but the 4096 MB commit floor remains the hard limit that keeps the
process from ending in 'ptxas fatal: Memory allocation failure'.
Owner

Please split this into two PRs, one change each:

  1. The wave32 refusal entering the retry ladder. This changes the translated form of 34992f2b (temporal resolve) on every 32-lane card, so it needs an in-game before/after of the same spot. Glass and alpha surfaces matter most.
  2. The memory floor default (1024 -> 512 MB). That is a default change and needs a like-for-like A/B: same PC, same route, both values.

The PR description also lost its backslash escapes ("o wave32", "eeds_every_lane"); please fix it when you split.

Please split this into two PRs, one change each: 1. The wave32 refusal entering the retry ladder. This changes the translated form of 34992f2b (temporal resolve) on every 32-lane card, so it needs an in-game before/after of the same spot. Glass and alpha surfaces matter most. 2. The memory floor default (1024 -> 512 MB). That is a default change and needs a like-for-like A/B: same PC, same route, both values. The PR description also lost its backslash escapes ("o wave32", "eeds_every_lane"); please fix it when you split.
CRCODE22 closed this pull request 2026-12-03 20:42:10 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!98
No description provided.