[pr-tests][shaders] structure: pin the branch on the SCC of a mask compare #432
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!432
Loading…
Reference in a new issue
No description provided.
Delete branch "qnjk/Darner:structure-scc-test"
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
The problem on main: nothing. This is a tests-only change (no production line is edited), so per CONTRIBUTING it needs no A/B result and no gameplay run.
What it pins:
s_cmp_eq_u64ands_cmp_lg_u64compare two lane masks, so their SCC is a per-lane property, not a uniform one — equality sets it where every lane's two bits are equal, inequality where some lane's differ, ands_cbranch_scc1/scc0take the branch where it is set or clear. Every others_cmp_*in the suite compares numbers, so this per-lane SCC and its exclusion from the uniformscc_someset (crates/darner-shader/src/structure.rs:1414the rule, set at:1311-1330, filtered out of the uniform set at:920-925) were only ever reached by a title program. A lane that took the wrong way would run exactly the region the console skips — silently, and in the wrong direction.The new test
structure::tests::a_mask_compare_branch_is_taken_where_the_console_takes_itbuilds the four combinations (eq/lg×scc1/scc0) from hand-written RDNA2 instructions, structures the program, finds thes_cbranch_scc*block, and checks the branch'sLaneExit::Branchcondition: its support is exactly two per-lane atoms (the lanes' own two bits), not a uniform value and not an unknown. It also asserts the two compares write different values so the two masks really differ.How it was tested
1f5dc7c(one commit onf3840d7).cargo test --locked -p darner-shader --lib -- a_mask_compare_branch_is_taken— 1 passed, 0 failed.cargo clippy --locked -p darner-shader --all-targets -- -D warningspasses.cargo clippy --workspace --all-targets --locked -- -D warnings: passes.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passes.cargo test --workspace --locked: not green on this machine, and not because of this change. Three pre-existing failures, each covered by an open pull request:darner-gpustands still in parallel on the test deadlock #224 describes, and serially finishes 1772 passed and 1 failed (pipeline::make::tests::a_capped_draw_waits_once_then_drops, which passes on its own) beside the order-dependent flakes of #150;darner-shaderfailsemit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders, whose fixture #227 fixes — that test fails identically on unmodifiedf3840d7in the same worktree. The new test passes.truefor the 32-lane form); wave64 shapes of the same compare are not exercised by this test.Checklist
main.docs/asset-policy.md. (cargo xtask policy: 555 files ok.)Checked for overlap
crates/darner-shader/src/structure.rs. It is listed so a reviewer can check for a conflict; this change only adds to themod testsblock at the end of the file. No open or closed issue mentions a mask compare,s_cmp_eq_u64,s_cmp_lg_u64or per-lane SCC.