feat(libSceAgcDriver): support PS4 2D thick tile mode 20 for volumes #20786
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20786"
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 Gag21 on 2026-11-15T15:24:08Z.
What
Support PS4 tile mode 20 (
Thick_2dThick) in libSceAgcDriver for 3D textures (volumes).TextureTileMode::kGcnThick2D.GcnTiling:Require(!thickMacro || microBytes <= tileSplit)), rejecting element sizes greater than 4 bytes (8 and 16 bytes).GcnLayerBankXorsteps bylayer / 4), matching AMD addrlib'segbaddrlib.cpp/siaddrlib.cpp(ComputeBankFromCoordandlayerBankStep).kGcnThick2Din surface layout descriptions (describeGcnVolume,GetBlockLayout,GetMipTailLayout,ThickBlockExtent):mipCount == 1) for thick macro-tiling.core/libs/prx/libSceAgcDriver/tests/TextureTiling.cpp(gcnThickMacroTilingTests): verifies element address mapping across 1, 2, and 4-byte formats against addrlib formulas, enforces rejection of >4-byte formats and mip chains, and checks padded geometry.core/libs/prx/libSceAgcDriver/tests/execution/GcnDetile.cpp(detileThickVolume): executes GPU detile compute dispatch across an 8-slice volume and verifies 3D sampled view range.docs/dev/debt/changes/feat-agc-gcn-thick-2d-tiling.md.Tested
Windows 11, WinLibs GCC 16.2.0 r1, Release, NVIDIA GeForce RTX 3070 (driver 572.16 / Vulkan 1.4.303), Vulkan SDK 1.4.363.1 validation layer.
Focused AGC test execution with validation layers:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build-b -R "^(agc_driver_gcn_detile)$" -Vpassed (1/1 tests passed, 0VUID-validation errors, loader confirmed insertingVK_LAYER_KHRONOS_validation).ctest --test-dir build-b -R agc_graphics_profile_draw -Vpassed (100% tests passed, including newgcnThickMacroTilingTests).python tools/check_conventions.py --base origin/mainpassed cleanly with 0 errors and 0 warnings.python tools/debt_fold.py --root wt-b --checkpassed cleanly.python tools/pr_overlap.py --names resolveGcnTileMode kGcnThick2Dconfirmed 0 overlapping PRs on main.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T08:44:16Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: limit the new single-mip restriction to the thick 2D mode so existing macro-tiled volume mip chains remain supported.
What I ran
Reviewed head
ab4504e92affa4fe098040eef886a753a88ed16cusingrepo_read.pyartifacts and repository reads. No tests were run; the Windows and Vulkan checks in the PR description are author-reported.Results
Negative control
Not run; no test execution was performed.
Findings
Blocking
core/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cpp:150applies the single-mip requirement to every mode classified byIsGcnMacroTiled, including existing GCN modes such askGcnDisplay2DandkGcnThin2D. SincedescribeGcnVolumehandles these modes too, a previously accepted multi-mip 3D descriptor now throws. Restrict this guard tokGcnThick2D(or otherwise to the newly unsupported thick mode) and preserve the existing behavior for other modes.Non-blocking
None.
Sources
Not verified
No tests or builds were run. The PR description reports Windows 11, GCC, and Vulkan checks, which were not independently confirmed. Read all eight changed files listed as reviewed in
manifest.json;files.jsonwas not available in the prepared artifacts.To get this to a good state
Restrict the mip-chain rejection to mode 20 and retain support for macro-tiled volume mip chains in other modes. Rerun the focused AGC tests and convention check on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T12:21:23Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected changes add PS4 tile mode 20 support; no blocking defect was verified, and the reported checks were not run in this review.
What I ran
4c503cd0e37dc82fa0a9574f7fe0419b7e4117f2.repo_read.pyto inspect changed code and its relevant callers; no tests or build commands were run.Results
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:21:25Z.
Review: COMMENTED
The trial merge onto
a1b75b0947was clean. I checked the four-slice slab geometry, the bank rotation and the transfer path’s slice index. The exhaustive host fixture checks that the equation covers each location once, whileGcnDetilecompares actual GPU output across several slabs. Please retain both and keep the refusal coverage for mode-20 mip chains and unsupported element widths. Paired lavapipe validation is pending.AI-assisted: yes.