Shaders: trace descriptors under the access's EXEC guard, not just its block #177
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by amine23012004 on 2026-11-26T10:26:41Z.
Trace 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.