Shaders: trace descriptors under the access's EXEC guard, not just its block #177
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!177
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-177"
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?
@amine23012004 on GitHub · 2026-11-26 10:26 UTC · original
amine23012004:fix/guarded-descriptor-trace→main· +64 −11 · 1 files · 1 commits · openTrace descriptors under the access's EXEC guard, not just its block
Problem.
resource::Tracer::descriptor()andTracer::live()only addlanes.reach[b]to the known facts when they trace a descriptor (or walk phis back through joins) for an access. When the access sits in a join block under an EXEC guard — lanes that failed av_cmpcleared EXEC and jumped to the join withs_cbranch_execz— those lanes reach the block but never run the access. The dead edge still counts, so a descriptor that is only built on the live arm (e.g. an immediate samplers[8:11] = 0) can't be resolved andtrack()returnsUnsupported: the shader is dropped.Fix.
Tracer::atholds the instruction site(block, inst)instead of the block;descriptor()andlive()also pushlanes.guards[b][i](when present) next toreach[b]. One file,crates/victory-shader/src/resource.rs.Test.
resource::tests::a_guarded_access_excludes_dead_lane_edges_at_a_join— a guardedimage_sample_lzin a join whose sampler is only written on the live arm.track()→Unsupported)victory-shadersuite 210 passed, 0 failed, 2 ignored;cargo clippy -p victory-shader --all-targets -- -D warningsclean.Credit / origin. Ported from codec_d's
cool_foxtree (commitf4b48ad, GPL-3.0, itself forked from this repo at0a43566), where it recoveredCS_AlphTransmissionPrefilterMipand removed black squares / broken blending on transmissive and eye shaders. Only the guard part is taken; thev_readlanerestore changes from the same tree (which needemit/lower.rschanges) are left out. Not checked in-game on AMD by me — the shader-side analysis is vendor-neutral.🤖 Generated with Claude Code
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.