test(agc): check eager non-NGG registration with a program no host can prepare #4142
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4142"
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 boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T23:58:06Z.
What
agc_driver_prepared_shaders_registered_workgroup_syncfails onmain(bca7a29d) on 32-lane hosts withexpected preparation failure. It is also reported in the bodies of #4085 (RTX 4060, lavapipe) and #4120.Cause: two merges landed ten minutes apart. #2261's control registers a non-NGG copy of the registered-workgroup fixture in synchronous mode. It expected the lane-63 refusal (
v_readlane_b32 of lane 63 is outside) as proof that registration prepared the program eagerly. #3546 then made a wave64 vertex program's lane-63 read build on a 32-lane host, so the refusal no longer comes and nothing else throws.Fix (test only): the control registers a program that a vertex stage cannot build on any host width: the fixture's own
ds_write_b32followed bys_barrier, whichEmitBarrierrefuses (s_barrier in a vertex program that accesses LDS or GDS or writes memory is not implemented,SpirvFlowEmitter.cpp). The rest of the test is unchanged. The subgroup gate (subgroupSize < 64) is no longer needed, so the control now also runs on 64-lane hosts.Tested
CachyOS (Linux 7.2), GCC, Release, RTX 4090 (NVIDIA 615.78, 32-lane subgroups), on
mainbca7a29d.agc_driver_prepared_shaders*: 9/9 pass. Onmainwithout this change, 8/9:_registered_workgroup_syncfails as above.ShaderRegistry.cppmutated and restored byte for byte afterwards:if (false)at the registration-deferral line):_registered_workgroupand_syncboth fail (missing AGC user-data header).true): both fail (expected preparation failure).tools/check_conventions.py --base origin/mainandgit diff --check origin/mainpass.Not tested: Windows, lavapipe, a 64-lane host. The control has no subgroup or mesh-shading gate, and the program it registers is refused before any mesh path is involved.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T00:37:10Z.
The replacement control does not depend on host width, unlike the lane-63
v_readlane_b32refusal it replaces, and the message it keys on is already relied on elsewhere (SpirvFlowEmitter.cpp"s_barrier in a vertex program that accesses LDS or GDS or writes memory is not implemented", matched bytests/VertexBarrier.cpp:46), so the expectation is not a new coupling.What I checked in the tree:
{0xc8, address >> 8}/{0xc9, address >> 40}; the control writes both from the same address asshader.code/shader_size, so the registers and the code field name the same 4-word program the driver walks.0xd8340000+ a second word,0xbf8a0000(s_barrier),0xbf810000(s_endpgm) is ads_write_b32followed by a barrier, which is the "writes memory" case, not merely "has a barrier".alignas(256)on the new array is load-bearing, not stylistic — the driver rejects a misaligned code pointer, so dropping it would change what's being tested.The
subgroupSize < 64gate had been skipping the expectation entirely; the diff removes it, so the control also runs on 64-lane hosts, a case the body lists as not run.One dependency worth naming for anyone touching this test later: the control relies on
header.specials.vgt_shader_stages_en.value = 0from the line just above it. With NGG routing (the field's original value) the same program would be deferred at registration instead of refused immediately, and the expectation would need to change to match.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T07:36:26Z.
Closing: #4177 fixed
agc_driver_prepared_shaders_registered_workgroup_syncon main; the fixture now reads lane 63 of the vertex index, which still throws after #3546. Please reopen if it fails for you on current main.Pull request closed