fix(shader): reserve heap space for sixteen sampler pairs #2141
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2141"
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 authurtabo-byte on 2026-10-09T09:54:51Z.
What
The sampler heap has 16 slots, but the allocator reserves both regular and comparison descriptors for each logical sampler. A shader using sixteen logical samplers therefore fails with
shader sampler pairs exceed runtime heap capacity.Reserve 32 slots so sixteen sampler pairs fit. Bump the runtime ABI version and update the shader-data layout assertions so cached artifacts with the previous layout cannot be reused. Existing Vulkan device-limit validation still applies.
Related #2282 changes storage-image heap capacity independently; this PR changes sampler-pair capacity and its ABI layout. Neither depends on the other; the shared header edits should be reconciled when merging.
Tested
Rebased onto main
f8c2f072. Fresh independent Windows Release/NVIDIA build: device-profile, disk-cache, prepared-graphics and all five prepared-shader cases pass (8/8; 4.95 seconds). Conventions pass.Windows 11, WinLibs GCC, Release, NVIDIA RTX 3050 Laptop GPU. Added a sixteen-sampler allocation regression to
agc_shader_device_profile; it fails before this change and passes afterward. Shader device profile, disk-cache, prepared-graphics and five prepared-shader cases pass (8/8).MiniGolf previously aborted after its Unity logo with the sampler-capacity error. In a build combining this change with its separate startup and rendering dependencies, it now renders the main menu and responds to course-selection input. Entering gameplay still encounters an independent multisampling limitation; this is not a claim of playable gameplay from this change alone.
Conventions and whitespace checks pass. Linux and other titles were not run.
Checklist
main; no other open PR implements the same fixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:13:06Z.
Checked on Linux: build + libSceAgc/libSceAgcDriver ctest (293/293) green;
agc_shader_device_profilefails with theRuntimeAbi.hppchange reverted and passes with it. The layout asserts match (+16 × 48 B inShaderData,ExportMappingsDword+192), and the per-stage sampler limit check inShaderResources.cppstill applies. Merging.Note for the next ones to land: #2282 and #2347 touch the same lines of
RuntimeAbi.hpp(Version, size asserts); the second to merge needs to rebase and take the next ABI version (12).