GPU: a constant buffer view of no bytes stays one (2ba6e1f made it 256 bytes of the host copy: a flickering floor) #1260
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1260
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1260/head"
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?
@LeonardoS11 on GitHub · 2026-11-26 04:23 UTC · original
LeonardoS11:fix/cbv-no-bytes→main· +7 −1 · 1 files · 1 commits · merged 2026-11-26 05:16 UTCWhat
constant_view_size()(2ba6e1f, the 64 KiB cap from fork PR #911; kept bya183ea2) roundssize.max(1)up to 256. For every size from 1 to 65,536 that is what it did before the cap. For size 0 it is not: before2ba6e1fa view the title names withSizeInBytes0 was made with 0 bytes and a shader read zeros through it; since then it is a 256-byte view of whatever lies at its address in the host copy, the ring of per-draw constants among it, so other bytes every frame.This PR drops the
max(1): the cap stays as it is, a view of no bytes stays one. Two asserts added to the existing test (0 -> 0, 1 -> 256).What it looks like
In the first room of the prologue (Series S profile), the courtyard floor seen through the window flickers between two looks, every run. The "over 64 KiB" line never fires in these runs, so the cap itself never acts there; the size-0 case is the only one the commit changes for them.
How it was found
By eye, on an RTX 3080 Ti 12 GB, Windows 11 26200, Series S profile, 300 s runs, same switches throughout, over an integration branch (main plus some open PRs):
32b31f7..006c353(3 builds)VICTORY_VIDEO_LOOK=0)96ff135d03859a2ba6e1f(2 builds)2ba6e1fand this changeWith this change and a line added for the occasion, the title does make such a view in that room (
size=0, once a run is enough to see it).Not done
2ba6e1f, and NVIDIA takes it (no device removal in our runs).🤖 Generated with Claude Code
2ba6e1fmade it 256 bytes of the host copy; a floor flickered) 619b2dc5c4@Ym1r1710 on GitHub · 2026-11-26 04:42 UTC · original
Tried this on an RTX 5080 (Series X profile, first room): two runs with the change, no device loss, no new refused pipelines, frame time same as before (102.6 / 103.8 ms median vs 100.7 / 101.0 without). So zero-byte CBVs don't seem to bother NVIDIA here. I only sample every 16th frame so I can't say much about the flicker itself, but the courtyard through the window looked the same in both.