GPU: 16-bit float RGBA stands in for R9G9B9E5 render targets #32
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/32"
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 fxceless/victory-fork. Originally posted by arminkhaleghirod on 2026-11-24T20:39:41Z.
The game renders to R9G9B9E5 (format 67). No PC GPU can, so the texture was refused and the render target view made for it removed the device: on an RTX 4080 in Series S mode that happened at the first loading screen, every run (debug layer:
CreateRenderTargetView: The format (0x43, R9G9B9E5_SHAREDEXP) cannot be used with a RenderTarget view).This adds 67 → R16G16B16A16_FLOAT to the stand-in table
target_formatalready uses for the 16-bit colour formats, so views, pipelines and clear values follow it. FP16 holds RGB9E5's precision and range.With it the same machine gets through loading into the opening cutscene. Built and
cargo test -p victory-gpupasses.Upstream has the same idea in Marvisak/VIctory#492.
Imported from fxceless/victory-fork. Originally posted by adriaespii on 2026-11-24T20:54:37Z.
Independent test run on commit
9ba864a(AMD RDNA4):x86_64-pc-windows-msvc)cargo clippy --workspace --all-targets -- -D warnings: 0 warningscargo test --workspace: 496 passed, 0 failed, 7 ignored (victory-gpu: 110 passed, 0 failed, 1 ignored;victory-shader: 210 passed, 0 failed, 2 ignored)target_formatchecksSupport1(D3D12_FORMAT_SUPPORT1_RENDER_TARGET | D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW), but notSupport2 & D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE. CheckingUAV_TYPED_STOREas well would guard against adapters that expose typed UAVs forR9G9B9E5without typed UAV store support.AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.
Imported from fxceless/victory-fork. Originally posted by arminkhaleghirod on 2026-11-24T21:37:29Z.
Thanks for testing. On the typed-store check:
target_formatalready asks whether the host takes 67 as a render target and typed UAV, and uses the stand-in only when it doesn't. The stand-in, R16G16B16A16_FLOAT, is one D3D12 requires for both on every feature level the project targets, so the stand-in itself doesn't need checking.Imported from fxceless/victory-fork. Originally posted by HenriqueSBueno on 2026-11-24T22:46:32Z.
A regression report for this PR on the Series X profile (RTX 3080 10 GB, driver 616.92, this fork at
4e17478with this PR merged locally, diag build, same switches and save in all runs):4e174784e17478+ this PR4e17478+ this PR4e17478(PR removed again)So the R9G9B9E5 → RGBA16F stand-in fixes the Series S device removal but blacks out the Series X picture on this card. One guess: views of the packed-light textures that the title places at the same addresses, which on Series X sample those textures as R9G9B9E5 (
resource.rsaround the comment at line 1192). If the stand-in changes what those views read, the light reads as zero. Could the stand-in be limited to targets the host cannot render to as R9G9B9E5, leaving the compute-packed light textures alone?AI-assisted (Claude Code)
Imported from fxceless/victory-fork. Originally posted by AwkGrep256 on 2026-11-24T22:53:11Z.
That fits how upstream handles it. Main keeps RGB9E5 textures as real RGB9E5 textures and makes them castable to the other 32-bit formats, so a compute pass writing the packed light as R32_UINT and a view reading it as RGB9E5 share one host texture (
draw.rshas a test for that exact case, the sky tables). The only place that needs a stand-in is where something writes RGB9E5 through a typed UAV, which is the FSR output: in Marvisak/VIctory#1793 the upscaler writes an FP16 stand-in that gets packed back into the RGB9E5 texture. Moving the fork to castable textures would keep the light textures reading what the compute pass wrote, instead of swapping the whole format.Edit: The FP16 stand-in described above was removed from Marvisak/VIctory#1793. Main’s host upscaler writes RGB9E5 directly, and both the RX 9070 XT and WARP report typed UAV store support for that format.
Imported from fxceless/victory-fork. Originally posted by arminkhaleghirod on 2026-11-24T23:50:59Z.
Thanks @HenriqueSBueno, and @AwkGrep256 for the explanation. That's it: the stand-in also caught the packed-light textures, which the title writes as R32_UINT through another view.
I'm narrowing it so R9G9B9E5 gets the stand-in only when it's a render target (the Series S upscaler output). Unordered-access-only R9G9B9E5 textures keep their format, as on main. Series S still gets past the old crash here (no device loss to frame 1890). I'm checking Series X past frame 2400 now, and I'll push once it holds.
Pull request closed