build(shader): update SPIRV-Tools for float-control optimization #26766
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26766"
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 JJenkx on 2026-11-24T20:32:04Z.
What
Draft: native Squirrel qualification remains unresolved. The latest private revision
40ed7859f874integrates this head onto main6329c2edc837and retains default DCE calls 1/3/6 while preserving every full-mode call. Full SDK and focused 84 CPU / 112 GPU / one-skip qualification pass. Its new native comparison stops after ABB: main closes normally at 273.8s; candidate B1 also closes normally at 273.8s with matching title-menu/Play captures, but the same frozen candidate B2 exits 139 at 150.9s after Unreal reports a 120-second RenderThread wait and guest abort. Preservation checks pass, no native process remains, and A2 did not run. Both successful traces are loss-free; B2 ends before captures/completed trace. The first success is not repeatable, and aggregate compilation counters do not show a speedup. Public source is unchanged. Current and historical controlled evidence.Bundled SPIRV-Tools skips aggressive dead-code and local-memory optimization for
SPV_KHR_float_controlsmodules. Update it to301185eb837848d4ae16dd88b9bddde1050b60d0, including upstream #7017, and update SPIRV-Headers to its dependency pin6efe5ae6b7c6ad29da3f2cc3f164b9c3d72b78b1.Keep unused global push constants and their dependencies when interface preservation is requested. Before SPIR-V 1.4 these globals cannot appear in
OpEntryPoint, while prepared binding layouts still require the interface after specialization. Dead arithmetic remains eligible for elimination and shader target versions stay unchanged.Adapt the configure-time compatibility checks to the new sources, retaining the copy-free redundancy traversal and validator table lifetime fix. Keep the newly needed
unordered_setinclude and check upstream literal-parser initialization in place of the obsolete local parser replacement. Existing source-version hashing invalidates shader caches through the changed pins/script; disk format versions stay unchanged. System-dependency libraries need equivalent interface preservation, as recorded in shader debt.Make affected fixtures supply valid observable output buffers, check final atomic bindings against their BDA ABI while retaining actual atomic-write checks, and recognize scalarized stored depth-query results. Existing numerical, refusal and certificate assertions are retained.
Overlap review found complementary changes to the shader-memory test inspector in #7085 and #22724: those follow
OpSelectdepth results, while this change recognizes scalar depth values stored after optimization. Whichever lands second must preserve both inspection paths. Other shared-file conflicts were reviewed from the exact PR-head patches. The latest bot report lists the same 33 unavailable comparisons; all 33 current heads were rechecked unchanged. Exact-head manual review and revalidation (SHA-256990a9d99cc61b2e493ebf88cafdc802a628e687dbb5205c5f50ef8656bae7904; anonymous download and all 37 payload hashes verified).Tested
Reviewed Linux validation archive (236,870 bytes; SHA-256
be6c87ab93404febad250cca29d84c7548f8db0a7fe6976a09fa84bd617068b8). Its 466 files include test receipts/logs, manifests and the publication source patch. An anonymous download matched the archive and all payload hashes.Linux Release builds: baseline
aae1ec14243ada09434e85cd329e7d1edd718fab; tested candidate1f9651a78f914f8ba071f6899e2ea93e500ca591. Publication headc4d3d69a3e9dfc282bb9c8fb032c73c523d76517changes only debt wording from that candidate; production and test code are unchanged. A static merge preview against upstream61cce6e86b9bbafa91551f7eb46af8f94f00bcc4is conflict-free; tests below remain scoped to the named frozen snapshots. Both full SDKs, relinker, replay tool and 93 selected build targets build. 77 CPU CTest cases pass on each arm with no failures or skips. Three additional baseline controls using the identical corrected shader-memory/branch fixtures also pass, retaining all original CTest properties.On AMD Radeon RX 6650 XT / RADV 26.3.1 / Arch Linux 7.3.5-arch1-1 / GCC 16.2.1, each arm completes the 112-case physical GPU selection: 111 pass and one skips. Successful cases select the actual RX 6650 XT, show Khronos layer insertion, bypass shader caches and report zero VUIDs. Validation layer 1.4.363 is newer than headers 335.
agc_driver_float16_unused_nan_payloadsskips identically because native f16 conversions with RTE rounding and preserved denormals are unavailable; that capability remains unverified. A separate final-baseline GPU control using the exact corrected F32 denormal fixture also passes its unchanged module-size, declaration and numerical assertions.The push-interface regression covers SPIR-V 1.1/1.3/1.4/1.6 with specialization enabled/disabled and default/full/none optimizer modes. It verifies the push variable, block type, member offset and target version while checking dead arithmetic still disappears when optimization is enabled. Earlier baseline controls reproduce the pre-existing unused-interface loss.
Eight CPU-only replays and validations of two retained Octopath requests pass on the final builds, covering direct emission and prepared materialization with explicit
--robust2 --f16-host-nans. Direct/materialized bytes match per arm; all final module bytes also match the previously reviewed modules, retaining their declared-interface, float-mode and push-block graph comparison by exact byte identity.These are static module-size results; runtime equivalence and FPS improvement are unverified. Raw requests, SPIR-V and replay logs remain private.
A separate bounded candidate run of Octopath Traveler II (PPSA09809) reaches Castti's first-story ship deck. Reviewed native GPU frames verify traveler selection, opening dock/boat dialogue, the controls tutorial, gameplay HUD/minimap, and player movement with the camera following. It exits normally with code 0 after the planned window close at 600.8 seconds (602.8 seconds total). The actual mapped AGC hash matches the frozen final SDK; the private overlay unmounts normally, no native process remains, and the SDK, assets, normalized inputs, settings-only save seed and kernel setting remain unchanged. Native telemetry reports 4,128 shader compilations, zero shader failures and no missing functions or unsupported shaders in this run. Reviewed native coverage summary (SHA-256
6968e7a1cf3d206fa69f6296cfe2b02e8035536bb977e12706dad95466257b76; anonymously download-verified). Raw images and game data remain private. This covers short opening gameplay; audio, NPC/path-action interaction and full-game correctness remain unverified. Windows and installed system-dependency libraries were not tested by the author.Contributor-reported focused Windows comparison: 1tsethan’s report uses a common
403fbe6fc1source snapshot with the old/new Khronos dependencies and this PR’s code/test delta. Five optimizer/control-flow CPU cases pass on both builds. The same corrected F32-denormal fixture also passes on both, using GeForce RTX 3070 Ti, Windows 11 build 26200 and driver 32.0.16.2101; it reports 5,472 probes without an emulation difference. This is independent functional coverage of that subset, separate from the author’s Linux qualification above.Additional contributor-reported Windows comparison: hamdanpor-ctrl compared main
a40a1399b5plus the same #19899 MinGW build fix on both arms, with this PR’s dependency pins and six-file code/test delta on the candidate. RTX 3050 Laptop/driver 617.42, Windows 11 Pro 26300, WinLibs GCC 15.2 Release, required physical Vulkan, cache-off and validation layer 1.4.363.0 were used. Both broad runs report 2,109 passes, the same two failures and 26 skips, zero VUID lines and the same 65 validation messages. All 22 focused optimizer, SPIR-V, shader-memory and F32-denormal cases pass in three further repeats. This is a contributor’s comparison of the PR delta on a common newer main, rather than an author-run exact-head Windows qualification.Additional contributor-reported Pascal coverage: zedekvdb’s report compares common main
7f99fbd60dwith the old/new dependency pins and this PR’s other changes on Windows 11 Pro 26300, WinLibs GCC 15.2 Release and Quadro P3200 / driver 582.42. Two runs per arm pass F32-denormal flush, both shader-memory modes and SPIR-V branch targets, with required Vulkan, cache-off, selected physical GPU, reported layer insertion and zero VUIDs. Both device probes report hardware F32 flushing with zero differences across 5,472 probes. The optimizer target was unavailable in that configuration. The report names device Vulkan API 1.4.312 but does not state the validation-layer version, so it does not establish the repository’s layer-version requirement. These results remain contributor-reported functional coverage of the named subset.Additional paired Linux refresh (2026-11-25): plain main
4b70bf120169dac93e1499ad3b91f6a5f0462c9band private clean integrationa061d23e32d773395c72ad060e612d8b9fd486caof this published PR. Both full SDK banks, relinker, shader replay and 93 selected build targets build in Release/GCC 16.2.1. Each arm passes 77 CPU and 111 physical RX 6650 XT GPU cases, with the same singleagc_driver_float16_unused_nan_payloadscapability skip, zero VUIDs and no missing-layer warning. GPU cases require Vulkan, bypass disk shader caches, select the actual RX 6650 XT and show Khronos 1.4.363 insertion (headers 335). The final review compares the actual recorded CTest commands/properties and all 189 outcomes; source, test binaries and providers remain unchanged. Receipts, verbose logs, JUnit, manifests and exact integration patch — SHA-25646543427a23e629c63e9e5de73b9b8363ce89db965e51807c8232592bac19554; anonymous download and all 813 payload hashes verified. The published branch is unchanged. This archive establishes focused functional coverage; the completed Art of Rally comparison below does not demonstrate an FPS benefit.Completed controlled Art of Rally ABBA comparison on the same main
4b70bf120169/ private integrationa061d23e32d7: both full SDKs exit normally, and all four 30-second traces are complete with preservation checks passing. At 3840×2160 on the RX 6650 XT, combined throughput is 46.14 presents/s on main and 46.13 on the candidate; candidate runs span 45.23–47.03 presents/s. This sample demonstrates no FPS benefit. The same initialized Indonesia stage, input rows and runtime settings were verified; native frames show controlled initial-straight traversal at 4–5 mph, with minor position differences and varying copy/staging traffic. Two repeats per build do not establish a speedup, regression, general racing performance, loading-time improvement or full-game equivalence. Four digests and reviewed aggregate evidence — SHA-2561f478e23e18a9d87ac2dc473ab5c5a1908ef96feae9ec9c020c19c69a9c6d991; anonymous download and all 22 payload hashes verified. Game/save data, raw captures and traces remain private.Checklist
main; no other open PR implements the same functionsNotImplemented_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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T06:59:25Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change based on the inspected diff; no tests were run independently.
What I ran
Reviewed head
c4d3d69a3e9dfc282bb9c8fb032c73c523d76517using the prepared diff and reader. No commands or tests were run. The description reports Linux and contributor-reported Windows validation; those results were not independently verified.Results
Findings
Blocking
None identified in the inspected diff.
Non-blocking
None.
Not verified
The complete changed-file set was not read. In particular,
ShaderMemory.cppwas excluded from the review bundle for size, and both submodule contents were unavailable as plain text.SpirvBranchTargets.cppandF32DenormalFlush.cppwere only partially read. I could not confirm the implementation behavior in those omitted portions or independently reproduce the reported build, CPU, GPU, or replay results.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T21:18:16Z.
Review: COMMENTED
The public branch has a merge conflict in
ShaderMemory.cpp, and the PR records a native candidate run that aborts after a RenderThread timeout. Could the next qualification use a public commit with the optimization settings and submodule pins from the successful and failing runs? The current notes distinguish the private experiment and public head, so the existing results cannot qualify the public merge.Source review at
c4d3d69a3e. Trial merge used192c4e45a0.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.