Repository navigation
Conversation
|
Native Windows check, AI-assisted (Claude Code). Windows 11, i9-13900K, 64 GB, RTX 4070 Ti 12 GB (NVIDIA 630.20), MSVC 2022 (VS 17 generator, Release), Vulkan. Head
3 passed, 1 skipped, 0 failed. |
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Audited and verified. Increases bindless descriptor bounds (16384 for 2D arrays, 4096 for 3D/1D) and implements multi-tier memory pressure degradation (host-visible fallback, in-place table rewrites, and degraded table reuse retaining prior GPU generations) in
untime/src/vulkan_bindless.h. Verified in
untime/test/vk_bindless_grow_test.cpp. Approved.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Clean-Room Audit — PR #1092 (RT-BINDLESS-TABLE-DEGRADE)
Thoughtful resilience upgrade in vulkan_bindless.h and d3d12_vulkan_device.cpp: expands bindless limits (16,384 2D / 4,096 3D & 1D) and gracefully handles allocation pressure via generation flushes, host-visible fallback, and retaining a valid bindless table rather than aborting submissions. Covered by vk_bindless_grow_test.cpp; 0 game data.
Verdict: APPROVED
|
Concrete correctness follow-up: a degraded flush currently still applies and clears Reproduction added in Fix branch (stacked on this PR, not opened against main to avoid duplicating its diff): https://github.com/bobcatchris/leonida-public/tree/fix/bindless-degrade-live-keys, commit Verified on RX 7900 XTX / 32.0.32029.2010 / Windows 11 with |
|
AMD run (the gap the description lists): RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (LLPC, Vulkan 1.4.359), Windows 11, MSVC 2022 RelWithDebInfo. Head |
4247b21 to
1f0e69d
Compare
|
@bobcatchris thank you for the reproduction and the patch. I ran both here. I am not taking Reproduced. RTX 4070, NVIDIA 620.73.04, CachyOS, The D3D12 layer does not make that sequence. It never removes an index whose key is live:
Keeping the writes pending is unsafe for that caller.
Measured, and now in this PR's test. The sequence is already in the test:
A validation run cannot show this in Narrower variants. Delaying only the writes at indices the retained table can still name selects the removed indices, the ones whose views are gone, so it has the same problem. The writes that could wait safely are those at new indices from
Not run here: the validation layer (not installed on this machine), native Windows, AMD. I did not rerun AI-assisted (Claude Code). 🤖 Generated with Claude Code |
|
GPU verification (AI-assisted, independent worker on the shared test box) — head Host/device tests (
GPU suite
Verdict: PASS — the new degrade/hold path is exercised cleanly on both GPUs including under validation; the only failures are pre-existing on main (AMD push-constant cap for the two d3d12 churn tests, LLPC mesh-shader crashes in the suite). |
|
@whoalin1 thank you, especially for the AMD run under For anyone reading the results: they are for AI-assisted (Claude Code). |
…LE-DEGRADE) A failed table replacement used to refuse the entire submission. Retry after releasing completed generations, use host memory or rewrite an idle table when it fits. While a valid older table is in use, defer its edits and keep freed indices reserved. Size the single-sample image arrays from the device limits. Build the runtime and test table sizing, allocation failures and recovery. Restore the old refusal in the pressure test to reproduce the regression. The pressure test also checks after every flush that the current set names no destroyed view: a removed image's descriptors go back to the fallback even when the flush keeps the old table. AI-assisted (Codex and Claude Code agents). Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1f0e69d to
84de57c
Compare
|
Rebased onto AI-assisted. |
Claimed in the coordination issue as: RT-BINDLESS-TABLE-DEGRADE (claim).
Part of the split of #984 into small pull requests.
Depends on: none
Overlaps: #984 contains the integration. #425 covers descriptor-set
recycling and its pool budget. This child can land independently of it.
What and why
Under device-local memory pressure, a bindless table rebuild could fail
and cause ExecuteCommandLists to refuse the whole submission. The smaller
sampled-image arrays could also fill during streaming.
A replacement table can use coherent host-visible memory. If allocation
fails, the runtime releases completed generations and retries. An idle
table can be rewritten in place if it still fits. When those paths fail,
work can use the last table submitted to the GPU. New keys resolve to the
fallback and removed indices stay reserved until the table catches up.
The first upload must reach the queue before any submission can use this
fallback. Device loss still propagates.
Device limits now permit up to 16,384 sampled 2D-array images and 4,096
each for 3D and 1D. The existing layout and per-stage limits still apply.
Tested
Release cross-build with clang-cl 23.1.5 and an xwin SDK on CachyOS,
kernel 7.3.5. Runtime tests used Proton Experimental (Wine 11), a Ryzen
5 5600X, 16 GB RAM and an RTX 4070 12 GB with NVIDIA 620.73.04. CMake
omitted the optional XMA2 decoder because the Rust Windows target was
unavailable.
The sizing test passed, with 152,929 descriptors on synthetic RTX
5070-like limits. The GPU pressure test passed 41/41 checks. It observed
one host-memory fallback, one idle rewrite and two degraded flushes, then
recovered to a 256-slot table. It also rejected a first upload under
pressure, a discarded upload and a simulated device loss.
D3D12 churn passed all four runs. Each compared 98,304 texels over 96
frames on direct and compute queues, with zero mismatches. The two
deferred-retirement runs each made three generations and recorded zero
device-idle waits. The two legacy runs each recorded three waits.
The semantic suite passed 6,168 tests across 470 files. The content and
whitespace checks passed.
Review round 1. A review proposed keeping descriptor writes pending
across a degraded flush, so that a key rebound while the old table is
kept does not find the fallback. That is not taken: the device destroys
a removed texture's views right after
remove_image, so a removedimage's descriptors must go back to the fallback at the next flush even
when that flush keeps the old table. Otherwise a key the old table still
maps to that index finds a destroyed view. The pressure test now records
what every image descriptor names and checks after each flush that the
current set names no destroyed view. It passes 50/50 checks on this head
(41 before the new checks), natively on Linux and as a Windows program
under Wine 11.22, on an RTX 4070 (NVIDIA 620.73.04). With pending writes
kept, it exits 1 at the removal between the two degraded flushes: the
current set's binding 0, element 256 names a destroyed view. The runs
described above and below were made on the head before this round; only
the test file changed since.
For the control, rebuild the GPU pressure test with only the previous
refusal restored. Change the guard in BindlessSet::flush from
!written && must_replace && !table_on_gpu_to!written && must_replace. Link with the same flags and run the sametest. The control passed 17 checks and stopped at check 18 with exit 1:
the busy flush refused the submission. The remaining 23 checks did not
run in this control.
The sizing control omits the three new calls to grow the 2D-array, 3D
and 1D bindings. It passed the first five checks, then exited 1 at the
first check for the larger sampled-image arrays.
Two integration runs on Windows 11 (i9-13900K, RTX 4070 Ti, NVIDIA
630.20) used host memory and continued without refusing a batch. Neither
run exercised a degraded flush. This standalone child was not run on
native Windows, AMD or Intel, with validation layers, or in a game boot.
GPUs tested: NVIDIA GeForce RTX 4070.
AI-assisted: yes
Checklist
🤖 Generated with Claude Code