Shaders: the console's waterfall loop over a first-lane table offset

The console compiler loops over a per-lane descriptor by reading the
first active lane's table offset (v_readfirstlane_b32), narrowing EXEC
to the lanes with the same one (v_cmpx_eq_u32), loading that entry
(s_load_dwordx8) and dropping those lanes (s_andn2_wrexec). Such a load
now goes through the waterfall proof; when it holds, each lane loads its
own entry through a non-uniform handle. Unproven, the offset stays the
first lane's, as before.

Translation census over the title's 26,096 programs: none lost, 108 get
past these loops to a later refusal. The 249 programs behind #736 also
need per-lane size queries in loops without an access.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MarvisandClaude Opus 5.5 committed 2026-11-24 10:53:38 +01:00
1 parent 2f899cb543
commit 45c6e80601
3 files changed
+112 -2

No files matched your search

@@ -220,6 +220,19 @@ fn lanes_load_from_the_buffer_their_nested_arms_chose() {
}
}
#[test]
fn lanes_sample_the_entry_their_offset_names_in_the_console_waterfall() {
use crate::resource::tests::WATERFALL_INDEXED_WAVE32;
let shader = build(WATERFALL_INDEXED_WAVE32, false);
let results = sampled(&shader);
assert!(!results.is_empty());
for (label, red) in results {
// Even lanes hold entry 0's offset, odd lanes entry 1's.
let want: Vec<f32> = (0..32).map(|l| [1.0, 2.0][l & 1]).collect();
assert_eq!(red, want, "{label}");
}
}
#[test]
fn lanes_sample_their_own_texture_in_a_waterfall_narrowed_by_v_cmpx() {
use crate::resource::tests::cmpx_waterfall;