GPU: limit staged constant-buffer uploads to 64 KiB #104

Open
github-bot wants to merge 2 commits from github-bot/gh-104 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-11-24 21:30 UTC · original
avt0m4t48:fix/limit-cbv-staging → main · +23 −0 · 2 files · 2 commits · open

Refs #72 and #24. A staged constant-buffer view uses at most 64 KiB on desktop D3D12. Limit the scratch allocation and deferred copy to those source bytes, before the existing 256-byte alignment. This also avoids copying the unused tail for the 2,785,536-byte descriptor in #72. The staged copy for that size is 2,720,000 bytes smaller. Measured frame time and title results remain open.

The size regression covers small and unaligned requests, the 64 KiB boundary, the reported size, and u32::MAX. An isolated Linux run of the exact Rust regression passed and reproduced a boundary failure without the cap. Windows-target Clippy from Linux with diagnostics and the pure Rust blake3 feature passed with warnings denied. Asset policy passed. The fork's unrelated non-Windows GPU crate compile errors block running that crate's full suite locally.

Separately, a native WARP debug-layer probe reproduced the invalid 2,785,536-byte view and accepted a 64 KiB view of the same allocation. WARP confirmation

AI-assisted using Codex. Source-built inputs only.

**@⁠avt0m4t48** on GitHub · 2026-11-24 21:30 UTC · [original](https://github.com/fxceless/victory-fork/pull/104) `avt0m4t48:fix/limit-cbv-staging` → `main` · +23 −0 · 2 files · 2 commits · open Refs #72 and #24. A staged constant-buffer view uses at most 64 KiB on desktop D3D12. Limit the scratch allocation and deferred copy to those source bytes, before the existing 256-byte alignment. This also avoids copying the unused tail for the 2,785,536-byte descriptor in #72. The staged copy for that size is 2,720,000 bytes smaller. Measured frame time and title results remain open. The size regression covers small and unaligned requests, the 64 KiB boundary, the reported size, and `u32::MAX`. An isolated Linux run of the exact Rust regression passed and reproduced a boundary failure without the cap. Windows-target Clippy from Linux with diagnostics and the pure Rust `blake3` feature passed with warnings denied. Asset policy passed. The fork's unrelated non-Windows GPU crate compile errors block running that crate's full suite locally. Separately, a native WARP debug-layer probe reproduced the invalid 2,785,536-byte view and accepted a 64 KiB view of the same allocation. [WARP confirmation](https://github.com/avt0m4t48/victory-fork/actions/runs/45490999448) AI-assisted using Codex. Source-built inputs only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:36:12 +00:00
github-bot referenced this pull request from a commit 2026-11-26 03:40:07 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 12:54 UTC · original

Updated this branch through main 0b0074e and reran the staged-prefix regression on Windows Server 2025. It passed at ee443cd, including the 64 KiB boundary and oversized input cases. The MSVC-target Rust check and asset policy passed. The change covers staging allocation and copying, alongside the direct descriptor work in #911. Windows run

AI-assisted.

**@⁠avt0m4t48** on GitHub · 2026-11-25 12:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/104#issuecomment-7163018036) Updated this branch through main `0b0074e` and reran the staged-prefix regression on Windows Server 2025. It passed at `ee443cd`, including the 64 KiB boundary and oversized input cases. The MSVC-target Rust check and asset policy passed. The change covers staging allocation and copying, alongside the direct descriptor work in #911. [Windows run](https://github.com/avt0m4t48/victory-fork/actions/runs/45617525314) AI-assisted.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/104/head:github-bot/gh-104'
git switch 'github-bot/gh-104'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-104'
git switch 'github-bot/gh-104'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-104'
git switch 'github-bot/gh-104'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-104'
git switch 'main'
git merge --squash 'github-bot/gh-104'
git switch 'main'
git merge --ff-only 'github-bot/gh-104'
git switch 'main'
git merge 'github-bot/gh-104'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.