GPU: unbind vertex buffer slots for null view arrays #681

Manually merged
github merged 1 commit from gh-pr/681/head into gh-pr/681/base 2026-11-26 04:12:48 +00:00
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 06:43 UTC · original
fuzeofficlal:fix/vertex-buffer-null-unbind → main · +11 −1 · 2 files · 1 commits · merged 2026-11-24 08:22 UTC

Problem

The vertex-buffer command turns a null view pointer into an empty slice. With a nonzero count this leaves the previous buffers bound in those slots. The D3D12 binding spec defines a null view pointer and a zero-sized buffer view as unbound. D3D12 resource binding specification

Change

Clear the recorded slots covered by the null binding. The ordinary draw path materializes their zero-sized views.

Verification

  • A synthetic draw binds two slots, then calls the normal vertex-buffer command with StartSlot=1, NumViews=1, pViews=null. On RTX 5090 and WARP, the baseline leaves the old green component in all 16 pixels. The patch reads back the expected [0.5, 0, 0.25, 1] in all 16, with slot 0 still contributing red.
  • Explicit zero-sized native views provide the reference on both adapters. The direct native null-pointer call cleared on WARP and retained the old input on this RTX driver. The patch matches the explicit-view control on both.
  • The normal bound and count-zero controls passed. The diagnostics GPU suite reported 45 passed and one existing benchmark ignored per adapter. The asset policy check passed.

All input data was synthetic.

**@⁠fuzeofficlal** on GitHub · 2026-11-24 06:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/681) `fuzeofficlal:fix/vertex-buffer-null-unbind` → `main` · +11 −1 · 2 files · 1 commits · merged 2026-11-24 08:22 UTC ## Problem The vertex-buffer command turns a null view pointer into an empty slice. With a nonzero count this leaves the previous buffers bound in those slots. The D3D12 binding spec defines a null view pointer and a zero-sized buffer view as unbound. [D3D12 resource binding specification](https://microsoft.github.io/DirectX-Specs/d3d/ResourceBinding.html#setting-ibvbsortds-on-a-command-list-or-bundle) ## Change Clear the recorded slots covered by the null binding. The ordinary draw path materializes their zero-sized views. ## Verification - A synthetic draw binds two slots, then calls the normal vertex-buffer command with `StartSlot=1, NumViews=1, pViews=null`. On RTX 5090 and WARP, the baseline leaves the old green component in all 16 pixels. The patch reads back the expected `[0.5, 0, 0.25, 1]` in all 16, with slot 0 still contributing red. - Explicit zero-sized native views provide the reference on both adapters. The direct native null-pointer call cleared on WARP and retained the old input on this RTX driver. The patch matches the explicit-view control on both. - The normal bound and count-zero controls passed. The diagnostics GPU suite reported 45 passed and one existing benchmark ignored per adapter. The asset policy check passed. All input data was synthetic.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:12:47 +00:00
github manually merged commit 31ce30f169 into gh-pr/681/base 2026-11-26 04:12:48 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!681
No description provided.