[BUG FIX] Derive BatchRenderer texture descriptor capacity from scene textures - #56
Merged
duburcqa merged 2 commits intoJul 22, 2026
Conversation
NoahLinckeScout
marked this pull request as ready for review
July 13, 2026 22:45
NoahLinckeScout
force-pushed
the
noah-dynamic-texture-capacity
branch
from
July 15, 2026 18:38
2ece7dd to
5ec74b6
Compare
Follow-up to deriving the texture descriptor capacity from the scene: - expose an optional `max_textures` construction argument (default 0 = derive from scene) so callers can reserve descriptor headroom for scenes loaded later, instead of the capacity being pinned to the initial scene's texture count; - centralize the capacity computation (scene count, minimum of one, user-requested floor) in initRenderManager rather than an inline ternary; - in validateTextureCapacity, name the BatchRenderer two-array factor and report the actual supported maximum for the device on failure; - make the loadObjects overflow error actionable by pointing at the max_textures knob. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
duburcqa
force-pushed
the
noah-dynamic-texture-capacity
branch
from
July 22, 2026 16:06
5336bf5 to
765217f
Compare
duburcqa
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace the fixed 128-texture descriptor capacity with a per-scene capacity
derived from
GSModel.numTexturesbeforeRenderContextcreates pipelines ordescriptor sets.
The change:
maxTexturestoRenderManager::Configand initializes it from theloaded scene, with a minimum capacity of one;
viewer voxel path, descriptor pool, and descriptor-set layout;
pipeline construction; and
loadObjectsfail with an actionable error if a later load exceeds theconfigured capacity.
There is no Python API change. Existing scenes retain the same behavior; scenes
with more than 128 textures now use valid descriptor layouts when supported by
the device.
Related Issue
Resolves #55
Motivation and Context
loadObjectspreviously wrote one sampled-image descriptor for every sourcetexture into a binding created with capacity 128. Vulkan requires that the
descriptor write fit the binding. Exceeding that limit produced missing textured
geometry and native allocator aborts.
How Has This Been / Can This Be Tested?
The issue's linked
repro.pyis self-contained: it generates a 256-textureGLB and runs in a clean
uvenvironment using the released public packages.Before this change, the script reports 152/256 visible textured quads and the
child renderer aborts. With this change, the same script reports 256/256 and
the renderer exits zero.
The patch was also checked against the current
mainrevision754c5aa7b4214e70152db56ef012305d5fb27f2e.Screenshots (if appropriate)
The issue repro generates synthetic unpatched and patched images containing
only colored-quad fixture geometry.
Checklist:
Submitting Code Changessection of CONTRIBUTING.