fix(recompiler): check the encoder struct sizes only where they were measured #12250
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12250"
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 B-Howell on 2026-10-28T05:03:08Z.
What
On Linux with GCC 11/libstdc++ lacking
__cpp_lib_atomic_shared_ptr,AtomicSharedPtrhas a different in-memory representation from thestd::atomic<std::shared_ptr>layout used for the existingRecompileResultsize sentinel. The change gates only thatRecompileResult == 552assertion on the feature macro, inside the existing Linux/x86_64/libstdc++ block. All other 29 native-size sentinels and the explicit field-count and encode/decode checks remain active.The cache fixture verifies that the process-local
drawKeyMemois excluded from serialized result bytes and is absent after decode. It also round-trips a non-defaultmeshWindowBufferand verifies that the corresponding request key changes. The wire format remains version 50 with 46 serializedImageResourcefields; the existing 96-byte native-size sentinel remains in place. No cache schema or format bump is made.This update publishes candidate
e450f9a69a94a64097353826562bc46a601a31ca(tree8cff0750750eb9fb373bddf58d64a44f3e7e582f), an ordinary merge of public PR headc39227975df7b075570266202f9ff2dfac32bf49followed by frozen main snapshot0836dfdf4fecb1e0326100c490476e15d3a74da5. The selected PR changes remain limited to the cache test andShaderDiskCache.cpp; the main delta overlaps neither path. The paired qualification below is CPU-only and does not claim Vulkan instance, validation-layer loading, or GPU behavior. The #11551 author agreed to the preferred #11551 → #12250 sequence and discussed reverse composition (comment); this change includes no #11551 commit and makes no combined-v51 claim. #12246 shares only the narrowRecompileResultguard; author coordination is #12250 first, followed by #12246 rebasing and dropping that duplicate line. This is sequencing, not a code prerequisite, soDepends on: noneremains accurate.Tested
Frozen main0836 / candidate e450 focused qualification - 2026-10-31
Windows 11, WinLibs GCC 15.2.0 r7, Release/Ninja,
BUILD_TESTING=ON, cacheb12250a. Frozen main0836dfdf4fecb1e0326100c490476e15d3a74da5and candidatee450f9a69a94a64097353826562bc46a601a31caeach built the existingagc_shader_disk_cache_teststarget with two jobs and passed CTestagc_shader_disk_cacheonce (1/1; child durations 2.81s and 2.74s). Both runs usedANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Their logs contain noVUID-or requested-layer-missing marker. The executable is CPU-only and creates no Vulkan instance; this pair does not prove positive layer loading or GPU behavior. The CTest source-version labels aref25d44b2596fec4ffor main and579d0de06cfff348for the candidate; these are test output labels, not commit IDs. The control executable was not archived separately.Raw build and CTest logs, numeric exits, the candidate executable hash, the final cache hash, and the object-transfer receipt are retained under the private qualification receipt. This is a focused Windows CPU pair only: no Linux result, GPU qualification, hosted-CI result, title/game result, or full-suite claim is made. The earlier de824/c392 results below retain their original pins.
Earlier frozen-main de824 qualification - 2026-10-31 (c392; historical)
Candidate
c39227975df7b075570266202f9ff2dfac32bf49(treeebba59a7ec71ff21b56c6ef1baeb4f9fe19b19f3) is an ordinary merge of the previously prepared candidatebad0e6b2f515b7c3caa552a3f214ad02d400f996followed by the frozen current-main snapshotde824c2919ca65086c6324a1e0388866a7327eea. Main had advanced 26 commits fromc12e7e61; the relevant compiled-source refactor inShaderInfoCollector.cppchanges generatedSourceVersion, so the affected candidate target was rebuilt on each toolchain. The cache format remains 50, with 46 serializedImageResourcefields and the existing 96-byte native-size sentinel.be914c6613250040ffc8a75f84da47723248d4c8) and candidate c392 each configured and builtagc_shader_disk_cache_testsandagc_driver_prepared_shaders_testssuccessfully. Each default cache-fixture run passed once. Eachagc_driver_prepared_shaders_indirectCTest passed once on the RTX 4080 SUPER under the existing GPU lock and pinned Khronos validation environment. Logs show three Khronos instance and three device insertions per arm, no missing requested-layer diagnostic, noVUID-, no skip, and a released lock. The two-Wstringop-overreadwarnings are present in both build logs; they are not candidate-only. An unrelated extern warning also appears in both logs.agc_shader_disk_cache_testsand the default fixture passed once. Its tree is byte-identical to Linux overlay-control commit11359a93130643f3f0194cd776101010ce9359ce; with the same compiler/build settings and 31 initialized submodule pins, this one execution serves both source roles, not two independent runs. The generatedSourceVersionis0xe3df2eaa97cb77be.drawKeyMemoomission ormeshWindowBufferequality/key-sensitivity fixture assertions. Thirteen patches mentionmeshWindowBufferserialization already present in de824. The one shared production line is the narrowRecompileResultassertion guard in #12246; agreed coordination is #12250 first, then #12246 rebases and drops that duplicate guard. This is scoped duplicate-behavior evidence, not blanket overlap clearance.Depends on: noneremains the code-dependency declaration.Earlier frozen-main v50 qualification — 2026-10-31 (c12e/bad0; historical)
Candidate
bad0e6b2f515b7c3caa552a3f214ad02d400f996(tree23c9807f5bfe405e5940c831f6a036043c1d6599) is an ordinary two-parent merge: prior public PR headaf8bc35724893cd0a084cafab2d068ce866c26ee, then frozen mainc12e7e61a185261d837b6fb2ff1c92a07a00e5ff. This qualification is bound to that frozen main snapshot, not a later livemaintip.c0c6c1b852297cfd1388c23705c4a12cc87fd017) and the candidate each passed four CPU checks: default fixture mode,--artifact-codec,--resource-plan-codec, andagc_shader_disk_cache_pack_ownership. Each arm also passed oneagc_driver_prepared_shaders_indirectCTest on the RTX 4080 SUPER under the existing GPU lock and pinned Khronos validation setup. Actual instance/device layer insertion was captured; no skip, missing requested-layer message, orVUID-was found. Total: 5/5 checks per arm.agc_shader_disk_cache_testsbuild passed. Default, artifact-codec, resource-plan-codec, and pack-ownership checks each passed once. The Linux guard-overlay control (56e21714287a3904d4e90bc97bc87f0062a9f304) has the identical tree as the candidate, so this was one Linux build and four executions serving both source roles, not two independent runs. Its 31 initialized submodule pins matched the recorded checkout baseline.Recompiler.hppandShaderDiskCache.cppblobs are identical at that recorded head andc12e7e61. The current Linux control applies only the reviewed fixture and single-assertion guard overlays. No new full-tree build of unmodifiedc12e7e61or fresh592-byte measurement is claimed.There were 14 unique local executions across both Windows arms and the single Linux tree. No Linux GPU test, hosted-CI result, title/game result, or blanket overlap/readiness clearance is claimed. The Windows control configure transcript has no numeric exit capture and its standalone build stdout is absent; generated targets and the saved numeric build exit are successful. The full inherited Linux process environment was not snapshotted; exact argv/cwd and explicit mode environment changes are recorded. Historical results below remain tied to their original source pins.
Earlier pinned evidence (unchanged)
The sections below preserve their original source pins and scope. Statements about then-current heads, overlap, approvals, or proposed ordering are historical snapshots, not current status; the current #11551 order agreement is recorded above.
Current integration
881bfa72460361eb2ed747a2ae7ba932d37aea6b(tree0fb4edb9c9423e0c07cdf6657526bd68306b5024), ordinary merge of frozen mainfdd1753204a4732e1011539cc9d3bb69f70b27a6into publishedf2210862935e033d3eed2c5b37f2fbc07e60a6f3:ShaderDiskCache.cppmakes its actual translation-unit build fail at line 90'ssizeof(RecompileResult) == 552assertion. Restored the exact candidate, built the realagc_shader_disk_cache_teststarget with--parallel 2, thenctest --test-dir build -R '^agc_shader_disk_cache$' --repeat until-fail:3 -Vpasses all three runs (1.97 seconds). This directly exercises the affected compiler; no fresh 592-byte measurement or Linux GPU result is inferred.agc_shader_disk_cache_testsandagc_driver_compute_pipeline_outside_gpu_mutex_testson both frozen main and the candidate. Both use the identical memo fixture bytes (488f99a7d60d858e923f1bef4ef1de1122c9bb04cb8f8f2d7fd8201d04166f19); main's original fixture was restored byte-for-byte afterward and its checkout was verified clean.32.0.16.1742, both arms pass two selected CTest cases three times each:ctest --test-dir build -R '^(agc_shader_disk_cache|agc_driver_compute_pipeline_outside_gpu_mutex)$' --repeat until-fail:3 -V, under the existing exclusive GPU lock,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, the existingbuild-runtime/claude-vvlsetup and loader diagnostics. Each arm proves six instance and six device insertions of the Khronos layer, no missing-requested-layer message and zero VUIDs. Both logs retain the same six ancillary AMD implicit-layervkGetDeviceProcAddrdiagnostics. The CPU cache case itself creates no Vulkan device; the companion case compiles and executes actual shaders on the selected NVIDIA GPU. This is fixture coverage, not a title result or runtime GPU fix.A private #9508 cache/guard composition on frozen main
d65bff2679is now tested atc9dbc8d046(tree55b8b322a2601f0ac5f938eec1ac57581e8119f3): Windows/GCC15.2 control and composition each pass three cache runs; Linux/GCC11.4 control fails the actual unguarded 624-byte assertion and composition passes three runs. The identical fixture retains populated-memo omission and adds nondefault heap-field round trips. This is CPU cache/compiler coverage, not GPU/performance validation or a new measurement of the supported Linux ABI size table. Public branches are unchanged. At this historical snapshot, #9508 and #11551 sequencing were unconfirmed. Later, the author of #11551 agreed to the preferred #11551 → #12250 sequence and discussed reverse composition (comment #6519481893). That agreement does not import #11551 into this candidate or make the two tested source pairs equivalent. Other changed/new bot scopes remain pending. Historical approval and maskym's joint-tree report below retain their original pins and limits; no current-head approval or all-comments-complete/readiness claim is made.Earlier integration and tester evidence follows:
Published integration
f2210862935e033d3eed2c5b37f2fbc07e60a6f3(treece9a76a231ea220019510f042af5fcb6616d16c0), based on frozen main319621ba2e578bd053b0baba2877fe70520e0737:agc_shader_disk_cache_testsbuilt on both main and this integration with--parallel 2. Main used the identical seven-line memo fixture overlay, preserving all incoming main tests. The original main test source was restored byte-for-byte afterward.ctest -R '^agc_shader_disk_cache$' --repeat until-fail:3 -Vpassed all three executions withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationand loader diagnostics. Both CPU logs contain no missing-requested-layer message and no VUID. This cache test does not exercise a Vulkan instance/device; no real-device validation or GPU-rendering result is claimed.External tester provenance remains separate: maskym's report applies to old head
572692c05e, main3b979d42a9, and the other PRs listed in that joint tree. Its NVIDIA comparison and shared baseline failure/validation messages are the tester's evidence, not a fresh isolated run of this integration; our acknowledgment retains that qualification.Earlier published-head evidence follows:
BUILD_TESTING=ON:libsstops at the assertion above.libsbuilds andagc_shader_disk_cachepasses 3 of 3 runs.BUILD_TESTING=ON:libsbuilds, andagc_shader_disk_cachepasses 3 of 3 runs onmainand on this change.agc_shader_disk_cachecreates no Vulkan device, and neither machine had the validation layer installed during those historical runs, so no Vulkan validation run was made then.python tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functions0836dfdf4fecb1e0326100c490476e15d3a74da5. The earlier exact-path comparison at de824 covered 1,558 open PR metadata entries and 90 selected file patches. The refreshed source-delta review for this candidate found zero overlapping paths between the PR delta and main0836; no newer global overlap census is implied. The narrow guard line shared with #12246 remains subject to the #12250-first/rebase-and-drop sequence.NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)agc_driver_prepared_shaders_indirectcheck at the previously published c392 source pin, with actual Khronos instance/device insertion. The new e450 qualification is CPU-only and creates no Vulkan instance; it adds no GPU or validation-layer-loading result. Driver and OS build were not captured in the historical run.🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T08:59:43Z.
Review: APPROVED
The compile-time size guard now runs only where its measured libstdc++ layout applies, and still enforces the same sizes for
std::atomic<std::shared_ptr>builds. The added round-trip test verifies that a populated process-local draw-key memo is neither serialized nor restored. The reported GCC 11/Windows runs and all current hosted build/relinker checks pass. No blocking issue found.