test(shader): cover stage-specific float modes and legacy captures #1442
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1442"
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 ToyuAU on 2026-10-08T06:42:42Z.
What
Replace the obsolete float-mode carry implementation with regression coverage for the implementation now on main through #1816. Preserve main's registered-header mode source, prepared-artifact keys, field layout and version-13 capture format.
Extract the existing stage-specific decoder into ShaderFloatMode.hpp and have RegisteredFloatMode call it. The register kind explicitly selects FP16_OVFL at bit 26 for CS, 29 for PS, 31 for GS and 30 for HS, matching the already merged #1816 implementation and its Mesa gfx10.json/gfx103.json register sources. Invalid register kinds throw. Add the decoder to the shader-cache reviewed call list.
Add the portable agc_shader_float_mode target. It covers all four RSRC1 layouts, unrelated bits, unknown versus explicit-zero modes, all eleven control fields across eight shader stages, cache/source-memo/prepared-interface identities, round trips and invalid capture rejection. Genuine version-12 and version-13 fixtures are generated using unchanged serializers from
04477932andf1451396, respectively. Version 12 remains unknown; version 13 preserves its recorded mode and other versioned fields.This change does not reintroduce a second float-mode type, a second serialization bump, live queue-register overrides, or new instruction semantics. Linked-stage mode semantics and run-time RSRC1 changes remain separate work.
Tested
macOS arm64, AppleClang 17, C++20:
interfacemacro collision in a local test variable. The variable is renamed; the portable harness also passes with-Dinterface=struct, warnings-as-errors and sanitizers. Full Windows CI passed on the prior head 5c8ada88; fresh Linux/Windows CI is pending after the rebase.Historical GitHub Actions Build run 37873090443 passed on the prior head 5c8ada88: full Linux/Windows builds, patched libs and CTest. The new agc_shader_float_mode test passes on both platforms. Windows: 489 registered tests, 286 passed and 203 skipped. Linux: 498 registered tests, 473 passed and 25 skipped; GPU execution uses the CI software Vulkan driver.
Rebased onto main
6cc0503dat head6e7e99cc. The TechnicalDebt.md conflict retains main's updated f32/f16 NaN status and the new decoder-test note. The portable CMake/CTest harness passes again with warnings-as-errors, AddressSanitizer/UndefinedBehaviorSanitizer and-Dinterface=struct; documentation, conventions and committed diff whitespace checks pass. Fresh native Linux/Windows CI is pending on this rebased head.Full supported Linux/Windows builds, patched libs, existing driver/cache suites and GPU/title execution remain untested locally. Physical-hardware/title validation remains outstanding; Windows GPU tests were skipped in CI. Conventions pass against the published shader head and this PR title/body. No hardware or playability result is claimed.
Checklist
6cc0503d; #1816 implementation reusedImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T13:47:22Z.
Review: CHANGES_REQUESTED
Thanks, the key/capture plumbing looks right (the
0x10afix, the allowlist entry and the TechnicalDebt row are all fine). It conflicts withmain, and the conflict isn't just textual:RequestSerializer.cpp:mainis at serialization version 12 (scratchDwords10,orderedPixelShader11,narrowSubgroupClock12). This PR writes 10 and reads underversion >= 10u. Rebase and use the next free version, 13 unlessmainhas moved again; the> Nlimit and the TechnicalDebt sentence "Captures before version 10…" change with it.tests/ShaderFloatMode.cpp:52: the "legacy" fixture is a version-9 capture. Regenerate it with the unchanged serializer from currentmain(version 12) and keep asserting that its mode is unknown. The truncated-capture prefix at:100and theNVNQQQ…prefixes intests/ShaderMemory.cpp(:759,:764) need the new number too.Happy to look again once it's rebased.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:22:42Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
6e7e99cc, merged ontomaind70b8998in one build with 33 other AGC/shader PRs that had no Windows run.agc_shader_float_mode. None of them reported skipping a case.PATHsetup.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:08:02Z.
Closing: #1816 already decodes the stage-specific bits on main, and these tests pass on main as well, so they don't pin a change. If one of those bits turns out wrong, a fix with a test that fails on main is welcome.
Pull request closed