tombox-xshader: keep amplification DispatchMesh Z at 1 (args dword 2 is the payload pointer) #315
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/315"
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 omonkeyz/xbox-emulator. Originally posted by enderrr9 on 2026-11-23T17:57:49Z.
Builds on #313. The first commit here is #313's test harness. The new change is the second commit (
fbb7dd9).Bug
The console AS writes its mesh-args entry as
{X, 0, payload VA >> 4 high, payload VA >> 4 low}(fixture as3; see the BLOCKERS.md #115 CHECKED line).df91928(#136) made the translated AS callDispatchMesh(tb_args[0], max(tb_args[1], 1u), max(tb_args[2], 1u), tb_pl), so it reads dword 2 as Z.In the translator's ring address space the payload VA is
0x20_xxxx_xxxx, so dword 2 is2. Every amplification group therefore launched each of its mesh groups twice. The pixels don't change, because the duplicate groups draw the same primitives, so no existing test saw it.Fix
DispatchMesh(tb_args[0], max(tb_args[1], 1u), 1u, tb_pl):Test
render_pair()now also returns an occlusion-query sample count.gpu_synthetic_amplification_args_entry_with_the_payload_pointer_launches_each_mesh_group_once. The synthetic AS stores the console-shaped entry with oneglobal_store_dwordx4. Two AS groups launch 1 and 2 mesh groups, each drawing one pixel, so the test expects 3 samples. Before the fix: 6. After: 3.tests/amp.rs/tests/synthetic.rsare updated. The synthetic test is renamed toamplification_dispatch_uses_the_y_group_count_and_not_the_payload_pointer. The BLOCKERS.md #115 line now describes the current behaviour.cargo test -p tombox-xshader --locked --test amp --test synthetic --test mesh: all pass on WARP. The fixture tests stay ignored here.pr_gate.py: 4 files, 0 problems.Not covered
How the console compiler encodes Y/Z > 1 in the entry is still unverified, because no console AS seen so far calls a 2D/3D DispatchMesh. If someone has such a fixture,
gpu_console_amplification_...could also assert the sample count.🤖 Generated with Claude Code
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:49:26Z.
Applied on main in
c1ee4bf(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed