rayquery: collect all header PHIs updated by cur_inst in search_blk #588
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!588
Loading…
Reference in a new issue
No description provided.
Delete branch "nyutt/rayquery-extra-hit-inst-phis"
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?
What it changes
DARNER_HW_RT=1, 14bvh32ray queries across 6RTShadowTrace32*compute shaders fail lifting withbvh32: unrecognized live-out value Value(...) (PHI B<latch>:33 (V(<r>)))and fall back to the miss form (299/315bvh32loops lifted inthe_local_shader_cache_lifts_its_ray_queries).In those opaque
bvh32queries,search_blk(tri_accept_block) writescur_inst(s_node_phi) into a temporary VGPR (v_mov_b32 v_tmp, s_node_phi) that both copies into the primaryhit_inst_phivia a downstream move and remains live inv_tmpup toouter_header.find_updated_header_phireturned on the first header PHI it reached (hit_inst_phi), leavingv_tmp's header PHI unrecognized inclassify_live_outs.This adds
find_all_updated_header_phisand records all header PHIs updated fromleaf.cur_inst_valsinTriHitInfo::extra_hit_inst_phis, soclassify_live_outsbinds them asLiveOutKind::CommittedHitSentinel(withSome(hp)preservinginit_von skipped lanes).How it was tested
61cacf1(based onorigin/mainc8258f9)cargo test --locked --offline -p darner-shader --lib rayquery: 7 passed, 0 failed, 2 ignored (includes new synthetic unit testfind_all_updated_header_phis_collects_both_original_and_copied_header_phis).cargo clippy --locked --offline -p darner-shader --all-targets -- -D warnings: 0 warnings.cargo xtask policy:asset policy: 576 files ok.DARNER_KNOWN_SHADERS=<local> cargo test --release --locked --offline -p darner-shader --lib the_local_shader_cache_lifts_its_ray_queries -- --ignored --nocapture(run on the 8 previously incomplete RT programs before splitting branches, withdxil.dllvalidation): 14/16 previously unliftedbvh32queries now lift and validate cleanly (534b3645dd344ab211/12->12/12,813783478ebb80e610/12->12/12,fb515ca95d694c1834/36->36/36,1250dc0656b3c09133/36->36/36,a41f0b553a07e79d9/12->12/12,ffd9788ba9fec03331/36->34/36;lifted not validating 0).DARNER_HW_RT=1lifting of those 14 previously skippedbvh32queries.darner-shaderclippy +rayqueryunit tests +cargo xtask policy(full workspace clippy/test not run on this revision).dxil.dllvalidator on the local shader cache.61cacf1.Checklist
dxil.dllon the local shader cache; live gameplay test pending.)main.docs/asset-policy.md.Checked for overlap
rayquery.rsfor alpha-tested candidates inbvh32distant shadows; orthogonal to this opaquesearch_blkhit_inst_phifix).Live in-game AB/BA verification on
cam-city60(-Flight InGame, RTX 5070 Ti 16 GB, Ryzen 7 7800X3D, 31 GB RAM, Series X, 1080p->1440p, DLSS Quality, Frame Gen 2x,DARNER_HW_RT=1, both slots preloaded /WARM, 0 slow loads, 0 errors):Order:
M588(c8258f9),P588(61cacf1),P588(61cacf1),M588(c8258f9) — 4/4BENCH OK.ab.py(fast5–65 s, median [spread])M588(c8258f9, 2 runs)P588(61cacf1, 2 runs)fps_medfps_p10p99_msover100_pctdropped_pfvram_peak(MB)ws_peak(MB)Per-run (
fast5–65 s):M588#1: 22.2 fps med, 20.1 p10, 0.2% >100 msP588#1: 20.8 fps med, 13.5 p10, 1.0% >100 ms (one prep spike)P588#2: 24.1 fps med, 21.4 p10, 0.1% >100 msM588#2: 22.6 fps med, 20.7 p10, 0.2% >100 msResult: no performance or stability regression with the 14 additional
bvh32RTShadowTrace32*queries running on hardware RT cores.[pr-fix][shaders][RAYTRACING] rayquery: collect all header PHIs updated by cur_inst in search_blkto rayquery: collect all header PHIs updated by cur_inst in search_blkTest needed — commit
61cacf1f; what to check:DARNER_HW_RT=1, 14bvh32ray queries across 6RTShadowTrace32*compute shaders fail lifting withbvh32: unrecognized live-out value Value(...) (PHI B<latch>:33 (V(<r>)))and fall back to the miss form (299/315bvh32loops lifted inthe_local_shader_cache_lifts_its_ray_queries).In those opaque
bvh32queries,search_blk(tri_accept_block) writescur_inst(s_node_phi) into a temporary VGPR (v_mov_b32 v_tmp, s_node_phi) that both copies into the primaryhit_inst_phivia a downstream move and remains live inv_tmpup toouter_header.find_updated_header_phireturned on the first header PHI it reached (hit_inst_phi), leavingv_tmp's header PHI unrecognized inclassify_live_outs.This adds
find_all_updated_header_phisand records all header PHIs updated fromleaf.cur_inst_valsinTriHitInfo::extra_hit_inst_phis, soclassify_live_outsbinds them asLiveOutKind::CommittedHitSentinel(withSome(hp)preservinginit_von skipped lanes).Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.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.