WIP: Commit alpha-tested candidates in the 32-bit walks' lifted queries (distant shadows) #558
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!558
Loading…
Reference in a new issue
No description provided.
Delete branch "Yorivel/Darner:pr/rq-distant-shadow-alpha"
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?
Contributor role (optional)
What it changes
CS_RTDistantShadowTrace32_Tileda1b20bc47e3c9597,…LeakPlug32_Tilede8c962358d862e3f,…TraceTemporalUpsample4X32_Tiled17829ac71aab4e8d,…LeakPlugTemporalUpsample4X32_Tiledafeea48bbb9913ad) are lifted with a candidate callback (DARNER_HW_RT_WHY=1:cb=true, aMaskcommit decision), but their DXIL has noCommitNonOpaqueTriangleHit: eachProceedloop is empty. The flags are 0x10/0x14, withoutFORCE_OPAQUE, so every non-opaque (alpha-tested) candidate is dropped. Alpha-tested casters should have no distant shadow.The 32-bit walk tells box nodes from triangles with
v_cmp_eq_u32 vcc, 4, node & 6before the node test, and runs the triangle path, with the alpha test in it, under!vcc.eval_pre_callback_lane_bithas no rule for that compare, so its default ("active lane guard") binds it to true. The callback's commit condition becomesselect i1 true, i1 false, X, always false, and the clean-up passes then remove the commit. WithDARNER_SHADER_OPT=0the commits are still there behind that false condition, so the clean-up passes are not at fault.The fix:
node_kind_compareevaluates a comparison of a constant with the node pointer's type bits (v_and_b32 …, 6|7, node) for the triangle types 0 to 3 a candidate has. It binds the compare only when all four types agree (here: "box" is false). Every other compare keeps its existing rule.larp's hand-written replacements of these programs commit their alpha test's candidates (https://git.gtahub.st/recklessfish/CNF-Larp,
shaders/replace), which is what pointed here. No code is taken from it.How it was tested
59256a1on mainc8258f9(6883c23the fix;59256a1lists the new test's switch in the shader cache's switch test).DARNER_HW_RTlifts in my runs, taken from my local game files (darner translate --warm) and translated with hardware RT, before and after: the four distant-shadow programs go from 0 commits to 3, 5, 3 and 5. The other 12 programs translate byte-identically.rayquery_tests::the_distant_shadows_commit_their_alpha_tested_candidates, which reads a local copy ofa1b20bc47e3c9597(DARNER_HWRT_DISTANT_SHADOW, never in the repository, like the file's other local-program tests). It checks that all 4 walks are lifted and at least 4 commits are left after the clean-up passes (dxc -dumpbin), and validates withdxil.dll. It fails on main (0 commits) and passes with the change.DARNER_HW_RTlifting of these programs).cargo xtask policyok; gate 1 and gate 2 (--all-features) ok on6883c23. Gate 3 (cargo test --workspace --locked --no-fail-fast) on6883c23: every crate ok exceptdarner-gpu1822 passed / 1 failed,shader_cache::tests::every_switch_of_the_translator_is_in_the_key, which flagged the new test'sDARNER_HWRT_DISTANT_SHADOW;59256a1lists it withDARNER_HWRT_SHADERand that test passes,cargo clippy -p darner-gpu --all-targets --locked -- -D warningsok. (An earlier gate-3 run under load also failed threewatchtests, which pass on main alone and passed in the rerun: not this change.)Checklist
main.docs/asset-policy.md.Checked for overlap
lower.rs; no overlap withrayquery.rs).🤖 Generated with Claude Code
WIP: [pr-fix][shaders][RAYTRACING] Commit alpha-tested candidates in the 32-bit walks' lifted queries (distant shadows)to WIP: Commit alpha-tested candidates in the 32-bit walks' lifted queries (distant shadows)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.