fix(gpu,shader): support VICTORY_PORT_CBV=1 on capped 1M-descriptor GPUs (raw_views == 0) and fix subword raw CBV load #3396
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3396
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3396"
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?
@qlfu on GitHub · 2026-11-29 22:46 UTC · original
qlfu:pr/fix-port-cbv-nvidia-direct-raw-srv→main· +237 −23 · 3 files · 1 commits · openSummary
Enables Renderer Port #5 (
VICTORY_PORT_CBV=1) on capped 1,000,000-descriptor view heaps whereraw_views() == 0(raw_twins=false— all NVIDIA RTX 20/30/40/50 GPUs), and fixes a latent subword raw-CBV lowering bug:victory-shader/src/emit/lower.rs:raw_views() == 0early-out inconstants_raw()and dynamicstride == 0loads so table/heap constant buffers lower to raw SRV loads directly from slotindex(raw_twinalready returns(index, false)whenfirst == 0).load_subwordinbuffer_loadonResourceType::Cbv(lower.rs) to read viaraw_dwordsinstead ofcbuffer_dwordwhenraw.is_some().victory-gpu/src/descriptor/host.rs:constant_raw_at,constant_at,make_twinned(constant_raw_direct), andnull_forto create raw SRVs directly atself.at(index)whenport_cbv::on() && raw_views() == 0, and useskeep_refinconstant_raw_atto avoid redundant COMAddRef/Release.victory-shader/src/emit/mod.rs):table_constant_buffers_read_as_raw_bytes_directly_without_raw_twins(raw_views = 0,constants_raw = true).Measured Results (90s Series X 1440p DLSS Balanced, RTX 4070 Ti,
0 W / 0 E)003719.log):0table CBVs in place,14,999rejected (raw_twins=false).010414.log):13,902–17,848table CBVs/frame (6.5–8.56 MB) read in place,0rejected for alignment,181–260title heap CBVs,copies_fills3.10 -> 1.40 ms(-1.70 msCPU).VICTORY_PORT_CBV=1), as on RTX Ada reading CBVs viarawBufferLoadover PCIe bypasses the L1 Constant Cache (cardmeter32.6 -> 40.0 ms), making it primarily useful on CPU-bound/lower-resolution configurations or future VRAM-placed constant heaps.Verification
git merge-tree --write-tree origin/main pr/fix-port-cbv-nvidia-direct-raw-srv: exit0cargo +1.98.1-x86_64-pc-windows-msvc test -p victory-shader --lib --locked -- table_constant_buffers_read_as_raw_bytes: 2/2 pass (WARP D3D12)cargo +1.98.1-x86_64-pc-windows-msvc test -p victory-gpu --lib --locked -- constant_buffer_raw_twins --test-threads=1: passcargo +1.98.1-x86_64-pc-windows-msvc xtask policy --staged: pass@dyshay on GitHub · 2026-11-30 03:12 UTC · original
Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch
janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with--profile diag --features diagnostics. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.View 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.