GPU: drop commands when the fallback sampler heap is unavailable #3554
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3554
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3554"
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?
@pablogonz12 on GitHub · 2026-11-27 17:24 UTC · original
pablogonz12:fix/sampler-fallback-failure→main· +40 −4 · 1 files · 1 commits · openSummary
When the title binds no sampler heap and the fallback heap cannot be created,
bind_heapscurrently warns but still callsSetDescriptorHeapsand caches the incomplete binding. Draws and dispatches can then use a root signature that directly indexes a missing sampler heap.I stop the binding before the D3D12 call, leave the cached heaps unchanged, and drop the draw, dispatch or unordered clear instead of recording it. I added a thread-local test injection for the allocation failure.
Evidence
missing_fallback_sampler_does_not_record_heap_bindingfails on63bcca43with one incomplete heap bind; after: it passes and checks that no bind was recorded and the cache was not updated.victory-gputests under Proton: 229 passed, 3 failed, 1 ignored. The same three failures reproduce on63bcca43with the same setup:a_texture_written_in_one_format_reads_in_another_through_a_placed_view,a_rejected_blob_gives_an_empty_library, andpipelines_load_on_many_threads_at_once.cargo xwin clippy -p victory-gpu --all-targets --target x86_64-pc-windows-msvc -- -D warnings: passed.Tested on RX 9070 XT / RADV under Proton; not tested on NVIDIA hardware. No game run.
Merge Danger
Door: Two-way. Blast radius: Draws, dispatches and unordered clears when fallback sampler creation fails; those operations are dropped instead of being recorded with an invalid heap binding.
@oni-swr on GitHub · 2026-11-27 18:11 UTC · original
Independent verification of
532ddb1c(basemain63bcca43; the PR is a single branch off that base). AI-assisted (Claude Sonnet 5.5); claim: #1633.VICTORY_WARP=1,VICTORY_D3D12_WARP=1,--features diagnostics), dxil.dll from Windows SDK 10.0.26100.0. No physical GPU used.cargo test -p victory-gpu --lib: main63bcca43= 246 passed, 0 failed, 1 ignored. PR head = 247 passed, 0 failed, 1 ignored. The newdraw::tests::missing_fallback_sampler_does_not_record_heap_bindingpasses on WARP.cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings: clean.Review notes (no blockers found):
bind_heapscallers now stop on failure, sohost_heapsis not recorded as bound after a failed fallback. The early return inbindhappens aftertake_rebind()has already zeroed the cached pipeline/root, which is the safe direction.fallback_samplers()is aOnceLock, so a creation failure is permanent for the process: every draw that needs it will be dropped from then on, with oneonce!log line. That seems the intended behaviour, but the PR does not show how often it can happen on real hardware. Unproven.@futurepro62 on GitHub · 2026-11-27 21:35 UTC · original
NVIDIA full-suite run, to go with the reports above by oni-swr, since none of them names a GPU run. Tested exact head
532ddb1(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 867 passed, 0 failed, 10 ignored.missing_fallback_sampler_does_not_record_heap_binding.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.