Repository navigation
fix(agc): support packed 16-bit storage images - #6218
harry-z-kang wants to merge 3 commits into
Conversation
|
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.
|
|
Reviewed both PRs in the overlap report. Neither is a prerequisite, so
Using the overlap checker's normalized merge procedure, the updated branch merges cleanly with #5899 at The updated standalone branch passed the full build, |
jotitadev
left a comment
There was a problem hiding this comment.
Tested on Apple as another vendor. This is the case where the new path actually runs: MoltenVK reports no STORAGE_IMAGE for any packed-16 format (R5G6B5, A1R5G5B5, R4G4B4A4…) in optimal tiling, so the R16_UINT reinterpret view is what gets exercised, and it works.
- With the fix:
agc_driver_image_packed16_storage_133,_134,_136andagc_driver_image_converted_unormall pass. - Test only, on the base without the Texture / descriptor-format / SPIR-V image changes: the three packed-16 cases fail with
AGC graphics: guest storage texture format <N> cannot be used as a storage image(format 4, 8 and 3 respectively),
so the tests do guard the new path. - Full
^agcsuite: 13 failures, same set as the base (all pre-existing on MoltenVK). No new failures from this PR.
So the Metal reinterpret from the packed-16 formats to r16Uint (MUTABLE / EXTENDED_USAGE) holds up on Apple silicon.
Method: macos-port @ b7eb6b6 + ImportWatched + PR diff, not main. Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta, driver SDK MoltenVK 1.4.2.
GPUs tested: Apple M2 Max (MoltenVK 1.4.2).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
628767b to
1ba7a4b
Compare
|
Addressed the updated overlap report and incorporated the issue reporter's title/Linux validation into the description, with attribution and the tested commit IDs. The format failure is confirmed fixed on those heads; later clip-control and watchdog stops remain separate. Rebased onto main I manually reviewed the shared-file diffs of all 51 PRs in the bot's uncompleted-comparison table, including the repeated AOT patches, depth/sample paths, storage lifetime/cache work, sampler changes and CMake test registration changes. None supplies a prerequisite or duplicates the packed-storage conversion. Current local validation: |
1ba7a4b to
1057f47
Compare
a05cb98 to
50642a5
Compare
|
Repeated @jotitadev's MoltenVK check on Linux, on the current head and plain
AI-assisted: yes |
5d3a431 to
ca0ad2c
Compare
What
Fixes #6119: guest format 133 (5_6_5_UNORM) fails when NVIDIA does not expose the packed format as a storage image. Formats 134 (5_5_5_1_UNORM) and 136 (4_4_4_4_UNORM) have the same capability gap.
Keep the packed image and native sampled/attachment formats, but write through a compatible R16_UINT storage view. Materialize storage descriptors with the original conversion format and pack stores into the original 16-bit guest layout, including half-precision inputs. Restrict each view's usage to the operations its format supports.
Packing reuses
EmitFormatStoreComponentinSpirvBackend/src/SpirvMemory/SpirvFormatConvert.cppand the existing packed texture channel mappings. Vulkan's format compatibility classes, extended image usage and normalized fixed-point conversion define the view compatibility and clamping/scaling. AMD/PS5 comparison of rounding ties and NaN handling remains unverified and is recorded with the existing packed-texture entry indocs/dev/debt/libSceAgcDriver.md.The branch retains merged native format-43 repacking (#7271), converted 32-bit sampling (#5958), R8/RG8 sRGB copy handling (#6054), D16 SINT stores (#5899) and float-mode handling (#5943). No open PR is required.
Tested
Local validation on the branch rebased onto
main60fb8078c: Windows 11 (NT build 26300), NVIDIA GeForce RTX 5080, driver 617.42, WinLibs GCC 15.2.0, Release,BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=OFF. Vulkan tests required the physical GPU withANYPS5_GPU=5080andANYPS5_REQUIRE_VULKAN=1.cmake --build build --parallel 12: passed, including all test executables.cmake --build build --target libs --parallel 12: passed.ctest --test-dir build -R 'agc_.*(texture|image|storage|shader|runtime)' --output-on-failure --parallel 2: 119/120 passed in 22.79 s, zero skipped. All three packed-storage cases passed.agc_driver_image_table_reusefails with 2 reused and 1 resolved tables where it expects 1 and 2. Building the two investigated tests from sources verified identical tomain60fb8078creproduces this exact image-table failure. No unrelated test changes are included.agc_driver_storage_file_writefailed in the initial parallel run, then passed in isolation on both the PR and main, and in the final parallel suite.Three new packed-format cases cover channel order, 2,048-texel bit-exact sampled-load/store round trips, full/partial masks, swizzles, 32-bit/half-precision stores, clamping and NaN/infinity inputs, sampling after repeated stores and packed guest-memory write-back.
Title and Linux validation reported by @snoozedDev, on the original main
d92a8dad3plus PR heads8322164f1and628767b52: Linux kernel 7.2.5, GCC 16.2.1, RTX 3090, NVIDIA 610.57.04, Release withANYPS5_ENABLE_SPIRV_TOOLS=ON.628767b52run recorded 645 presents and 1,497 completed draws before the later clip-control refusal.CLIP_DISABLE/PA_CL_CLIP_CNTLrefusal and the intermittent watchdog tracked in Cyberpunk 2077 (PPSA04029) on Linux: EngineWatchdog still trips on main d592d54e after #4321; the sceKernelBatchMap2 threads are now in the GuestAllocations registry walks #4634. This PR fixes the reported storage-format stop; it does not establish complete title compatibility.The packed-storage additions are unchanged. No new title run on the rebased head, AMD/PS5 packed-store comparison or lavapipe run is claimed.
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)