fix(agc): preserve infinite depth bounds #7627
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7627"
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-10-18T17:51:15Z.
What
Preserve IEEE infinities when decoding
DB_DEPTH_BOUNDS_MIN/MAX. Crimson Spires PPSA03568 writes positive infinity (0x7f800000) to DWORD 9; main aborts withAGC graphics: non-finite register at DWORD 9before its main menu.Use a dedicated depth-bound decoder that rejects NaNs while preserving finite values and infinities. Other floating-point register checks stay unchanged.
ValidateDepthBoundsstill refuses bounds outside [0,1] unlessVK_EXT_depth_range_unrestrictedis enabled; no clamping, title-specific path, extension bypass or fake success is added. The Vulkan extension removes the depth-bound range restriction.Decoder commit
964dcbef47cfd38c89523eb6dd202c0d3e55c199plus test-registration follow-up33f65a7eba, on mainc34e9d855cb496ef1525b3ccbddebdba10fe6541.Tested
2026-10-19 current-main composition check: on pinned main
9d2d40f5eedfa8c5f4312517175147eb0181001a, #7817 alone removes the earlier full-optimizer BDA ABI failure but the native title then aborts atnon-finite register at DWORD 9. Adding only this PR produces0f6f2897cc2d2ae81cd30cefc5ad7b3134a53f71: libraries build and depth-bounds state, unused-viewport depth and graphics checks pass 3/3, with required Vulkan, shader cache disabled and core validation (zero VUIDs or missing-layer messages). A warm native PPSA03568 run reaches driving dialogue and closes normally after 249.10 s, exit 0, PID gone and settings restored. The driving scene is still too dark. Adding the published #6959 stack (including its #6934 prerequisite) separately restores visible scene lighting. These are explicitly composed results, not a new isolated bring-up or speed claim. Sanitized run summary · Focused checks · Baseline driving scene · Layered-rendering driving sceneLatest rebase: two commits, no merge commits, on main
3fdd1f52e968c57d2b6890b11863f96aee0c11ce; head8bd880ceb1b358e6e58bb5e9337eff01e34388a3. Resolved the additive CMake conflict while retaining upstream’s unused-viewport-depth test and this PR’s depth-bounds runtime properties, including Windows PATH setup.agc_driver_graphics_testsand its runtime dependencies build. Depth-bounds state, unused viewport depth and graphics checks pass 3/3, no skips, 3.29 seconds on the Linux configuration below. Conventions and whitespace checks pass. This refresh adds no new native-title or performance claim.Isolated current-main follow-up on main
676d423968a1a8fcc79c6247020ce22090a8e0d4: only this PR's decoder and CTest-registration changes are applied, producing5aede09b0711f27a449e77cd9bfed444417f5a58. Full libraries and graphics tests build;agc_driver_depth_bounds_stateandagc_driver_graphicspass 2/2, 2.65 s. With the same dump option (APS5_PLAYGO_UNLISTED_CHUNKS=installed), unchanged main reaches 574 frames and aborts atAGC graphics: non-finite register at DWORD 9; main plus this PR reaches driving dialogue and 1,648 completed frames, then closes normally after 132.32 s (exit 0). Both processes are gone and the udmabuf limit is restored to 64 MiB. The driving screenshot is visibly too dark, also confirmed by the user; this establishes startup progress, not visual correctness or a speed gain. Isolated-run summary, tests and dark-scene screenshot, assets prefixedcrimson-depthbounds-sync76-.Current-main integration check on
a6dd29b3daf3ba25bf4c2e138ad380b887ad4d49: exact #7681 plus this PR and #7630, integration headce17127384d4436a092b623236945d9fe3385e81. Full libraries and focused test executables build; initialization, commands, guest shader linking, depth-bounds state, graphics and three control-flow modes pass 8/8 without skips (6.17 seconds, RADV). A 228.91-second native run reaches the Crimson Spires menu, records 1,451 completed frames and closes normally (exit 0); PID gone and udmabuf limit restored to 64 MiB. Menu screenshots still show an excessively dark 3D scene with bright UI. Vulkan validation reports image-view usage, blend attachment, index/vertex-buffer and barrier-mask errors; this is startup/integration evidence, not visual correctness, full gameplay or performance evidence. The current-main-only run hits the independent versioned-register-defaults sentinel regression before this depth-bounds path; current main plus only #7681 reaches 514 frames then reproducesnon-finite register at DWORD 9.Arch Linux 7.2.9-arch1-1, Ryzen 9 7950X, GCC Release, bundled source-built dependencies, RX 6650 XT with RADV Mesa 26.2.4.
libsandagc_driver_graphics_testsbuild successfully.agc_driver_depth_bounds_stateandagc_driver_graphics: 2/2 pass, no skips. These are CPU/mock graphics checks. Regression coverage includes finite bounds, each infinite endpoint, both infinities, NaN rejection at both endpoints, preservation of infinity rejection for other registers, and rejection without / acceptance with the unrestricted-depth capability.DB_DEPTH_BOUNDS_MAX. The diagnostic-only native build reports0x7f800000; that diagnostic is excluded from the PR.c777a0f1941con main218aa8f00babrenders the menu at 30 and 130 seconds, closes normally after 148.49 seconds (exit 0), and restores its temporary kernel setting. Main218aa8f00bababorts at the bound read; the intervening main merge #6160 does not change State.cpp. The final rebased head964dcbef47cfalso passes the original bound-read failure. Its 30-second snapshot still shows the publisher logo; Cross was sent at 46.72 seconds, then it aborts at 48.72 seconds with a separateunsupported dynamic s_setpc_b64 at program counter 0x000003e0(shader stage 5). This final run does not independently establish a menu screenshot or gameplay. Its process exited and the temporary kernel setting was restored.APS5_PLAYGO_UNLISTED_CHUNKS=installedoption. This is an installation assumption, not proof of complete chunk metadata.33f65a7ebaadds this test to its siblings' shared shader-cache setting, 30-second timeout, source working directory and Windows runtime-library PATH. Local rebuild and both focused CTests pass (2/2, no skips, 2.99 s); generated CTest properties checked. Independent Windows validation of the corrected registration is recorded below.Evidence: test logs, negative control, native summary and pre-rebase menu screenshot, assets prefixed
crimson-depthbounds-.savvaniss independently reports all 19 Graphics.cpp tests passing three runs each, including
agc_driver_depth_bounds_state, on Windows 11 Pro 26300, Intel UHD 770 (32.0.101.7088) and AMD RX 9070 XT (32.0.31041.1004), WinLibs GCC 15.2.0 r7 Release. The tested composition merges exact head33f65a7ebinto mainf3059421f, with shader caching disabled and serial CTest. The control without this implementation failsagc_driver_graphicsat non-finite DWORD 9 andagc_driver_covered_centroid_stateon both GPUs. The corrected depth-bounds CTest registration passes on Windows. These decoder/mock tests do not establish GPU rendering or title performance.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 github-actions[bot] on 2026-10-18T18:01:21Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtImported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T18:28:34Z.
On Windows the new
agc_driver_depth_bounds_statetest cannot start under ctest. It exits0xc0000135(a DLL not found), 3 of 3. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release,BUILD_TESTING=ON. Build:mainc3591adf9with #7629, #7630 and #7627 merged together (each merge clean, built once).Its registration has no
set_tests_properties. Its neighboursagc_driver_undithered_alpha_to_coverage_stateandagc_driver_msaa_dcc_stategetENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1",TIMEOUT 30andWORKING_DIRECTORY, and onWIN32thePATH=path_list_prepend:$<TARGET_FILE_DIR:libc>modification. Without thePATHthe test executable doesn't find the system libraries. Adding the new test to those twoset_tests_propertiescalls should be enough. Run by hand with thatPATH,agc_driver_graphics_tests --depth-bounds-stateprintsDepth bounds state checks passed, 3 of 3, andagc_driver_graphicspasses under ctest.AI-assisted
Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-18T18:37:21Z.
Windows issue at head
964dcbef4:agc_driver_depth_bounds_statehangs under ctest on both NVIDIA RTX 3070 (driver 617.42) and Intel UHD 630 (igvk64) - it exhausts the timeout whileagc_driver_graphicsitself passes in ~9 s on both.The test logic is fine: running
agc_driver_graphics_tests.exe --depth-bounds-stateby hand finishes in ~1 s with "Depth bounds state checks passed". The hang is the registration: the newadd_test(CMakeLists.txt:1679) never gets theif(WIN32) ... ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>"thatagc_driver_alpha_to_coverage_state,agc_driver_undithered_alpha_to_coverage_stateandagc_driver_msaa_dcc_statereceive in the block below. Without it the exe cannot resolvelibc.prx/libSceAgcDriver.prxat load, Windows shows the entry-point dialog, and the process blocks on the popup until ctest kills it.Suggested fix: add
agc_driver_depth_bounds_stateto that WIN32set_tests_propertieslist (and matchingTIMEOUT/SKIP_RETURN_CODE/WORKING_DIRECTORYproperties like its siblings). Linux never needs it, which is why it passed on your setup.Windows 11, MinGW (WinLibs GCC 15.2.0), Release.
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-18T18:50:22Z.
Fixed the registration in
33f65a7eba:agc_driver_depth_bounds_statenow shares the shader-cache setting, 30-second timeout, source working directory and Windows runtime-library PATH with the adjacent state tests.Thanks LeandroLP23 and akkadbakkad89 for isolating this. The graphics target rebuild and both focused CTests pass on Linux (2/2, no skips, 2.99 s); conventions and whitespace pass. I checked the generated Linux CTest properties, but cannot claim a corrected Windows run locally. Please rerun the focused CTest on Windows when convenient. The description records the original Windows failure and the remaining rerun requirement.
Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-18T19:22:31Z.
Cross-linking the systematic fix that grew out of this report: #7645 (tracks issue #7637). The narrow registration fix you pushed covers this test; #7645 additionally stages the
.prxruntime files next to every test exe, so a future registration that misses the WIN32 prepend will not hang on the loader dialog.Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-18T21:53:02Z.
Intel and AMD Windows data: with this PR the 19 tests built from
tests/Graphics.cpppass on an Intel UHD 770 and an AMD RX 9070 XT; without it, two of them fail on both.Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, withVkCacheemptied first. This head33f65a7ebmerged intomainf3059421f. "Without" means this PR's test files onmainf3059421f, with none of its other changes.tests/Graphics.cpp,agc_driver_depth_bounds_stateincludeddepth_bounds_stateis not registered)agc_driver_graphicsfails:non-finite register at DWORD 9;agc_driver_covered_centroid_statefailsUnder CTest
agc_driver_depth_bounds_statepassed here in 0.01 s, with this head'sENVIRONMENT_MODIFICATIONregistration (#7637).I also ran full CTest with this PR and the 14 other open AGC PRs I tested in the same batch merged together (#7647, #7641, #7630, #7603, #7600, #7591, #7579, #7535, #7533, #7474, #7462, #7050, #7048, #7650). Neither GPU showed a failure beyond
main's own, except #7650's new test.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T11:05:18Z.
Checked the decoder change against current main (NaN still rejected, infinities preserved only for
DB_DEPTH_BOUNDS_MIN/MAX, other registers keep the finite check), thatValidateDepthBoundsstill requiresVK_EXT_depth_range_unrestrictedoutside [0, 1], the new test rows (each infinity, both, NaN at both endpoints, non-finite register 0x00b still rejected) and the ctest registration properties, including the Windows PATH; merged.