victory-gpu: keep depth-twin UAVs in concrete UAV formats and support default views #1933
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!1933
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1933"
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?
@mgunes1311-lab on GitHub · 2026-11-25 01:10 UTC · original
mgunes1311-lab:gpu-twin-uav-formats→main· +326 −22 · 1 files · 4 commits · openSummary
Fixes D3D12 UAV format validation and default/1D view handling in
victory_gpu::twin::uavwhen creating unordered access views on writable depth-texture twins:twin::uavcheckedfamily(view) == own, whereownisDXGI_FORMAT_R32_TYPELESS(39),DXGI_FORMAT_R16_TYPELESS(53), orDXGI_FORMAT_R8_TYPELESS(60). BecauseD32_FLOAT(40),D16_UNORM(55), and the*_TYPELESSformats themselves belong to those families,twin::uavpassed them directly intoID3D12Device::CreateUnorderedAccessView, which rejects depth and typeless UAV formats and puts the host D3D12 device intoDEVICE_REMOVED.uav_formatnow maps depth, typeless, andDXGI_FORMAT_UNKNOWN(0, inheriting the title resource's format) views to the plane's concrete UAV format (R32_FLOAT,R16_UNORM, orR8_UINT), preserves explicit UAV-capable formats in the plane's family (R32_UINT,R32_SINT,R16_FLOAT,R16_UINT,R8_UNORM, etc.), and classifies planar stencil formats (X32_TYPELESS_G8X24_UINT,X24_TYPELESS_G8_UINT) as integer.pDesc == nullptr) and 1D / 1D-array depth UAVs:twin::uavpreviously bailed out onwords = Noneand rejectedTEXTURE1D(2) /TEXTURE1DARRAY(3). It now synthesizes default mip-0 plane-0 view words (covering all slices on array resources) whenwordsisNoneand handles 1D / 1D-array UAV dimensions on plane 0.Verification
VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --all-features --target x86_64-pc-windows-msvc --locked -- twin(unit tests for format/default-descriptor mapping + end-to-end D3D12 compute dispatch writing throughD32_FLOAT,R32_TYPELESS,DXGI_FORMAT_UNKNOWN, 1DD16_UNORM, and null-pDesc2D-arrayD16_UNORMdepth UAVs and reading back the copied host depth subresources)cargo clippy --workspace --all-targets --target x86_64-pc-windows-msvc --locked -- -D warnings(default and--all-features)cargo doc --workspace --no-deps --target x86_64-pc-windows-msvc --lockedcargo run -p xtask --target x86_64-pc-windows-msvc --locked -- policy --staged&cargo test -p xtask --target x86_64-pc-windows-msvc --locked@upipibi on GitHub · 2026-11-25 01:44 UTC · original
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
c2a3624.victory-shader: 243 passed, with only #1744's 3 NVIDIA failures.victory-gpu: 141 passed, 2 failed, with only the two NVIDIA heap-cap failuresmainalso has. Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 08:19 UTC · original · edited 2026-11-25 18:25 UTC
Automated triage for the maintainers.
Merge candidate. In
twin::uav(crates/victory-gpu/src/twin.rs),mainkeeps the title's view format wheneverfamily(view) == own.resource::familymapsD32_FLOAT(40) to 39 andD16_UNORM(55) to 53, so a depth-typed or typeless format can reachCreateUnorderedAccessViewtoday, and D3D12 does not accept those for UAVs. The newuav_formatexcludes 39/40/53/55/60 and resolvesUNKNOWNthroughpc_format(console). I checked its fallbacks against the plane formats fromplane_formats.default_uav_wordsfills in the null-description case with the D3D12 UAV layout (1D: mip, then first slice and size for arrays; 2D arrays: size in word 4). 1D views correctly use plane 0.Small notes, none blocking:
default_viewcheck that the non-depth path indescriptor/host.rsruns.integer()turns a stencil-typed view on the depth plane intoR32_UINT.CI:
checkpassing.Generated by Claude Code
@mgunes1311-lab on GitHub · 2026-11-25 16:52 UTC · original
Merged
main(67e8ae1) to resolve the test conflict incrates/victory-gpu/src/twin.rsalongside98c654band315cea1.@mgunes1311-lab on GitHub · 2026-11-25 16:55 UTC · original
Merged
main(67e8ae1) to resolve the test conflict incrates/victory-gpu/src/twin.rsalongside98c654band315cea1.@catminou4 on GitHub · 2026-11-25 02:10 UTC · original · reviewed
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Depth-twin UAVs kept in concrete UAV formats: format-concrete UAV fix for depth twins — pairs with #1964's 24-bit depth twins.
@fuzeofficlal on GitHub · 2026-11-26 18:48 UTC · original · approved these changes
Reviewed
e5750d906995merged cleanly onto63bcca43.The changes in
crates/victory-gpu/src/twin.rscleanly prevent device removal on depth-typed/typeless/default depth-twin UAVs and extend support to 1D/1D-array views:uav_format(twin.rs:306-321) &integer(twin.rs:324-329): Correctly resolvesDXGI_FORMAT_UNKNOWN (0)through the resource's console format andpc_format, rejects typeless (39,53,60) and depth (40,55) members even when they match the twin plane's family, and falls back to concrete UAV-capable formats (R16_UNORM/R16_UINT,R32_FLOAT/R32_UINT,R8_UINT), with planar stencil formats (22 | 47) classified as integer.default_uav_words(twin.rs:285-298) & 1D view handling (twin.rs:247-275): Word layout matchesD3D12_UNORDERED_ACCESS_VIEW_DESCacrossTexture1D,Texture1DArray,Texture2D, andTexture2DArray(slices > 1selects array views withArraySizeat word 4), and leavingplane_word = Nonefor 1D/1D-array views avoids clobberingFirstArraySliceat word 3.Hardware & D3D12 Debug Layer verification (RTX 5090 + Microsoft WARP,
VICTORY_D3D12_DEBUG=1):cargo xtask policyandcargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--all-features) pass cleanly.cargo test --locked -p victory-gpu twin::tests:: -- --test-threads=1passed 4/4 on both RTX 5090 and WARP underVICTORY_D3D12_DEBUG=1.D32_FLOAT_S8X24_UINT (20),R32G8X24_TYPELESS (19),D16S8 (118), and 1D/1D-arrayD32_FLOAT (40)(defaultNone, explicit plane 0 & plane 1 with typeless/depth/stencil/concrete formats, 1D-array with non-zeroFirstArraySlice, plus out-of-range plane 2 cleanly returningNone):GetDeviceRemovedReason().is_ok()andhost.log_messages() == Noneon both RTX 5090 and WARP.#1803(7c609deb480f) on63bcca43withtwin::tests::andlist::tests::passing underVICTORY_D3D12_DEBUG=1on both adapters.LGTM.
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.