gpu, shader: add opt-in raw-byte table constant buffer reading (VICTORY_PORT_CBV) #404
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/trustno1-coder--VIctory-NVIDIA!404
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-404"
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?
@Kikoarl on GitHub · 2026-11-27 21:55 UTC · original
Kikoarl:feat/port-cbv→main· +685 −7 · 9 files · 1 commits · openSummary
Ports opt-in raw-byte constant buffer reading (
VICTORY_PORT_CBV=1, off by default) fromcool_foxcommitfad4e53(GPL-3.0-or-later), rebased ontomain(df2daaf).Changes
crates/victory-shader/src/emit/{lower.rs, mod.rs, shader.rs}: Addsconstants_raw()(VICTORY_PORT_CBV=1) to lower table constant buffer loads as raw-byte reads through the slot's raw twin and switch root constant buffers to root SRVs (root_srvsinstead ofroot_cbvs).crates/victory-gpu/src/{descriptor/host.rs, draw.rs, host.rs, lib.rs, port_cbv.rs, shader_cache.rs}:port_cbv.rs(constant_descs,constant_twinned), checking 16-byte alignment and buffer bounds for raw twins (VICTORY_PORT_CBV_PLACE=0keeps copying instead of in-place reading while still reading via the raw twin).VICTORY_PORT_CBV=1into shader cache metadata only when enabled so cached translations without the flag remain valid, and logs per-frame in-place vs copied counts.Verification
Verified on Windows (
x86_64-pc-windows-msvc) againstmain(df2daaf):git diff --check main..HEAD— cleancargo test -p xtask --locked— 6 passed, 0 failed (asset policy: 287 files ok)cargo clippy -p victory-gpu -p victory-shader --all-targets --locked— exit 0, 0 warnings in changed files (mainhas pre-existing clippy warnings in untouched files)cargo test -p victory-shader --locked constant_buffer— 2 passed, 0 failedcargo test -p victory-gpu --locked descriptor::— 62 passed, 0 failedcargo test -p victory-gpu --locked port— 13 passed, 0 failedcargo test -p victory-gpu --locked shader_cache— 2 passed, 0 failedView 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.