Skip to content

docs(agc): say that only lavapipe frees descriptor sets individually - #8401

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
thuanquang:docs/debt-descriptor-pool-lavapipe
Oct 24, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
thuanquang:docs/debt-descriptor-pool-lavapipe

Conversation

@thuanquang

Copy link
Copy Markdown
Contributor

What

The "Descriptor pool recycling" entry in docs/dev/debt/libSceAgcDriver.md says the descriptor cache "avoids individually freed sets", because RADV's free-set heap accepts a set 32 bytes past the pool. Since #6614 (0627bc6bd, "fix(agc): free released lavapipe descriptor sets") that is true only off lavapipe: VulkanDevice.cpp:1169 sets individuallyFreeDescriptorSets when the driver is VK_DRIVER_ID_MESA_LLVMPIPE, ShaderResources.cpp:4019 then adds VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT to the cache's pools, and DescriptorCache::Free calls vkFreeDescriptorSets before the reset-on-empty. Every other driver keeps the reset-only path.

The entry now says "frees sets individually only on lavapipe", and the last sentence names the path RADV takes ("the reset-only path rejects it"). The RADV explanation and the RX 6600 result are unchanged.

Tested

Docs only; nothing was built or run. Checked on main 56b299c3a by reading VulkanDevice.cpp (lines 299, 1169, 3736), Context.hpp:223 and ShaderResources.cpp (3899, 4019 and DescriptorCache::Free), and with git log for 0627bc6bd.

  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • Not tested: behaviour on any machine; this changes text only.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7446 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7618 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
PR 7844 docs/dev/debt/libSceAgcDriver.md
PR 7910 docs/dev/debt/libSceAgcDriver.md
PR 8014 docs/dev/debt/libSceAgcDriver.md
PR 8223 docs/dev/debt/libSceAgcDriver.md
PR 8319 docs/dev/debt/libSceAgcDriver.md
PR 8365 docs/dev/debt/libSceAgcDriver.md
PR 8542 docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8639 docs/dev/debt/libSceAgcDriver.md
PR 9348 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9393 docs/dev/debt/libSceAgcDriver.md
PR 9431 docs/dev/debt/libSceAgcDriver.md
PR 9432 docs/dev/debt/libSceAgcDriver.md
PR 9508 docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9672 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9674 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9676 docs/dev/debt/libSceAgcDriver.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9842 docs/dev/debt/libSceAgcDriver.md
PR 9891 docs/dev/debt/libSceAgcDriver.md
PR 9892 docs/dev/debt/libSceAgcDriver.md
PR 9893 docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9898 docs/dev/debt/libSceAgcDriver.md
PR 9904 docs/dev/debt/libSceAgcDriver.md
PR 9905 docs/dev/debt/libSceAgcDriver.md
PR 9906 docs/dev/debt/libSceAgcDriver.md
PR 10193 docs/dev/debt/libSceAgcDriver.md
PR 10420 docs/dev/debt/libSceAgcDriver.md

@github-actions github-actions Bot added the docs label Oct 20, 2026

@harisibrar1 harisibrar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against main:

  • individuallyFreeDescriptorSets is set only for VK_DRIVER_ID_MESA_LLVMPIPE (core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:1172), so "only on lavapipe" is accurate.
  • Only then are chain pools created with VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT (core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp:4069) and vkFreeDescriptorSets resolved (ShaderResources.cpp:3949).
  • DescriptorCache::Free (ShaderResources.cpp:4131-4134) frees the set only when that pointer is non-null, then resets the pool when liveSets reaches 0, so "the reset-only path" describes RADV and every other driver.
  • check_conventions.py --base main --head pr-8401 passes. The RADV and RX 6600 sentences are unchanged and not re-verified (hardware evidence).

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

@adriadam10 adriadam10 self-assigned this Oct 24, 2026
@adriadam10
adriadam10 merged commit 1618d66 into boykopovar:main Oct 24, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the claim against VulkanDevice.cpp (individuallyFreeDescriptorSets set only for VK_DRIVER_ID_MESA_LLVMPIPE), Context.hpp and the lavapipe pool-flag test in tests/Graphics.cpp; the new wording is accurate; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants