bindless: size every sampled dimension alike and name a full array as its own refusal (RT-BINDLESS-DIMENSION-LIMITS) #2406
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2406"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T21:34:43Z.
The bindless set gave 1D and 3D images 4,096 indices whatever the device holds. World runs fill the 1D array a few minutes in, and from then on every new 1D T# reads zeros. This sizes every sampled dimension alike and reports a full array under its own reason.
Claimed in the coordination issue as: RT-BINDLESS-DIMENSION-LIMITS
What was wrong
size_bindingsgrew 2D images to 65,536 but 2D arrays only to 16,384 and 3D and 1D to 4,096 (max_*_imagesinruntime/src/vulkan_bindless.h).forget_image, then the deferredbindless_slotrelease, thenremove_image).What changes
max_images, 65,536).hash_bindless_layouthashes the counts).gta6rt --precompile-pipelines/ the pipelines stage) has to be rebuilt once.BindlessSet::image_refusalsays whyadd_imagereturned 0: no array, array full, or storage range full.bind_title_imagenow counts:1D, not just3) and how many of the textures holding indices are still registered at their address.docs/d3d12_vulkan.mdsection 5 has the new sizes and reasons.Tests
bindless_sizing_test(CPU): RADV's and llvmpipe's limits give every sampled dimension 65,536; onmain1D and 3D stop at 4,096. A short budget is shared alike by the three dimensions.vk_bindless_dimensions_test(new, GPU, GLSL shader):mainit fails at "1D: 4096 indices in the set".cteston llvmpipe: 114 of 114 passed (3 skipped).main2d43417d4.vk_bindless_dimensions(passes).vk_bindless_ps_texandvk_bindless_ps_imgatomic: their index-space case assumed the first 1D index is 1, true only while the 1D array was as short as its storage arrays. The case now checks every index once, and that indices above the storage arrays go first. All fourvk_bindless*tests pass.main(presentation under xvfb, host DXGI and similar).tests/test_ci_registration.py,tests/test_ctest_registration.py,tests/test_docs_*.py,tests/test_text_write_line_endings.pyandscripts/check_no_game_data.pyon the changed files pass.World run
RX 7900 XTX, RADV (Mesa 26.3.1), Wine, from a local build of
mainfac8b4bb9with this change and two others (RT-VSHARP-SLOT-RECORDS and #2230):bindless set: 65536 2D images, 4096 samplers, 65536 2D-array, 65536 3D, 65536 1D, 4096 storage indices in 2D.a bindless image array is fullline, and "no view for the T#'s format or range" stays at a handful per window.mainhere (three of nine earlier runs), so it is not shown to come from this change, but the run stopped before the point (about 340 s) where the 1D array used to fill. So the run shows no regression and the new sizes, not yet the picture after the old fill point.Not tested
bindless_sizing_test).AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T21:41:20Z.
Merging. This is a self-merge.
main2d43417d4+ this PR (7d5d82077), Mesa 26.3.1:vk_bindless_dimensions_test(5,000 live 1D, 2D-array and 3D images, each read through its index) passes on llvmpipe, the integrated RDNA2 GPU and the RX 7900 XTX with the validation layer, and fails onmainwith "1D: 4096 indices".ctest: 114/114. Windows suite under Wine: the new test is the only change againstmain.mainhas as well; it ended before the old fill point.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-26T21:49:18Z.
I verified the merged change on a physical RTX 4090 (Windows 11, NVIDIA 616.64, Vulkan validation enabled) at
55e2bd9e9e.vk_bindless_dimensionstest read the expected texel from 5,000 live images in each of 1D, 2D array, and 3D. Each dimension reported 65,536 slots, refused an additional allocation when full, and reused released slots.storage_full. A sampled-only allocation immediately succeeded at index 4,096 in each dimension. The 50 refused handles read the expected fallback, and the probe reported zero mismatches and zero validation errors.This also checks the storage-exhaustion diagnostic on NVIDIA while sampled slots are still available.
Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-27T13:18:31Z.