shader: raise the dense image resource limit to 64 #457

Manually merged
github merged 1 commit from gh-pr/457/head into gh-pr/457/base 2026-11-26 09:21:53 +00:00
Owner

@⁠brandostrong on GitHub · 2026-09-02 21:49 UTC · original
brandostrong:fix/image-resource-limit → main · +1 −1 · 1 files · 1 commits · merged 2026-09-08 15:37 UTC

Problem. Astro Bot's first scene has a pixel shader that loads 40 distinct texture descriptors (s_load_dwordx8 from one table at 0x20-byte steps) plus 7 samplers. ResourceTracking fails it with image resource limit exceeded and the emulator exits. The hardware has no such limit; descriptors are memory. MaxImages = 32 is an emulator cap.

Change. Raise the dense image resource limit to 64. The host binding tables are vectors sized from the actual count, so nothing else changes.

Effect. The shader compiles and the scene renders instead of exiting the emulator.

Verification. Suites unchanged. Not yet re-measured in a full game run on this branch.

References

  • AMD RDNA 2 Instruction Set Architecture Reference Guide, §8.2.6 "Image Resource": T#s are memory-resident descriptors loaded with scalar loads; no architectural count of images per shader. The limit of 32 is the emulator's MaxImages.
**@⁠brandostrong** on GitHub · 2026-09-02 21:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/457) `brandostrong:fix/image-resource-limit` → `main` · +1 −1 · 1 files · 1 commits · merged 2026-09-08 15:37 UTC **Problem.** Astro Bot's first scene has a pixel shader that loads 40 distinct texture descriptors (`s_load_dwordx8` from one table at 0x20-byte steps) plus 7 samplers. `ResourceTracking` fails it with `image resource limit exceeded` and the emulator exits. The hardware has no such limit; descriptors are memory. `MaxImages = 32` is an emulator cap. **Change.** Raise the dense image resource limit to 64. The host binding tables are vectors sized from the actual count, so nothing else changes. **Effect.** The shader compiles and the scene renders instead of exiting the emulator. **Verification.** Suites unchanged. Not yet re-measured in a full game run on this branch. **References** - AMD RDNA 2 Instruction Set Architecture Reference Guide, §8.2.6 "Image Resource": T#s are memory-resident descriptors loaded with scalar loads; no architectural count of images per shader. The limit of 32 is the emulator's `MaxImages`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:21:51 +00:00
github manually merged commit 6c3bb53baf into gh-pr/457/base 2026-11-26 09:21:53 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.