Skip to content

fix(kyty): allow descriptor sets above default pool sampled-image size - #347

Open
slopgobblercobbler wants to merge 1 commit into
simnJS:AnyKytyfrom
slopgobblercobbler:fix/kyty-descriptor-pool
Open

slopgobblercobbler wants to merge 1 commit into
simnJS:AnyKytyfrom
slopgobblercobbler:fix/kyty-descriptor-pool

Conversation

@slopgobblercobbler

Copy link
Copy Markdown
Contributor

What

Remove the sampled_images > DescriptorHeap::MaxSampledImages exit guard in CreateLayouts (core/kyty/graphics/host_gpu/renderer/pipeline/shaders.cpp) while keeping the Vulkan device-limit checks (limits.maxDescriptorSetSampledImages and limits.maxPerStageDescriptorSampledImages). DescriptorHeap::Commit already falls back to LargePoolSizes and DescriptorHeap::CommitPersistent already sizes its pool to the layout, so layouts above the default pool size (262144) that fit within the device's Vulkan limits no longer abort.

Add kyty_shim_descriptor_pool_oversize (core/libs/prx/libSceAgcDriver/KytyShim/tests/DescriptorPoolOversize.cpp) verifying both DescriptorHeap::Commit and DescriptorHeap::CommitPersistent succeed for a layout with DescriptorHeap::MaxSampledImages + 16 sampled images when the device limits allow it.

This is Part 1 of #340 (oversized-pool guard); persistent descriptor pool reclamation/tracking remains for a separate follow-up PR.

Tested

  • Windows 10 (10.0.26200), NVIDIA GeForce RTX 3070 (driver 610.88):
    • ctest --test-dir build -R "^kyty_shim_descriptor_pool_oversize$" with ANYPS5_REQUIRE_VULKAN=1 and with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: passed (0 new VUID- errors).
    • python tools/check_conventions.py --base origin/AnyKyty: passed.
    • python tools/check_kyty_settings.py: passed.

Checklist

@github-actions

Copy link
Copy Markdown

The new test bypasses CreateLayouts: it creates the Vulkan layout directly and registers it with DescriptorHeap. It would therefore pass with the removed guard still in place. Please add a regression case that exercises production layout creation with an oversized sampled-image count and fails when the old guard is restored. The current test is useful for covering both allocation paths.

mjnhbg3 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

I prepared a production-path regression test for the CreateLayouts guard requested above: test commit ddefe9a. It calls CreateComputePipeline with 262,144 and 262,160 sampled images, then checks transient Commit and CommitPersistent. The commit also records the separate persistent-pool lifetime gap in a debt fragment. git merge-tree --write-tree origin/pr347 HEAD reported no conflict with this PR's current head (665882aa), so the test commit can be cherry-picked for review.

On latest AnyKyty 0dea7e8, with the original guard restored, the focused Windows CTest reached CreateLayouts and failed at 262,160 (exit 8). With only that guard removed, it printed ok and passed (exit 0). Both runs used an RTX 5070 Ti and Vulkan validation layer 1.4.350 with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and VK_LOADER_DEBUG=layer; both logs show the layer inserted, no missing-layer warning, and zero VUID- errors. This tests layout creation and allocation, not descriptor writes, dispatch, or title behavior.

@github-actions

Copy link
Copy Markdown

The reported fail/pass run through CreateComputePipeline addresses the earlier coverage gap: the oversized case fails with the old guard and passes without it, while exercising both allocation paths. The current PR diff still creates the layout directly, so please bring the production-path test into this PR and rerun the focused test on the updated head. Keep the persistent-pool lifetime debt note with the separate follow-up.

This branch was previously deployed

1 inactive deployment
repository-maintenance — 665882aa Deployed Nov 26, 2026 by slopgobblercobbler via review #104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants