Skip to content

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

Open
avt0m4t48 wants to merge 2 commits into
fxceless:mainfrom
avt0m4t48:fix/limit-cbv-staging
Open

avt0m4t48 wants to merge 2 commits into
fxceless:mainfrom
avt0m4t48:fix/limit-cbv-staging

Conversation

@avt0m4t48

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Author

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.

PiloteCode added a commit to PiloteCode/victory-fork that referenced this pull request Nov 25, 2026
…celess#24/fxceless#104), null CBVs (fxceless#304), tables at list cuts (fxceless#742), heap entries (fxceless#589), barriers (fxceless#787), depth-stencil UAV barriers (fxceless#214), windows ending at recorded writes (fxceless#663), sRGB views (fxceless#644), wide accesses across pages (fxceless#846), view-guard costs (fxceless#812/fxceless#853), the fill latch (fxceless#860), pipeline waits (fxceless#709), robustness; opt-in fxceless#868/fxceless#845
deynesdev referenced this pull request in deynesdev/Protonida Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant