D3D12.X: unbind vertex buffer slots when views is null #1151
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1160"
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 ivall/xcl. Originally posted by WTactic on 2026-11-24T12:41:54Z.
When
IASetVertexBufferswas called withviews == NULL, the call was forwarded to the native command list, but the list's tracked bindings (vertex_buffersandvertex_titles) retained the old views. Later state restores (restore_bindings) would then resurrect the unbound vertex buffers.Purge unbound slots (
start..start + n) from bothvertex_buffersandvertex_titleson null view arrays, and remove slots whose view has a zero location or size. Add a unit test verifying unbinding and thatrestore_bindingsdoes not replay cleared slots.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: purge unbound vertex buffer slots on null views or zero sizes, and unit testnull_vertex_buffer_unbinds_slots_and_does_not_restore_them.Tested
rustc 1.97.1, release/debugcargo test -p xcl --lib null_vertex_buffer_unbinds_slots_and_does_not_restore_them: 1 passed, 0 failedRegression run
main(1d027e5):PR (
54ece90):Not tested
AI use
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T12:52:30Z.
Regression run for this PR: head
dccd28e, based onmain47efa2e. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s.Tested
cargo test -p xcl --release --lib -- null_vertex_bufferondccd28e: 1 passed, 0 failed.main
47efa2e:this PR:
No device removals or crashes; 96 % of main's frames, 107 % of its peak commit.
Not tested: the whole suite; whether the title reaches the changed path in these 60 s.
Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by bjarngard on 2026-11-24T13:48:03Z.
Test report for head
dccd28e(AMD)Tested
XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPEDnull_vertex_buffer_unbinds_slots_and_does_not_restore_thempassed when run alone on the AMD adapterNot tested: retail titles (no smoke run), RDNA3/RDNA4.
AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T14:21:26Z.
A regression run under Wine on Linux, on a retail title.
Tested
x86_64-pc-windows-gnu.dccd28eas it is (merge base47efa2e) andmain47efa2e, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Twelve runs in a row,mainfirst and last, other PRs in between.Regression run
main (first run):
this PR:
The last
mainrun: 1425 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:02:11Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:52:38Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:42:27Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:57:16Z.
Triage (#1607) – head
54ece90No open or merged PR makes the same change; main's ia_set_vertex_buffers_x in list_x.rs still returns early on views == NULL without clearing vertex_buffers / vertex_titles, so restore_bindings re-binds slots the title unbound.
One point to check: the zero-view test uses the translated view (after gpu_va / view_bytes), so a real buffer clipped to 0 bytes by view_bytes is now dropped from the restore set instead of being re-bound with size 0. The effect should be the same, but it is a behaviour change.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.