From 425a9af7074b2789d1131c967556e7e06fd62204 Mon Sep 17 00:00:00 2001 From: Cesar Rodriguez <11452991+Tamalero@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:57:46 -0700 Subject: [PATCH] test(agc): check eager non-NGG registration with a program no host can prepare The registered-workgroup control registers a non-NGG copy of its fixture in synchronous mode and expected the lane-63 refusal to prove that preparation ran at registration. Since #3546 a wave64 vertex program's lane-63 read builds on a 32-lane host, so the refusal never comes and agc_driver_prepared_shaders_registered_workgroup_sync fails on main on every host narrower than 64 lanes. The control now registers an LDS write followed by s_barrier, which a vertex program cannot build on any host width, so it also runs on 64-lane hosts. Co-Authored-By: Claude Opus 5.5 --- .../tests/execution/PreparedShaders.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp b/core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp index 4aa54af7d863..4d423ac8e979 100644 --- a/core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp @@ -561,8 +561,14 @@ void RegisteredVertexWorkgroup(const ShaderRecompiler::SpirvTarget& target, bool header.specials.vgt_shader_stages_en.value = 0; ExpectFailure([&] { AgcDriverRegisterShader_nid_postfix(&header.shader); }, "missing AGC user-data header"); header.shader.user_data = &header.userData; - if (target.subgroupSize < 64u && std::getenv("APS5_SYNC_SHADER_PREPARE") != nullptr) { - ExpectFailure([&] { AgcDriverRegisterShader_nid_postfix(&header.shader); }, "v_readlane_b32 of lane 63 is outside"); + if (std::getenv("APS5_SYNC_SHADER_PREPARE") != nullptr) { + alignas(256) static constexpr std::array unpreparable{0xd8340000u, 0u, 0xbf8a0000u, 0xbf810000u}; + const auto unpreparableAddress = reinterpret_cast(unpreparable.data()); + header.shader.code = unpreparable.data(); + header.shader.shader_size = sizeof(unpreparable); + header.registers[0].value = static_cast(unpreparableAddress >> 8u); + header.registers[1].value = static_cast(unpreparableAddress >> 40u); + ExpectFailure([&] { AgcDriverRegisterShader_nid_postfix(&header.shader); }, "s_barrier in a vertex program"); } std::cout << "registered NGG preparation deferral passed; subgroup=" << target.subgroupSize << '\n'; return;