fix(agc): report sampler device limits #7003

Merged
MarcZX10 merged 1 commit from upstream-pr/7003 into main 2026-10-17 07:22:17 +00:00
MarcZX10 commented 2026-10-17 04:00:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T04:00:14Z.


What

Improves the sampler-limit rejection path with both the requested sampler count and the device's numeric limit. The per-stage and descriptor-set checks now produce diagnostic text such as shader sampler descriptors exceed per-stage limits: required 17, device limit 16. Adds mock coverage for 17 sampler descriptors against a per-stage limit of 16.

This implements the diagnostic option from #7000; Vulkan's reported physical-device limit remains enforced.

Tested

Linux x86-64, GCC 12.2, Release. agc_driver_graphics_tests built successfully after a temporary one-token workaround for an unrelated dependent-template parse error in unchanged SrtDescriptorEvaluation.cpp (also covered by #6306/#6738); that source was restored before committing. CTest started agc_driver_graphics but aborted before assertions because this Xeon E5-1620 v2 lacks required host CPU features. python3 tools/check_conventions.py --base upstream/main --head HEAD and git diff --check passed. No GPU test run.

Checklist

  • Based on current main; no other open PR implements the same diagnostic
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no paths changed
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic behavior, not title-specific
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a; no GPU test run
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4897063585 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7003). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T04:00:14Z. --- ### What Improves the sampler-limit rejection path with both the requested sampler count and the device's numeric limit. The per-stage and descriptor-set checks now produce diagnostic text such as `shader sampler descriptors exceed per-stage limits: required 17, device limit 16`. Adds mock coverage for 17 sampler descriptors against a per-stage limit of 16. This implements the diagnostic option from #7000; Vulkan's reported physical-device limit remains enforced. ### Tested Linux x86-64, GCC 12.2, Release. `agc_driver_graphics_tests` built successfully after a temporary one-token workaround for an unrelated dependent-template parse error in unchanged `SrtDescriptorEvaluation.cpp` (also covered by #6306/#6738); that source was restored before committing. CTest started `agc_driver_graphics` but aborted before assertions because this Xeon E5-1620 v2 lacks required host CPU features. `python3 tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check` passed. No GPU test run. ### Checklist - [x] Based on current `main`; no other open PR implements the same diagnostic - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no paths changed - [x] No notes, investigation files or images added to the repository - [x] No new third-party code - [x] Generic behavior, not title-specific - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a; no GPU test run - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-17 04:15:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T04:15:46Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6647 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L1515, L1518

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 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 1896 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4650 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5500 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6215 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6222 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6373 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6529 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6535 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6612 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6718 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6762 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6937 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6229524838 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7003#issuecomment-6229524838). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T04:15:46Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6647](https://www.github.com/boykopovar/AnyPS5/pull/6647) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` [L1515](https://github.com/boykopovar/AnyPS5/blob/661a1118cc7cdba41d2b11a8000aab2157a93af4/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp#L1515), [L1518](https://github.com/boykopovar/AnyPS5/blob/661a1118cc7cdba41d2b11a8000aab2157a93af4/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp#L1518) | | | 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 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 1896](https://www.github.com/boykopovar/AnyPS5/pull/1896) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6215](https://www.github.com/boykopovar/AnyPS5/pull/6215) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6297](https://www.github.com/boykopovar/AnyPS5/pull/6297) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6373](https://www.github.com/boykopovar/AnyPS5/pull/6373) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6762](https://www.github.com/boykopovar/AnyPS5/pull/6762) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6937](https://www.github.com/boykopovar/AnyPS5/pull/6937) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` |
MarcZX10 commented 2026-10-17 04:16:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T04:16:34Z.


I manually checked the overlap with #6647. There is no duplicate feature: this PR adds required/limit diagnostics for sampler overflows, while #6647 selects update-after-bind limits for image and sampler tables. The shared validation hunk will need a combined resolution that keeps both the selected limit and the diagnostic text; this PR does not depend on #6647.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6229532197 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7003#issuecomment-6229532197). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T04:16:34Z. --- I manually checked the overlap with #6647. There is no duplicate feature: this PR adds required/limit diagnostics for sampler overflows, while #6647 selects update-after-bind limits for image and sampler tables. The shared validation hunk will need a combined resolution that keeps both the selected limit and the diagnostic text; this PR does not depend on #6647.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7003
No description provided.