fix(agc): allow chunked imports as vertex and index buffers #6913
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6913"
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-16T17:53:54Z.
What
Linux shared ranges fitting inside one 64 MiB udmabuf chunk can be bound directly as vertex or index input, but
ChunkImportUsageomits both required usage flags. Override 2 (PPSA01907 v01.007.000) reportsVUID-vkCmdBindVertexBuffers-pBuffers-00627andVUID-vkCmdBindIndexBuffer-buffer-08784with Vulkan validation.Add
VK_BUFFER_USAGE_VERTEX_BUFFER_BITandVK_BUFFER_USAGE_INDEX_BUFFER_BITto the existing usage mask, matching the ordinary host-pointer and sparse import paths. These are required by vertex-buffer binding and index-buffer binding. No allocation policy or draw ordering changes.The regression imports an 8 MiB shared range, checks it takes the non-sparse dma-buf path, and checks the actual buffer creation flags admit both input roles.
Tested
Latest refresh (2026-10-23): one linear topic commit
d89f7050b7de6e7ec337f8edfcc8e41feb644b7bon main938812df1403f9616dba71744216725891ca4979. Retains current upstream sparse and unaligned-import behavior. The branch also merges cleanly against main15e71dbe1116517913c5fbf309aa86d102285da3at publication. Full Release libraries and the three focused test executables build on GCC 16.2.1/Linux.On the same RX 6650 XT/RADV setup,
agc_host_import_sparse,agc_driver_graphics, andagc_driver_sparse_dma_buf_importpass on both pinned main and the change: three tests per arm, no skips, validation layer loaded, zero VUIDs. The first two fixtures use mocked Vulkan; the sparse-import test exercises the real device. With the exact unchanged candidate fixture executable and the baseline library (loader path verified), both missing vertex/index usage assertions fail. Restoring the candidate library passes; the fixture SHA-256 is unchanged. No fresh title, Windows, lavapipe, full-suite, visual or performance result is claimed for this refresh. Pinned receipts and logs.Historical validation below retains its original source revisions.
Head
b3a58676bf108f830731f571975b810ef44b9dbe, one linear topic commit on main93e54cedd3dd49eabf1c589f020b54758e0b6461. Linux 7.2.9-arch1-1, GCC 16.2.1 Release, Ryzen 9 7950X, RX 6650 XT / RADV Mesa 26.2.4-arch1.1; lavapipe Mesa 26.2.4 / LLVM 23.1.1.libsand the three selected test executables build.agc_host_import_sparse,agc_driver_graphics, andagc_driver_sparse_dma_buf_import: 3/3 pass on RADV and 3/3 on lavapipe, no skips (4.42 s / 4.12 s). The first is a mocked Vulkan device with real Linux udmabuf backing, not a hardware shader test.d9b696ddbwith only the test added fails both missing-usage assertions. After adding the production fix, the exact same fixture executable passes; SHA-25606618cfd9aed0f0e73f3efbcf1d8522bcdd8f7d07228309624969061985243b5.d9b696ddb; the rebase onto93e54ceddadds only upstream test guards and keeps the production file byte-identical. Baseline also has inactive capture diagnostics and tools-only replay changes, none modifying host imports.Sanitized validation and screenshot:
chunk-import-usage-validation-public.json,chunk-import-usage-menu.png,chunk-usage-main93-radv-tests.log,chunk-usage-main93-lavapipe-tests.log. No raw guest code, assets or full title logs published.Separate combined diagnostic: testing/override2-api-fixes-main93 adds lvmino97’s #862 and XairRrR’s #6781 to this PR; its Override 2 startup/menu run closes normally with zero validation errors, while dark rendering persists. Further Recorder validation,
recorder-complete-main93-validation-public.json, covers AnzouBeli’s #5883, Dextroid17’s #6155 and MarcZX100’s #6642 plus a separate CoverPass fixture correction: the full Recorder flow passes with zero validation errors in dynamic and legacy modes on both RADV and lavapipe. These are separate integration/test changes, not dependencies or a visual-fix claim for this standalone import PR.Additional title coverage: Infliction: Extended Cut (PPSA02688) reports both missing vertex/index usage VUIDs on the local main
84b0d2f248diagnostic stack. A combined integration on mainf51724078fadds this PR plus #6782, #6781 and #862; both buffer VUIDs and the independent-blend, sampled-sRGB-view and host-stage VUIDs are absent through gameplay and normal shutdown. One pre-existing shutdown leak report remains. This is combined integration evidence, not an isolated A/B for this PR; dark lighting remains unresolved. Sanitized protocol and results.Crimson Spires integration validation (2026-10-19 UTC)
A combined integration on main
3b20a366caa8a8de5509e7add433c55275aa6f29, headcdcb1b9b55630aaf7db1164656660afb9500a2d5, includes #7681, #7627, #7630, #6959/#6934, #6913, #862 and #6782. Fulllibsbuilds and 13 focused checks pass on RX 6650 XT / RADV Mesa 26.2.4-arch1.1, Arch Linux, with required Vulkan and core validation, zero skips (7.44 s total).The warm-cache PPSA03568 native run completed after 307.859 s with exit 0. It recorded zero Vulkan validation errors; two warning types remain (image subresource layer-count compatibility and shader output not consumed, ten occurrences each). The 295 s capture shows the car gameplay scene with visible road and dashboard; the user independently confirmed both menu and gameplay rendering looked good. This is combined-integration evidence, not an isolated result for this PR, a PS5 image-match claim or a performance comparison.
Sanitized pinned report · Gameplay capture
Checklist
main; no other open PR found adding these flags toChunkImportUsageNotImplemented_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 JJenkx on 2026-10-18T19:33:55Z.
Additional native evidence: Crimson Spires PPSA03568, opening-car dialogue, Linux / RX 6650 XT / RADV Mesa 26.2.4-arch1.1, default Khronos core validation enabled.
Baseline
355de8bdfcf25fb2af95ae9884c4163b10ac640dis mainc4c2b3aa7371ee988c94ca62f1431ebaaf0688c8plus the depth-bounds and scheduled-jump-table bring-up fixes (#7627 and #7630). It emits 10 validation headers each forVUID-vkCmdBindVertexBuffers-pBuffers-00627andVUID-vkCmdBindIndexBuffer-buffer-08784: the chunk-import buffer lacks vertex/index usage. These counts are capped emitted messages, not a count of all invalid calls.A local integration at
bc8fdb728ff348c92fe5a65c0eefa80d03d097a7adds this exact topic plus #6782 (independent blend), #6781 (CMASK host barrier stages), and #862 (sampled image-view usage). Both buffer VUIDs disappear; the other four baseline error categories also disappear. The two pre-existing warning categories remain. This is combined-integration evidence, not an isolated native A/B of #6913.Both runs use a 1536x864 window, the same input schedule,
APS5_HOST_IMPORT_MIB=16384,APS5_DRAW_CACHE_ENTRIES=4096,APS5_PIPELINED_DRAWS=1, andAPS5_PLAYGO_UNLISTED_CHUNKS=installed, with retained caches. Both reach the same car dialogue and close normally at about 233 seconds; both PIDs are gone and the temporary udmabuf limit is restored to 64 MiB. The dark/malformed 3D scene persists. No visual fix or speedup is claimed.Integration full libraries and affected fixtures build;
agc_driver_graphics,agc_sampled_storage_base_level_usage,agc_host_import_sparse, andagc_driver_sparse_dma_buf_importpass 4/4 without skips (4.11 seconds). The separate CMASK draw/eliminate fixture also passes. Existing isolated buffer regression evidence above remains the evidence specific to this topic.AI-assisted validation/reporting: yes.