Repository navigation
Conversation
e741dfc to
664d738
Compare
664d738 to
fd2cadf
Compare
fd2cadf to
1e5b298
Compare
|
Review (head 1e5b298, diff read, not a merge-check;
Fine: in the split form a wave past the declared threads now gets an empty EXEC instead of wrapping to all lanes, and the other forms ballot AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
No open or merged PR makes the same change: AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Keep v5 ranges disjoint across every launched wave, including programs whose output extents exceed declared threads. Add CPU tests for the output-extent and wave-rounding cases. Checked: xcl-dev#3350 review 7306364917, xcl-dev#3327 interaction, REPO-TRACKER.md and search-two-pass-lanes.md.
|
@Foniass Thanks for the careful review. In d22887e, v5's group stride now uses the same whole-wave launch extent as the two-pass launch. The stride stays broad: guest code can widen EXEC after entry, so lanes beyond the declared thread count may still execute and need a disjoint v5 range; we don't have a complete proof that a program never widens EXEC. The tests cover output extents larger than the declared thread count (including the group-1 boundary that previously aliased slots 126–127) and rounding a 65-thread group to full waves for both wave sizes. The focused tests passed. The completed workspace suite set The smoke pair for this head is still pending. AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
|
Follow-up review (head d22887e, since 1e5b298, diff read, not a merge-check):
New:
Fine: the stride and the launch now agree on both backends; EXEC at entry still covers only the declared threads; a group whose launch equals its threads keeps the constant EXEC and the old stride; the smoke blocks name the current head. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
Launch enough whole console waves to cover max(threads, max_vertices, max_primitives), keep EXEC at entry limited to the declared threads, and use the launched width as v5's per-group step in both backends. Compute programs are unchanged. Update mesh shader surveys and barrier fixtures to use the launched width. Add CPU coverage for output extents and wave rounding, plus a two-group GPU draw that checks the v5 step and matching records and pixels from HLSL and direct DXIL. Checked: xcl-dev#3350 review 7325409956, xcl-dev#3011 C54, and xcl-dev#3327 interaction.
d22887e to
a3f07fa
Compare
|
Follow-up review (head a3f07fa, since d22887e, diff read, not a merge-check; checks red):
New:
Fine: stride and launch agree on both backends, EXEC at entry is still the declared threads, and the runtime code in AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
@Foniass thanks for the review. Fixed in one commit, The CPU tests cover output extents and wave rounding. AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
Launch enough whole console waves to cover max(threads, max_vertices, max_primitives), keep EXEC at entry limited to the declared threads, and use the launched width as v5's per-group step in both backends. Compute programs are unchanged. Update mesh shader surveys and barrier fixtures to use the launched width. Add CPU coverage for output extents and wave rounding, plus a two-group GPU draw that checks the v5 step and matching records and pixels from HLSL and direct DXIL. Checked: xcl-dev#3350 review 7325409956, xcl-dev#3011 C54, and xcl-dev#3327 interaction.
a3f07fa to
572f7ea
Compare
|
Correction: On the RTX 3090, both focused mesh filters pass (stride 2/2; two-pass 1/1). The workspace suite is 2,880 passed, 6 failed, 51 ignored, with the same six failures as main. A smoke pair for AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
|
Follow-up review (head 572f7ea, since a3f07fa, diff read, not a merge-check; checks red):
New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
merge-check
|
|
@KDenKC merge-check above: the code and tests check out here, but the PR has no |
|
@fromthemoonx thanks for the merge-check. The AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
bmjask
left a comment
There was a problem hiding this comment.
Review of 572f7eab: 3 finding(s). 2 are inline. These are on lines outside the diff:
crates/xcl/src/gpu/recomp/emit.rs:1372: Not certain about this one: the newly launched waves (EXEC=0 at entry) now run the whole program, including GS_ALLOC_REQ's unconditional if (lane_id == 0u) res.Store(xcl_rec...). For threads=64, max_vertices=128 on wave64, wave 1 has no active lanes and computes M0 from wave-dependent or uninitialized state, then races wave 0 to store the record's vertex/primitive header. A wrong nv/np makes the pass-through drop or garble triangles. The Direct DXIL lowering has the same exposure, and the HLSL mesh entry has no if ((exec_lo|exec_hi)==0u) return; like the compute path.
These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.
| sgpr.insert(3, s3); | ||
| sgpr.insert(VAR_SCC, zero); | ||
| let (lo, hi) = entry_exec(lw, ms.threads, tid); | ||
| let (lo, hi) = mesh_entry_exec(lw, ms.threads, launched, tid); |
There was a problem hiding this comment.
Not certain about this one, because it depends on unverified hardware behaviour: the entry EXEC is still limited to the declared ms.threads. On the console a group launched with launch_threads lanes probably starts with EXEC covering every launched lane, with the guest compiler guarding API threads itself. If so, a mesh program declaring 32 threads with max_vertices=64 that exports from lanes 32..63 without its own s_mov_b64 exec, -1 still starts those lanes inactive in both backends (here and emit.rs:5401 xcl_slot < threads). The vertex exports are dropped, which is the #3011 symptom. The PR says it didn't check whether retail programs widen EXEC, and the only positive test widens it explicitly.
| /// The console's v5 per group: each group gets a disjoint range covering every launched | ||
| /// lane. Output extents can exceed declared threads, and guest code can widen EXEC later, | ||
| /// so this applies to every program, not only ones whose translation proves EXEC widening. | ||
| pub fn group_stride(&self, wave64: bool) -> u32 { |
There was a problem hiding this comment.
Not certain about this one, because it depends on unverified hardware behaviour: group_stride changes v5's per-group step from the declared threads to the rounded launch width for every mesh program where they differ, including ones that worked before. A wave64 program with threads=64, max_vertices=128 that decodes its group as v5 >> 6 used to see group 1 at v5=64, but now sees v5=128 and decodes it as group 2, reading the wrong per-group data. A 32-thread wave64 program now steps by 64 instead of 32. The test fixture decodes v5 >> 7, which matches the new assumption by construction, so it doesn't confirm the console behaves this way.
The two-pass mesh path launched only the declared thread count. A wave64 mesh program declaring 32 threads therefore had no lanes 32–63, even when its output extents required them; exports from those lanes were lost.
Both the direct-DXIL and HLSL paths now launch whole console waves covering
max(threads, max_vertices, max_primitives). The entry EXEC remains limited to the declared threads. The v5 group-index step uses that rounded launch width for every mesh program, including programs that do not widen EXEC (32 threads/32 outputs on wave64 now use a step of 64).Related: #3011 (C54, lost triangles), #3484 (main's failing stand-in test). This touches the HLSL mesh entry also changed by #3327; the integration branch keeps the two-pass entry's whole-wave launch and the native branch's separate entry.
What is in it
gpu/recomp/mod.rsdefines the whole-wave launch width and group stride;gpu/dxil/kernel.rsandgpu/recomp/emit.rsuse them in direct-DXIL and HLSL translations.gpu/recomp/tests.rs: CPU tests cover output extents and wave rounding.gpu_mesh_mode_two_passesdraws two groups and checks the second group's v5 step, records, and pixels through both HLSL and direct DXIL.gpu/dxil/robustness_tests.rs: the existing multi-wave barrier survey now uses the launched width.Tested
XCL_NETWORK=0.cargo test -p xcl --lib -- mesh_group_stride --nocapture --test-threads=1on final head572f7eab03e0558a64820d1b5621602825065949: 2 passed, 0 failed, 0 ignored.cargo test -p xcl --lib -- gpu_mesh_mode_two_passes --nocapture --test-threads=1on final head: 1 passed, 0 failed, 0 ignored.cargo build --workspaceandcargo test -p xcl --lib --no-runpassed. Both focused filters passed on the default path and withXCL_DIRECT_DXIL=1(stride 2/2; two-pass 1/1).XCL_NETWORK=0: 2,880 passed, 6 failed, 51 ignored; 0 binaries without a result. The six failures weregpu_direct_image_get_resinfo_d16,placed_title_textures_share_vram_and_preserve_pixels, the threestream_recheck_*tests, andtest_title_runs_and_game_folder_is_untouched. They are the same six reported by the main 9dfbe3e suite.placed_title_textures_share_vram_and_preserve_pixelsalso passed alone on main (1/1), so its suite failure is order/concurrency-dependent.Regression run
The previous head
d22887echad a 600-second RTX 5090 smoke pair against main9dfbe3ea; both reached the world with zero removals and zero crashes (main: 1,872 frames; previous head: 1,955). Both used a copied cache seed, the same accepted-terms profile, and held Enter. The updated head572f7eabstill needs its own smoke pair; the previous-head blocks below are retained only as history and are not evidence for this head.Previous head
d22887eca6664f2e94817cb42a50a0d6a88446ec:Main
9dfbe3ea:Previous head
d22887ec:Not tested
AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR