GPU: Map typeless texture views to concrete formats (fixes #850) #2188
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T07:21:23Z.
Fixes #850 (supersedes tracking issue #876).
Summary
442bd60).Note: Opened as a PR per maintainer triage (#876). Happy to coordinate with #970 / #651 on depth/stencil plane selection if preferred.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T08:03:00Z.
Review: COMMENTED
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.
Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-25T07:58:04Z.
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.
Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T08:00:08Z.
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.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:29:01Z.
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
Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T14:20:52Z.
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.Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-26T20:53:46Z.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.