upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/xma2_decoder.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-26 14:40:41 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-26 14:48:57 -0500
commit7d5d820779cc7a348657ebf191531f9987d61d76 (patch)
treeef5485501f706184547fbe3022136b491313f1d5 /runtime/src/xma2_decoder.cpp
parent2d43417d49fdd8f2d8241f75ea8fd0cdd8811137 (diff)
bindless: size every sampled dimension alike and name a full array as its own refusal (RT-BINDLESS-DIMENSION-LIMITS)
World runs fill one bindless image array a few minutes in: `a bindless image array is full; dimension 3: 4096 indices, 4092 T#s of 4090 textures`. Dimension 3 is 1D (ImageDimension: 2D, 2D array, 3D, 1D). From then on every new 1D T# reads the fallback's zeros, and the console heaps count it as "no view for the T#'s format or range", which went from 2-28 a window to over 4000. Nothing leaks: the 4096 indices are the fallback, 4092 entries of image_entries and 3 replaced views, every one held by a texture the runtime still has registered, and a texture's indices go back when it goes (forget_image, the deferred bindless_slot release, remove_image). The cause is the size: size_bindings grew 2D images to 65536 but 3D and 1D only to 4096 and 2D arrays to 16384, constants that guessed how many textures of each dimension a title keeps, whatever the device holds (RADV allows 8388606 sampled images, llvmpipe 1015808). - vulkan_bindless.h: one maximum (max_images, 65536) for the sampled array of every single-sample dimension, in place of max_2d_images, max_2d_array_images, max_3d_images and max_1d_images. The 2D-array, 3D and 1D arrays grow together after 2D and the storage arrays, so on a device whose limits stop growth earlier none of them is favoured. The bound is memory (each generation's pool holds every element): 325729 descriptors on an RTX 5070, 10-20 MiB at 32-64 bytes a descriptor. The shaders declare runtime arrays, so no shader changes; the set layout changes, so compute pipelines get new journal names (hash_bindless_layout) and the pipeline cache is rebuilt. - BindlessSet::image_refusal says why add_image returned 0: no array for the dimension, the array is full, or only its shorter storage range is. - d3d12_vulkan_device.cpp: bind_image_locked and bind_image_views_locked report that reason; bind_title_image counts it ("the bindless array of the T#'s dimension is full", or "the bindless storage arrays of the T#'s dimension are full") instead of "no view for the T#'s format or range". The once-per-dimension line names the dimension, the storage range and how many of the textures holding indices are still registered at their address. - docs/d3d12_vulkan.md: the sizes, and the new reason. Tests: bindless_sizing_test checks RADV's and llvmpipe's limits (every sampled dimension at 65536; on main 1D and 3D stop at 4096) and that the three dimensions share a short budget alike. vk_bindless_dimensions_test (new, GLSL shader) sizes a set from the device, gives 5000 live 1D, 2D-array and 3D images an index each and reads every one through its index, then fills the rest of the array: the next is refused as full, and removed indices come back at once or, after an erased key, at the next flush. On main it fails at "1D: 4096 indices in the set". vk_bindless_test's index-space case filled 1D expecting the first index to be 1, which held only while the 1D array was as short as its storage arrays; it now checks every index once and that indices above the storage arrays go first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions