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!970
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-970"
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?
@pushkarreddyy on GitHub · 2026-11-24 14:36 UTC · original
pushkarreddyy:fix/gpu-typeless-srv-aspect-aware→main· +254 −25 · 2 files · 1 commits · openFixes #882, #876.
Root Cause
On
main,fits()incrates/victory-gpu/src/descriptor/host.rsleaves typeless view formats (_TYPELESS) untouched when creating SRVs/UAVs on_TYPELESShost textures, and refuses views without an explicit description. D3D12 rejects_TYPELESSview formats andNoneview descriptions on_TYPELESSresources, causing views to fall back to null.Implementation Details
crates/victory-gpu/src/resource.rs):is_typeless(format)withchecked_add(1)overflow protection for malformed/boundary format words (e.g.u32::MAX).concrete_view_format(format, depth, unordered) -> Option<u32>which:19..=21->21,22->22,44..=46->46,47->47,39|40->41,55->56) to legal D3D12 SRV formats rather than DSV attachment formats.R16_TYPELESS(53) byALLOW_DEPTH_STENCIL:R16_UNORM(56) for depth resources vs.R16_FLOAT(54) for non-depth color/UAV resources.90->87,88|92->88,94->95, and standardf + 1families).Nonewhenunordered == truefor formats without legal D3D12 UAV support (planar depth/stencil,D16_UNORM,B8G8R8X8, and block-compressed70..=84/94..=99).fits()Validation (crates/victory-gpu/src/descriptor/host.rs):default_srv_descanddefault_uav_descto synthesize fullD3D12_SHADER_RESOURCE_VIEW_DESC/D3D12_UNORDERED_ACCESS_VIEW_DESCstructures (dimension, mip count, array/depth extent, seeded fromview_format(resource)) when a title omitspDescon a typeless host texture.fits()to trackALLOW_DEPTH_STENCIL, returnfalseifformatremainsNoneon a typeless texture (guaranteeingNonenever reaches D3D12), and resolve view formats viaconcrete_view_format(view, depth, unordered).default_srv_descanddefault_uav_descintomake()forView::ShaderandView::Unordered.Verification
concrete_view_format_resolves_color_depth_uav_and_boundsincrates/victory-gpu/src/resource.rsverifies color, depth,R16_TYPELESSdepth vs. color/UAV, planar depth UAV rejection, BC UAV rejection, and0/u32::MAXbounds.VICTORY_D3D12_DEBUG=1).check(build, clippy-D warnings, workspace tests) passing ond782a7d.Scope & Limitations
#651) remain unchanged.@MichaelSmithAI on GitHub · 2026-11-24 14:47 UTC · original
The format-table test passed at
60222b3. A separate preparation-only check used a live R24G8_TYPELESS depth texture on RTX 4090 under Wine/vkd3d-proton 3.2. For an explicit SRV descriptor, both UNKNOWN and R24G8_TYPELESS resolved to the depth-plane format R24_UNORM_X8_TYPELESS (46).Three cases remain relevant to #882. An explicit D24_UNORM_S8_UINT request stayed at the attachment format (45). With the descriptor absent altogether, the preparation helper returned success without supplying a concrete format. An explicit stencil format (47) stayed 47, but this helper only receives the format and cannot select the stencil plane. The comparison stopped at preparation, before host view creation or shader execution.
For integration, #651 already handles explicit depth/stencil aspect selection. Keeping the R16 depth and color cases distinct is also important: the same typeless family can back either usage.
@Zipettte on GitHub · 2026-11-24 15:13 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 60222b3:
cargo test -p victory-gpupasses, 51 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@pushkarreddyy on GitHub · 2026-11-24 15:28 UTC · original
Thank you @Zipettte for verifying the test suite on AMD Radeon RX 7700 XT, and thank you @MichaelSmithAI for the hardware testing and valuable depth/stencil format notes on RTX 4090!
@Yaekai on GitHub · 2026-11-24 15:53 UTC · original
Code review of
60222b3— the depth-vs-color mapping table inconcrete_srv_format()is clean and avoids the DSV-format pitfall, but there are 3 edge cases worth fixing before merge:format == Noneon a typeless resource (crates/victory-gpu/src/descriptor/host.rs:609-617):When the title omits a view description (
CreateShaderResourceView(tex, NULL, ...)/CreateUnorderedAccessView(tex, NULL, NULL, ...)),formatisNone(view == 0), soif let Some(format) = formatis skipped andfits()still returnstrue. That letsmake()passNoneto D3D12 on a_TYPELESSresource, which is illegal in D3D12 (E_INVALIDARG/ debug-layer error). Either returnfalsewhentypeless && format.is_none()or synthesize a concreteD3D12_SHADER_RESOURCE_VIEW_DESC/D3D12_UNORDERED_ACCESS_VIEW_DESC(as inXvania7/VIctory@2be93af).is_typeless(u32::MAX)overflow (crates/victory-gpu/src/resource.rs:278):family(format + 1)will overflow in debug builds if a malformed/guest format word isu32::MAX;format.checked_add(1).is_some_and(...)avoids it.R16_TYPELESS(53) color vs depth & UAVs:concrete_srv_format(53)unconditionally maps toR16_UNORM(56), which is right forALLOW_DEPTH_STENCILresources, whereas non-depth colorR16_TYPELESStextures typically expectR16_FLOAT(54). Also, planar depth formats (21/46) are valid for SRVs but not forunordered == true(UAVs).@fuzeofficlal on GitHub · 2026-11-24 16:56 UTC · original
Put together a follow-up commit stacked directly on
60222b3addressing the review points above and verified with GPU pixel readbacks on RTX 5090 and WARP (VICTORY_D3D12_DEBUG=1):pDesc(None) on typeless host textures: Synthesizesdefault_srv_desc/default_uav_descfrom the host resource's dimension, mip count, and array/depth extent (seeded withview_format(resource)when widened from a typed console format), and returnsfalseinfitsifformatis stillNoneon a typeless resource soNonenever reaches D3D12 (E_INVALIDARG).is_typeless(u32::MAX)overflow: Usesformat.checked_add(1).is_some_and(...).concrete_view_format(format, depth, unordered):R16_TYPELESStoR16_UNORMwhenALLOW_DEPTH_STENCILis set andR16_FLOATfor non-depth color/UAV resources (preserving explicitR16_UNORMviews);D32_FLOAT_S8X24_UINT,D32_FLOAT,D24_UNORM_S8_UINT,D16_UNORM) passed in SRV descriptors on typeless depth textures (#882);D16_UNORM,B8G8R8X8, and BC formats whenunordered == trueso unsupported UAVs fall back cleanly tonull_forwithout device removal.Synthetic
cs_5_1readbacks confirm1.5round-tripping through non-depthR16_TYPELESSnull-desc UAV+SRV (R16_FLOAT),0.5onD16_UNORM-clearedR16_TYPELESS, and0.75onR24G8_TYPELESSvia both null-desc and explicitD24_UNORM_S8_UINTSRVs with zero D3D12 debug errors. Feel free to cherry-pick:github.com/fuzeofficlal/VIctory@3802a0afda@Marvisak on GitHub · 2026-11-25 00:30 UTC · original · edited 2026-11-25 22:16 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflict incrates/victory-gpu/src/descriptor/host.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: move
default_srv_desc/default_uav_descabove the doc comment offits, and keep refusing (or give evidence for the format) when the title's own typeless texture has no view description.Generated by Claude Code
@pushkarreddyy on GitHub · 2026-11-25 01:47 UTC · original
Rebased cleanly onto latest
main(940d32f), resolving the conflict incrates/victory-gpu/src/descriptor/host.rswith merged PR #974. Also included theis_typeless(u32::MAX)overflow guard suggested by @Yaekai. Ready for maintainer review.@pushkarreddyy on GitHub · 2026-11-25 12:46 UTC · original
Updated and pushed commit
d782a7daddressing all triage review points:default_srv_desc/default_uav_desc), and ensuredfitsreturnsfalseifformatremainsNoneso null descriptions never reach D3D12.concrete_view_format(format, depth, unordered)which rejects planar depth/stencil formats (19..=21, 22, 44..=46, 47, 55, 88/92) and block-compressed formats whenunordered == true.R16_TYPELESShandling: Dispatches based onALLOW_DEPTH_STENCILtoR16_UNORM(56) for depth resources andR16_FLOAT(54) for color/UAVs.collapsible_if), resolved bounds overflow withchecked_add, and added comprehensive unit tests covering color, depth, UAVs, and format bounds.Thank you to @fuzeofficlal and @Yaekai for the detailed review feedback and hardware test findings.
@pushkarreddyy on GitHub · 2026-11-25 13:36 UTC · original
Hi @Marvisak — all triage feedback points (
default_srv_desc/default_uav_descfor omittedpDesc,fitsreturningfalsewhenformatisNone, UAV planar-depth/BC rejection,ALLOW_DEPTH_STENCIL-awareR16_TYPELESSresolution, and the Clippy fix) are resolved ond782a7dand CI (check) is passing. Ready for review and merge whenever convenient for #882 and #876!@pushkarreddyy on GitHub · 2026-11-25 14:19 UTC · original
If any testers on untested GPU models (such as NVIDIA RTX 30/40/50 series, AMD RDNA2/RDNA3/RDNA4, Intel Arc, or Linux/Wine/vkd3d-proton) can verify this build (
d782a7d) in-title or withVICTORY_D3D12_DEBUG=1, test reports would be greatly appreciated!AI-assisted: yes (Gemini 4 Neon)
@MichaelSmithAI on GitHub · 2026-11-25 16:36 UTC · original
I ran a guest command-list readback on
d782a7dwith an RTX 4090 (driver 615.78.8), Wine 11.22 and vkd3d-proton 3.2. A 1×1 guest RGBA8 sRGB texture had typeless host backing. A compute dispatch wrote red byte 128 through its linear UAV, and a second dispatch read the same texel through the SRV. The shader stored round(1000 × red). Each case ran in a fresh process.The omitted descriptor preserves the sRGB conversion. For an explicit UNKNOWN SRV,
fitssees format 0 and chooses the host family's linear UNORM format. In the control I changed only the SRV path inmake: before callingfits, if the descriptor format is 0 andresource::view_format(resource)is Some, copy that known guest format into the descriptor. The UAV path and shaders were identical. The authored format-table test passed in both builds.This case starts with a known typed guest texture. It gives no evidence for choosing a format when the guest itself supplied a typeless resource. I set
VICTORY_D3D12_DEBUG=1on a diagnostics build; the evidence here is GPU readback, and I couldn't confirm a native debug layer was active under Wine. Synthetic textures and source-built shaders only. AI-assisted.d782a7d1d1toa97587524b@pushkarreddyy on GitHub · 2026-11-26 15:07 UTC · original
Rebased cleanly onto latest
main(63bcca4) ina975875:main's explicit-UNKNOWNview_format(resource)lookup inmake()(addressing@MichaelSmithAI's sRGB test case where explicitFormat = UNKNOWNon a typed guest texture should retain the guest format).main'styped_storechecks on the resolved concrete UAV format so unsupported UAVs are still rejected cleanly.Testers on untested GPU models (NVIDIA RTX 30/40/50 series, AMD RDNA2/RDNA3/RDNA4, Intel Arc, or Linux/Wine/vkd3d-proton) are welcome to verify
a975875!AI-assisted: yes (Gemini 4 Neon)
a97587524bto27c69cf3a527c69cf3a5to312e584a30@pushkarreddyy on GitHub · 2026-11-26 15:23 UTC · original
Rebased onto
main(63bcca4) at commit312e584and updated to align with the new placed-UAV host descriptor rules:concrete_view_format:D32_FLOAT(40) andD16_UNORM(55) now requiredepth && !unordered(returningNonefor non-depth resources or unordered views).descriptor::host::fits: explicitly rejects typeless view formats (is_typeless(view)) when a non-UNKNOWNview format is provided.concrete_view_format_resolves_color_depth_uav_and_boundsunit tests to cover non-depth and UAV cases for40and55.@Marvisak: CI
checkis passing after the rebase. Testers on untested GPU models / drivers are welcome to verify typeless SRV/UAV rendering on this build.AI-assisted: yes (Gemini 4 Neon)
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.