GPU: support 24-bit depth twins and per-plane active UAV tracking #1964
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1964
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1964"
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?
@nathanbzrr on GitHub · 2026-11-25 01:49 UTC · original
nathanbzrr:gpu/depth-twin-24bit-and-active-planes→main· +1121 −80 · 2 files · 1 commits · openSummary
44..=47(R24G8_TYPELESS/D24_UNORM_S8_UINT/R24_UNORM_X8_TYPELESS/X24_TYPELESS_G8_UINT) incrates/victory-gpu/src/twin.rsusing anR32_TYPELESSplane-0 twin (R32_FLOAT/R32_UINTUAVs) and in-placeConversion::F32ToD24scratch conversion (mode = 1).f32_to_d24andd24_to_f32inSOURCEusing bit-exact pure-integer IEEE-754 arithmetic instead ofround(f * 16777215.0)/d / 16777215.0, avoidingf32double-rounding, dropped[precise]flags underD3DCompile, and ~1 ULP DXBCdivinaccuracies across all2^{24}D24values on both RX 7600 and WARP.uav_planes,plane_newer,pending_to_depth,pending_to_twin,Use::{first, last}: [_; 2]) so inactive stencil/depth planes skip barriers and copies and unseeded planes never clobber the depth texture when a UAV is created later.twin::tests(f32_d24_round_trips_every_24bit_value,f32_d24_converter_is_bit_exact_on_gpu,per_plane_tracking_never_clobbers_inactive_or_unseeded_planes,r24g8_depth_twin_round_trips_depth_and_stencil_on_gpu,active_planes_skip_inactive_stencil_and_preserve_depth_stencil_on_late_uav).Verification
All checks passed after the final edit to
crates/victory-gpu/src/twin.rs:cargo clippy --workspace --all-targets -- -D warnings: passed (0 warnings)cargo clippy --workspace --all-targets --all-features -- -D warnings: passed (0 warnings)cargo test -p victory-gpu twin --locked: 6 passed, 0 failed (137 filtered out)cargo test -p victory-gpu --all-features twin --locked: 6 passed, 0 failed (140 filtered out)VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --all-features twin --locked: 6 passed, 0 failed (140 filtered out, 0 debug layer errors)VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --all-features twin --locked: 6 passed, 0 failed (140 filtered out)VICTORY_WARP=1 cargo test -p victory-gpu twin --locked: 6 passed, 0 failed (137 filtered out)cargo test --workspace --locked: all workspace unit/integration/doc-test suites passed (0 failed; 10 ignored benchmark/external-asset/defect tests acrossvictory-formats,victory-gpu, andvictory-shader)cargo run -p xtask -- policy --staged:asset policy: 1 files ok(crates/victory-gpu/src/twin.rs)7c601376f3to8cf20a6378@upipibi on GitHub · 2026-11-25 01:54 UTC · original
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
74e4668.victory-shader: 226 passed, with only #1744's 3 NVIDIA failures.victory-gpu: 139 passed, 2 failed, with only the two NVIDIA heap-cap failuresmainalso has (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views). Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 08:23 UTC · original · edited 2026-11-26 04:22 UTC
Automated triage for the maintainers.
Needs work. Since
7c60137the only change is a small refactor (routereadstwin.active_planes()once;depth_planesbecamedepth_plane_countintwin.rs/host.rs), which reads correctly. The main point from the last review is still open: nothing shows that the title writes a 24-bit depth texture (console formats 44..=47) through an unordered view, or that copying whole twins including an untouched stencil plane costs or breaks anything, and the change is still about 1,100 lines intwin.rs. A run onmainshowing such a UAV write, or frame-report copy counts with and without per-plane tracking, would move it forward; splitting the 24-bit twin support from per-plane tracking would help too.CI: passing.
Generated by Claude Code
@nathanbzrr on GitHub · 2026-11-25 22:07 UTC · original
Rebased onto
origin/main(f3578e3, new headeb888a3), resolving the merge conflicts incrates/victory-gpu/src/twin.rs:origin/main(98c654b) for118..=12016-bit depth conversion to/from 32-bit float depth (Conversion::U16ToF32,mode == 0with0x37800080andu16) alongside#1964'sConversion::F32ToD24(mode != 0) for44..=4724-bit depth twins and per-plane active UAV tracking.#2162's shared scratch buffer pool (shared_scratch) and#1273/315cea1'sprelude_copies_start_from_the_real_statestest alongside all five#1964tests.transition_title_barrierto borrow&texfor the ownedID3D12Resourcereturned byHostList::transition(69d1e8e).Verification (
eb888a3)cargo run -p xtask -- policy->186 files okcargo clippy -p victory-gpu --all-targets --locked -- -D warnings&--all-features-> cleancargo test -p victory-gpu --lib --locked -- twin::tests --test-threads=1->7 passed; 0 failedcargo test -p victory-gpu --lib --locked -- a_depth_texture_written_through_unordered_views_reads_as_depth --test-threads=1->1 passed; 0 failedVICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --lib --locked -- twin::tests --test-threads=1->7 passed; 0 failedVICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --lib --locked -- a_depth_texture_written_through_unordered_views_reads_as_depth --test-threads=1->1 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.