Repository navigation
feat(agc): bind storage buffers update-after-bind above the per-stage limit - #1580
Conversation
a1ed96a to
cb7bb92
Compare
|
Tested on top of main Head AI-assisted: yes (Claude Code). |
…bind above the per-stage limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
…settings Without argument buffers MoltenVK caps every stage at 31 storage buffers, including update-after-bind ones, so the update-after-bind path from boykopovar#1580 could not help (agc_driver_many_buffers). With them the update-after-bind limits rise to 1000000. The instance now asks MoltenVK for argument buffers through VK_EXT_layer_settings when the loader offers it, unless MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS is set by the user. Full suite on an M3 Pro: 471 of 483; Breakout still runs at about 60 fps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cb7bb92 to
910a777
Compare
|
Checked the limit logic (per-stage, per-set, Rebased onto current main (no code changes) to get a clean CI run; merging once it's green. Not verified here: MoltenVK/Apple at runtime. |
910a777 to
27e6ad1
Compare
…s-update-after-bind feat(agc): bind storage buffers update-after-bind above the per-stage limit
What
agc_driver_many_buffersfails on Apple GPUs with "shader descriptors exceed per-stage limits". MoltenVK reportsmaxPerStageDescriptorStorageBuffers31 andmaxDescriptorSetStorageBuffers155 on every Apple GPU, while the test binds 124 buffers in one stage. its update-after-bind limits are 1000000, and the guest buffers are one constant-indexed array binding, so the shaders don't need to changewhen a stage's storage buffers or resources go above the regular per-stage limit, or the set's storage buffers above the per-set limit, and the device has
descriptorBindingStorageBufferUpdateAfterBind, the set now uses the update-after-bind limits instead of throwingVulkanDeviceenablesdescriptorBindingStorageBufferUpdateAfterBindwhen available and passesVkPhysicalDeviceDescriptorIndexingPropertiesthrough the context. without the feature those limits stay 0 and the old error is thrownUPDATE_AFTER_BIND_POOLwithUPDATE_AFTER_BINDon its storage-buffer bindings, and is allocated from a separate chain of pools created withUPDATE_AFTER_BIND. the layout key carries the flag. the two places that created layouts shareCreateSetLayoutnow, and the two that created single-set pools shareCreateSetPoolValidateDescriptorLayout, added on main since this PR was opened, takes the same flag and checks such a set againstmaxPerStageUpdateAfterBindResourcesinstead ofmaxPerStageResourcesTested
macos-portbranch, before the rebase.agc_driver_many_buffersfails before and passes after. the rest of the suite ran with-j1 --timeout 30without the flip and display tests andagc_driver_lds_atomics64. 427 tests, and the 2 that fail,agc_driver_pixel_interlockandagc_driver_sdwa_float_selectors, fail the same way without this changeagc_driver_graphicshas a new case on the mock device. 17 buffers over a per-stage limit of 16 get the update-after-bind layout, binding flag and pool, an update-after-bind limit of 16 still throws, and one buffer keeps the regular layout. with the switch to update-after-bind removed, the new case failsa8b032b2. builds,agc_driver_graphics,agc_driver_many_buffers,agc_driver_typed_heaps,agc_driver_oversized_descriptor_setsandagc_driver_prepared_graphicspass. 26 of the 207agc_drivertests fail, with illegal instruction and segfault crashes of this x86-64 emulated container and wrong values inimage_sint8andshader_clock, none of them in descriptor code910a777fand passed on linux and windows: https://github.com/Zheorgyan/AnyPS5/actions/runs/37902941264tools/check_conventions.pypassesChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)