Repository navigation
test(shader): cover mesh allocation across a wave64 barrier (SHADER-761) - #4298
jeremygold02 wants to merge 1 commit into
Conversation
Exercise the round scheduler with both waves sending the allocation, and the structured scheduler with only wave 1 sending before wave 0 exports. Both fixtures keep the existing full-frame gradient expectation. Refs: ItsNotRexed#4247, ItsNotRexed#4084
Kam471
left a comment
There was a problem hiding this comment.
Ran the two changed fixtures at 5079b487 on Windows 11, RTX 5070 Ti (32-wide), with run_gpu_tests.py and the branch's own translator/runner:
ms_tri-> 4096/4096 pixels exact, translator 1/1spirv-val.ms_wave_info_s3(withLEONIDA_W64_EMULATE=1) -> 4096/4096 pixels exact, translator 1/1spirv-val.
The added lines exercise the second-wave allocation and the barrier case that the rendering failure needed; both still produce the full picture. No blocking issue.
|
Heads-up from the SHADER-766 review: #4272's \local_index == 0\ guard \ms_counts\ store fails this PR's second-wave fixture. I cherry-picked its commit onto \5079b487\ and ran |
|
Tested fixtures On AMD, the fixtures do not go red on main. All 20 runs (2 fixtures × 2 revisions × 5 configurations) are pixel-exact:
( So AMD's timing hides the both-senders case; the frame alone can't show the fix here. GPU-assisted validation does show the race (
Reading: #4247 removes the cross-wave race on So on AMD, these fixtures are a GPU-AV regression check rather than a pixel one. If they should also fail visibly on AMD, they would need a check that doesn't depend on timing. AI-assisted (Claude Code). Synthetic fixtures only, no game files. |
|
Ran both fixtures on NVIDIA GeForce RTX 4070 (Ada), driver 621.24, Windows 11 (26300), Vulkan SDK 1.4.363.1, llvm-mc 21.1.8, test programs built from Trees: this PR at
The mesh-as-compute runs did take that path ( AI-assisted (Claude Code). |
SHADER-761. Depends on #4247. These two synthetic fixtures cover the visible rendering failure fixed by SHADER-708 and the case where only the second wave sends the allocation. Original coordination claim
What and why
ms_triadds one instruction, an unconditionals_barrierimmediately afterMSG_GS_ALLOC_REQ. Both logical wave64s send the same allocation of three vertices and one primitive. On main, moving this barrier before the send or omitting it produces the expected triangle. Placing it after the send clears the entire frame.ms_wave_info_s3uses the wave ID it already computed. Wave 0 skips the send, wave 1 sends, and both reach the barrier before wave 0 exports the triangle. This exercises structured wave64 emulation. It also gives SHADER-766 a rendering check for a sender outside workgroup invocation zero. Both fixtures use the existing full-frame gradient expectation. The diff changes six lines in two assembly files.Tested
Fixture commit
5079b487340de84bbb44cd66c544469ba65e52d5. Compared mainaa2988cc555bad7ecd508b48a702adbb32fe7c95with #4247 at5f16276d12ea9f2c40f0e29733f10f3507d52057, applying the same fixture inputs to both. Native Windows Vulkan ran on an NVIDIA GeForce RTX 5070, driver 621.01, subgroup 32. CPU was an Intel Core Ultra 7 265K on Windows 11 Home 25H2 build 26200.9974. LLVM assembly and Vulkan 1.2 SPIR-V validation ran in WSL.The 64×64 frames came from the unmodified repository runner and harness. A separate byte comparison checked every RGBA32F component. The count headers came from 16×16 single-workgroup draws with the output header seeded to (2, 2). In a diagnostic build of main, all 128 invocations read packed count
0x1003at the send and zero at the first instruction resumed after the barrier. Restricting the allocation store alone did not restore the both-sender case.On #4247 both fixtures also matched all 4,096 pixels through native MeshEXT, with wave64 emulation enabled and with the default translator settings. Seven synthetic mesh programs validated on each revision. All seven rendered the exact 16×16 frame on #4247, including matched controls for wave 0 only, wave 1 only and both waves sending. The two-wave compute control
cs_w64x_wg128_branchesreturned all eight expected words.With the fixtures applied and the Vulkan test programs built, these commands repeat the two mesh-as-compute comparisons.
The coordinating chat independently compared the same two translator revisions on one local authored mesh program. Both translated modules used the same header-selected wave64 listing and passed validation. The base returned (0, 0) for a meshlet expected to return (126, 80). The unmodified #4247 output matched all 14 allocation headers, all 809 index/cull records and all 1,663 referenced position/UV records under identity transforms. The captured geometry was rendered with a diagnostic camera and three diagnostic pixel shaders. Each 320×96 frame matched the independent source-geometry draw on all 30,720 pixels, including 8,062 covered pixels. This comparison verifies mesh output and diagnostic rendering. The original material pixel shader and runtime bindings remain separate work.
Checklist
GPT-6 Luna checked related claims during the investigation. AI-assisted by GPT-6.2 Astra.