Repository navigation
fix(agc): support packed 16-bit storage images - #6218
harry-z-kang wants to merge 3 commits into
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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, |
|
Repeated @jotitadev's MoltenVK check on Linux, on the current head and plain
AI-assisted: yes |
5d3a431 to
ca0ad2c
Compare
ca0ad2c to
10fbb16
Compare
|
First AMD-on-Linux (RADV) run of this PR. Merged onto AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite ( The PR's three new ctest entries ( This checks correctness only; I did not measure performance. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
Cyberpunk 2077 PPSA03974 (v02.120.000, the same title as #6119 under another region's ID) on Windows 11 26200, RTX 5090, NVIDIA 617.42, WinLibs GCC 15.2.0.
AI-assisted: yes. Written with AI assistance and reviewed by me. |
10fbb16 to
4adf405
Compare
|
Hardware data for the packed stores on RDNA 2: RX 6700 XT (gfx1031), raw ISA through the HIP runtime of AMD's Windows driver 32.0.21045.5002, so the conversion is the hardware's, not a Vulkan driver's. Method:
Per field, in every mode, f32 and d16 alike:
So This is desktop RDNA 2, not a PS5. I haven't run the PR's Vulkan tests here. |
|
First run on AMD's Windows Vulkan driver. It shows a different failure on Setup: Windows 11 Pro 26200, AMD Radeon 680M (RDNA 2 iGPU, This driver reports optimal-tiling
No On AMD's Windows driver, AI-assisted: yes |
|
@harry-z-kang a useful data point from @DavidSamir: on AMD's Windows driver, which reports storage support for these packed 16-bit formats, |
4adf405 to
4d26b03
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
main6ef5a1c4cand rebased PR head4d26b03aa: 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.libsbuild; both passed in the previous validation on base9b34cba9e.ANYPS5_GPU=5080,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.ctest --test-dir build -R '^agc_driver_(image_(converted_unorm|packed16_load|store_sint|sint8|repacked_float|packed16_storage_(133|134|136))|fmask_image_reads)$' -V --parallel 1.aea761f4d54b86682be4099c428dba27b6609940, supplied through a workspace-localVK_LAYER_PATH. Loader logs confirm insertion in every test. Neither log contains a missing-layer warning or anyVUID-error: zero on main, zero on the PR.The wider suite was not repeated in this focused validation pass. Its previously reported image-table reuse failure was reproduced on the older main
60fb8078c.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)