fix(agc): read 16-sample FMASK across every storage width #15948
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15948"
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 HabibUrRehmanBhattii on 2026-11-05T02:17:46Z.
What
Reads the four 16-sample FMASK layouts through the measured PS5 gfx1013 expansion, and corrects the expansion rule for the existing shorter layouts:
Fmask16_S16_F1(162, 16-bit storage),Fmask32_S16_F2(164, 32-bit),Fmask64_S16_F4(167, 64-bit) andFmask64_S16_F8(168, 64-bit), withR16_UINT/R32_UINT/R32G32_UINTsnapshots and two-dword expansion (samples 0-7 and 8-15).log2(fragments)bits plus an unknown flag in the next bit; an unknown flag reads8 + index, higher field bits are ignored, and samples past the count read 0.Hardware oracle: 162/164/167/168 on 13.60 and 11.60 (167 also matches on 11.60); every remaining <=8-sample format 156-166 on 13.60 with the guest-style selector, plus 157/159/160/163 repeated on 11.60. All measured outputs match the rule, including the short-expansion replication.
Fmask32_S8_F8keeps its stored-word path. The raw-ISA probe uses mapped stage memory and explicit flushes; the static-array version was the reason earlier probes hung.The FMASK gap was tracked by issue #3219; merged PR #8429 stopped at 8 samples. No open PR implements these four formats. Only
docs/dev/debt/shader.mdrecords the remaining CMASK/packed/selector boundaries.Tested
Windows 11 Home 10.0.26200, NVIDIA GeForce RTX 4070 (driver 616.92), MinGW GCC 15.2.0, CMake 4.4.4:
main1882108b45.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V:agc_driver_fmask_image_reads: Passed, 136 dispatches / 17408 component checks / 8 compression refusals (main: 104 dispatches).agc_driver_native_fmask: Passed.agc_shader_memory: Passed.was not found but was requested by env var VK_INSTANCE_LAYERS, no newVUID-(0 lines).agc_shader_memoryPassed; FMASK GPU test skipped (no Vulkan ICD/lavapipe on that host).python3 tools/check_conventions.py --base origin/main: 0 errors (one pre-existing debt-length warning).python3 tools/pr_overlap.py --branch feat/fmask-16-sample-current: lists open PRs touching the shared debt/emitter/test files; none implement the same FMASK formats. Compare the overlap list before merge.Checklist
main; no other open PR implements the same functions — #8429 stops at 8 samples; issue #3219 tracks the remaining gap; no open PR implements 162/164/167/168NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file — unchanged.mdfiles or images added to the repository — only code, tests and the existing debt entry changed; the measurement notes/logs stay attached outside the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T11:11:23Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the available evidence supports merging.
What I ran
Inspected the prepared diff and targeted repository context at head
04c25d77f4ad52b45afc91247364d889524d96d4. No commands or tests were run; the test results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded from the prepared review files because it is too large. Its changed function was inspected throughrepo_read.pyat the pinned head, but the rest of that file was not read. The supplieddescription.mdreports Windows Vulkan tests, Linux focused build/test, convention checks, and PS5 hardware measurements; those results were not independently verified. No merged-preview check or negative control was run. All other changed files listed inmanifest.jsonwere read; the only changed file excluded from the prepared files wastests/ShaderMemory.cpp.To get this to a good state
Nothing is required.