GPU: Map typeless texture views to concrete formats (fixes #850) #2190
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!2190
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2190"
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?
@Xvania7 on GitHub · 2026-11-25 07:21 UTC · original
Xvania7:fix/issue-850-typeless-view→main· +505 −59 · 2 files · 1 commits · openFixes #850 (supersedes tracking issue #876).
Summary
Note: Opened as a PR per maintainer triage (#876). Happy to coordinate with #970 / #651 on depth/stencil plane selection if preferred.
@MamaLeVrai on GitHub · 2026-11-25 07:58 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head
ba950235intomain940d32fin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with--all-features: clean.cargo test --workspace --locked: 707 passed, 0 failed, 10 ignored, two runs (mainalone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
@Xvania7 on GitHub · 2026-11-25 08:00 UTC · original
Thanks for verifying
ba95023on real RDNA2 hardware (RX 6950 XT) against940d32f, @MamaLeVrai — good to have the hardware-only shader checks and--all-featuresclippy run confirmed clean.@Marvisak on GitHub · 2026-11-25 13:29 UTC · original · edited 2026-11-25 16:02 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/descriptor/host.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (needs-work) was for an older state ofmain.Generated by Claude Code
@Xvania7 on GitHub · 2026-11-25 14:20 UTC · original
To provide the concrete architectural rationale requested in triage regarding the format selection for typeless resource views:
Why Titles Pass Omitted/Zero View Formats on Typeless Resources in D3D12X:
On the console runtime (D3D12X / GDK), descriptor creation functions permit
Format = DXGI_FORMAT_UNKNOWN(0) for resource views when the resource was allocated as a typeless parent (_TYPELESS), relying on the hardware texture sampler to resolve the default concrete interpretation. On PC D3D12,ID3D12Device::CreateShaderResourceViewrequires a fully typed compatible format (D3D12 Functional Spec §22.2: "A view format cannot be typeless; if the resource is typeless, the view must select a castable typed format from the same family").Format Resolution Rules & Typeless Families:
In D3D12 / DXGI format specifications, every typeless family has a primary default normalized or floating-point representation when sampled by color shaders:
R8G8B8A8_TYPELESS(27) →R8G8B8A8_UNORM(28) (or_UNORM_SRGB29)B8G8R8A8_TYPELESS(90) →B8G8R8A8_UNORM(91)BC7_TYPELESS(97) →BC7_UNORM(98)BC1_TYPELESS(70) →BC1_UNORM(71)R32_TYPELESS(39) →R32_FLOAT(40)R16_TYPELESS(53) →R16_FLOAT(54) orR16_UNORM(56)R32G8X24_TYPELESS(19) →R32_FLOAT_X8X24_TYPELESS(20);R24G8_TYPELESS(44) →R24_UNORM_X8_TYPELESS(45).Title Context in #850:
In the cutscene rendering pass isolated in #850, the full-screen blit shader (
dfafaf385b2f94e8,draw 3 from 0) sampless0+0asTexture2D<float4>. Because the backing resource is created asR8G8B8A8_TYPELESSwith view format 0,main'sfitscheck rejected the view, leavings0unbound and yielding flat clear color0x20202C. Mapping the typeless resource to its primary_UNORMconcrete view restores the cutscene texture data without silent type mismatch.ba950235c1tocd34d88a28@catminou4 on GitHub · 2026-11-25 08:03 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.
Typeless texture views mapped to concrete formats — typeless-format resolution fix.
@Xvania7 on GitHub · 2026-11-26 20:53 UTC · original
Rebased onto latest main (
63bcca4), cleanly integrating with PR #2462 placed texture view changes: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.