Skip to content

GPU: substitute R9G9B9E5_SHAREDEXP render targets and UAVs with R16G16B16A16_FLOAT - #492

Open
Yaekai wants to merge 2 commits into
Marvisak:mainfrom
Yaekai:fix/gpu-r9g9b9e5-render-target
Open

Yaekai wants to merge 2 commits into
Marvisak:mainfrom
Yaekai:fix/gpu-r9g9b9e5-render-target

Conversation

@Yaekai

@Yaekai Yaekai commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Summary

On Xbox Series X|S, GTA VI allocates HDR scene/lighting targets in DXGI_FORMAT_R9G9B9E5_SHAREDEXP (format 67) with ALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESS (e.g. 1920x1080, flags: 5 and flags: 4). PC D3D12 forbids R9G9B9E5_SHAREDEXP as a render target or unordered-access resource, causing CreateCommittedResource to fail with E_INVALIDARG (no host texture) and leaving those passes without a host texture.

Changes

  • crates/victory-gpu/src/resource.rs:
    • Added target_format() substituting R9G9B9E5_SHAREDEXP (67) → R16G16B16A16_FLOAT (10) for resources created with ALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESS and their clear values.
    • Read-only sampled R9G9B9E5_SHAREDEXP textures keep format 67 (pc_format).
    • Updated view_format() so substituted typed targets are not mistaken for typeless resources.
    • Added unit tests (r9g9b9e5_target_format_substitutes_rgba16f and r9g9b9e5_render_target_and_uav_textures_create_on_host).
  • crates/victory-gpu/src/descriptor.rs: Target::desc() maps RTV formats through target_format().
  • crates/victory-gpu/src/descriptor/host.rs: fits() accepts SRV/UAV views requesting R9G9B9E5_SHAREDEXP on a substituted R16G16B16A16_FLOAT host texture and binds the host format.
  • crates/victory-gpu/src/pipeline/host.rs: PSO RTFormats map through target_format().

Verification

  • cargo test -p victory-gpu --lib: 45 passed, 0 failed (including both new r9g9b9e5 tests on D3D12).
  • Verified live on GTA VI (--console series-s): no host texture warnings for format: 67 dropped to 0.

@fromthemoonx

Copy link
Copy Markdown

Tested b57e10d (on main d2a4bae) on NVIDIA.

Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 x86_64-pc-windows-msvc, debug.

Tested

  • cargo test --locked -p victory-gpu --lib: 45 passed, 0 failed, 1 ignored, including r9g9b9e5_target_format_substitutes_rgba16f and r9g9b9e5_render_target_and_uav_textures_create_on_host (which runs on the hardware adapter here).

  • cargo test --locked --workspace: 266 passed, 0 failed, 4 ignored.

  • cargo xtask policy: 151 files ok.

  • cargo clippy -p victory-gpu --all-targets: one undocumented_unsafe_blocks warning in host.rs:267; cargo fmt --check lists files this PR doesn't touch. Both are the same on main, and the PR's one formatting hunk removes resource.rs from that list.

  • The premise on this GPU: a throwaway local test (not pushed) asked the device for CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT):

    format render target typed UAV UAV typed store sample
    67 R9G9B9E5_SHAREDEXP no no no yes
    10 R16G16B16A16_FLOAT yes yes yes yes

    So the substitution is needed on NVIDIA as well, and sampled-only textures can keep 67 as the PR does.

Reading the code

  • Uploads from title memory are safe: texture::title_written limits them to textures without render-target/depth/UAV flags, and only those keep format 67, so a 4-byte detile never lands in an 8-byte host texture.
  • One question: copy_texture_region and copy_resource hand the title's formats to the host unchanged. A copy between a substituted target (now f10, 8 bytes) and a sampled-only f67 texture, or from an f67 placed footprint into a substituted target, would have mismatched formats and texel sizes on the host, which D3D12 doesn't allow. Did the live run show copies to or from these targets (for example with VICTORY_D3D12_DEBUG=1)? If the title never does that, nothing more is needed.

Not tested: no game data, so the live no host texture result is the description's, not mine.

AI-assisted (Claude Code) ran the checks and drafted this comment.

@Mesrine67

Copy link
Copy Markdown

Local AMD results for PR head b57e10d:

Environment: Windows 11 Pro build 26300, AMD Radeon RX 6750 XT, driver 32.0.21045.29003, rustc 1.100.0.

  • cargo test --locked -p victory-gpu r9g9b9e5 -- --test-threads=1: 2 passed, including host D3D12 texture creation for sampled-only, UAV, and render-target+UAV flags.
  • cargo test --locked -p victory-gpu --lib -- --test-threads=1: 45 passed, 0 failed, 1 ignored.

This confirms the synthetic host-resource substitution path on this AMD adapter. It does not test a title render, PSO acceptance, or title texture copies.

I also checked the copy wrappers in crates/victory-gpu/src/list.rs: copy_resource forwards the host resources to CopyResource, and copy_texture_region forwards them to CopyTextureRegion; neither path converts formats. If the title copies between a sampled-only format-67 resource and a substituted format-10 target, that copy would violate D3D12 format/size compatibility. Microsoft documents the CopyResource restrictions here: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copyresource and CopyTextureRegion format compatibility here: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copytextureregion.

I could not confirm whether GTA VI makes such copies without a live title diagnostic capture. If an existing run has D3D12 debug output or copy diagnostics for these format-67 targets, that would settle the remaining question.

@upipibi upipibi mentioned this pull request Nov 24, 2026
@Raxstreams

Copy link
Copy Markdown

The widened render-target format works in a local Windows integration on an RTX 3080 Ti. There is also a distinct title use case worth preserving: a placed R9G9B9E5 SRV at exactly the same address and dimensions as a writable R32_UINT texture. I verified in a separate GPU test that a castable R32_UINT allocation sampled through the packed SRV decodes a unit red channel correctly. The title creates these pairs during its first scene. An independent RGBA16 allocation for the reader loses the writer's pixels in that case. The tested widening and the packed alias path coexist locally. World lighting is still under investigation.

@LAKSHYA-cmd-tech LAKSHYA-cmd-tech left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Windows 11 D3D12:

  • All 45 tests in \�ictory-gpu\ pass, including the new
    9g9b9e5_target_format_substitutes_rgba16f\ and
    9g9b9e5_render_target_and_uav_textures_create_on_host\ tests against the host D3D12 device.
  • Format substitution from format 67 to \DXGI_FORMAT_R16G16B16A16_FLOAT\ cleanly resolves \E_INVALIDARG\ when creating render target and UAV resources.
  • \cargo clippy -p victory-gpu\ is clean with zero warnings.
  • \cargo xtask policy\ passes (zero asset policy violations, synthetic tests only).

@mercuryVM mercuryVM left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested b57e10d on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 45 passed, including r9g9b9e5_render_target_and_uav_textures_create_on_host, which does create the host texture here for flags 4 and 5. Clippy's 1 warning is the existing one in host.rs.

Substituting a render-target-capable format is reasonable, and the view-format fix-up in fits is consistent. One concern before approving: the substitute has a different texel size, and the copy paths between title memory and the host texture size themselves from different descriptions.

  • texture.rs (the upload staging path): GetCopyableFootprints(&d, …) is computed from the host description, R16G16B16A16_FLOAT at 8 bytes per texel. The title's layout (victory_formats::texture::Layout) describes R9G9B9E5 at 4 bytes per texel. Any contents the title writes from the CPU, or that are uploaded on first use, are then detiled into rows twice as wide as their data, and RGBA16F reads them as half-floats, not shared-exponent colour. The same mismatch applies to whatever copies the target back into title memory (copy-back or readback), where the host row is twice the title's.
  • If these targets are only ever GPU-written and GPU-read, that's harmless. But then upload and copy-back should be explicitly refused for a substituted texture, with a once! log, rather than silently converting bytes. If they can be CPU-touched, the copy needs an R9G9B9E5 ↔ RGBA16F conversion, which a compute pass or a CPU loop could do.
  • A test that uploads one known R9G9B9E5 texel into a flags-5 texture and reads it back would show which case you're in.

AI-assisted (Claude Code).

@RussoJr

RussoJr commented Nov 24, 2026

Copy link
Copy Markdown

I reproduced the R32_UINT writer → placed RGB9E5 reader in Raxstreams’ first-scene report. A compute shader wrote red and then green through the integer UAV. The RGB9E5 reader at the same guest address returned black both times.

The attached patch builds on #643 at e7b2182e. When a table-bound SRV has one matching live R32_UINT producer with a GPU write, it records a bit-preserving D3D12 copy before sampling. Microsoft lists this pair under CopyResource reinterpret copies.

With the patch, the shader read red, then green, and still read green from a second command list. CPU-supplied blue survived both before the first GPU write and after the producer was released. Three controls (different address, width, or tiling) stayed black. All nine reads passed on #643 and on a local integration of main@ffe310eb + #643 + #492. The two default-suite failures on that main snapshot with #643 were present before and after this patch.

The test ran as a Windows x64 binary under Wine 10 with vkd3d-proton 2.14.1 and Mesa llvmpipe (software rendering). Direct heap indexing and recording a consumer on another list before the producer’s first submission remain untested and outside this patch. The first mission still needs an in-game check on native D3D12.

The ZIP contains the source diff and regression test. On a D3D12 machine with D3DCompiler 47, apply the diff on top of #643 and run

cargo test --locked -p victory-gpu --lib -- --ignored --exact draw::packed_tests::placed_rgb9e5_reads_the_latest_r32_writer --nocapture

Implementation and testing were assisted by Codex.

VIctory-RGB9E5.zip

@fromthemoonx

Copy link
Copy Markdown

@RussoJr here is the native D3D12 run of your patch.

Environment: Windows 11 Pro build 26300, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 x86_64-pc-windows-msvc, system D3DCompiler_47, Graphics Tools installed. I read packed-rgb9e5.patch from the ZIP and applied it to #643 at e7b2182 (it applies cleanly).

cargo test --locked -p victory-gpu --lib -- --ignored --exact draw::packed_tests::placed_rgb9e5_reads_the_latest_r32_writer --nocapture:

build sampled RGBA (9 reads) result
#643 + patch blue, red, green, black, black, black, green, green, blue pass
#643 + patch, --features diagnostics with VICTORY_D3D12_DEBUG=1 the same pass, no debug-layer error
control: patch with the refresh_packed_reader call in readable replaced by false blue, black, black, black, black, black, black, black, blue fails

So on native hardware the control reproduces the black reads of Raxstreams' report, and the patch turns them into red then green. The green also holds from the second command list, and the CPU-written blue returns once the writer is released. The three controls (other address, width, tiling) stay black either way. cargo test -p victory-gpu --lib on #643 + patch: 46 passed, 0 failed, 2 ignored.

Like your run, this covers table-bound SRVs only. Direct heap indexing and a consumer recorded on another list before the producer's first submission aren't covered. No game data used.

AI-assisted (Claude Code).

@erLCoder

Copy link
Copy Markdown

Independent HDR resource check on GTX 1660 Ti (6 GB), NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Rust 1.98.1 MSVC and Agility SDK 1.620.2. Base d2a4bae; PR b57e10d. Added a test-only adapter check requiring NVIDIA LUID 00000000:00017c52.

cargo test --offline --locked -p victory-gpu --features diagnostics --lib r9g9b9e5 -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored, 46 filtered out. At 64x64 the host resource was format 10 for flags 4 and 5, and format 67 for flags 0. Separately, a native D3D12 probe at 1920x1080 returned E_INVALIDARG for unmodified format 67 with flags 4 and 5, and succeeded with flags 0. The two checks use different sizes and paths. HDR pixel values, in-game lighting and final composition remain untested.

Codex prepared the worktree, ran the tests and drafted this report.

@fuzeofficlal

fuzeofficlal commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

I tested the format-67 → RGBA16F render-target path on b57e10d with a 1×1 synthetic texture. I cleared the widened target to [0.5, 0.75, 0.125, 0.25] and fetched the texel through a guest format-67 SRV. A sampled-only native RGB9E5 texture with the same packed RGB values supplied the reference.

  • Default mapping and an implicit SRV both read alpha 0.25 on the widened target. Native RGB9E5 read 1.0.
  • A custom [A, B, ZERO, G] mapping moved 0.25 into red on the widened target. Native RGB9E5 produced [1, 0.125, 0, 0.75].

Follow-up commit maps every selector for missing source alpha to constant one when the underlying texture is widened. An implicit SRV gets an explicit full-texture view so it uses the same mapping. This follows the RGB9E5 decode rule.

The mismatch reproduced on both RTX 5090 and WARP. The follow-up passed six readbacks on each backend, including an ordinary RGBA16F control with alpha 0.25. The victory-gpu library suite passed 49 tests by default and 51 with diagnostics, with one benchmark ignored in each run. This verifies SRV component behavior on the substitution path. The link to the black world frame in #904 is unverified.

@Ege-Mert

Copy link
Copy Markdown

Test report: NVIDIA RTX 3060 Laptop 6 GB (Ampere), --console series-s: the refused format-67 targets are made with this PR.

Setup: Windows 11 build 26300, driver 596.21 (32.0.15.9621), title 1.0.2.1 (own copy), Rust 1.98.1, diag build. Base: 8e79c80 + #493 (c48b240) + #206 (05981dd) + #189 (d0fd9bf) + #454 (d2c93fa) + MIN_DYNAMIC = 1 << 18 (#747). This PR at b57e10d, clean merge.

no host texture … (0x80070057) lines per run:

run 1920×1080 format 67, flags 4 1920×1080 format 67, flags 5 other
series-s, base 1 1 1280×720 format 115 (flags 1), 1280×720 format 86 (flags 5)
series-s, base + this PR + #211 0 0 the same two
series-x, base 0 0 2560×1440 format 115 (flags 1), 2560×1440 format 86 (flags 5)

So on this card the format-67 refusals only occur in Series S mode, and this PR removes both.

What it does not do alone: with only this PR on the base, the Series S menus stay black (70 s, no input, 30 fps); the picture needs #211 (two present planes). With both merged the menus are correct and the world is reached in Series S mode for 4.5 minutes with no device removal; numbers in my report on #211.

Not tested: this PR in Series X mode, where no format-67 target was refused here anyway; other GPUs. One run per row.

AI use: Claude Code (Claude Fable 5.2) built the trees, ran the runs and wrote this report from the logs; a second tool (Codex) checked the numbers against the logs. The hardware, the title copy and the runs are the user's.

@fuzeofficlal

Copy link
Copy Markdown
Contributor

Following the flags-4 report, I ran a separate typed UAV write → SRV load test on b57e10d and the alpha follow-up. I created a 2×2 texture with guest format 67 and ALLOW_UNORDERED_ACCESS, then requested format 67 for both views. A synthetic compute shader wrote four distinct RGBA colors through the UAV. After the transition to shader-read state, a second shader loaded all four texels through the SRV.

RTX 5090, AMD Radeon Graphics and WARP all produced the expected RGB values on both revisions. The backing texture was RGBA16F on each device. The author's head returned the stored alpha 0.25; the follow-up returned RGB9E5's default alpha 1.0. The separate native RGBA16F control returned 0.25 on both revisions.

This covers the explicit typed UAV and default-mapped SRV on the widened flags-4 resource. The test uses Texture2D.Load with synthetic colors.

@jamesn-xt

jamesn-xt commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Independent integrated test on Windows 11 x64 build 26200, Ryzen 5 5600, 32 GiB RAM, RTX 4080 / NVIDIA 617.42, Rust 1.98.1.

Tested stack: main ffe310e + #1146 + #211 (2fb7a8b) + #89 (081afbd) + this PR (c7bb83f), then #985 and #206. Reproducible source with original PR ancestry and local conflict resolutions: https://github.com/jamesn-xt/VIctory/tree/test/rtx4080-target-formats (abe05a3). This is an integration test, not an isolated attribution of every visual change to one PR.

Integration notes: #89's packed conversion/copy guards were combined with main's title-written texture upload handling. The ordinary host upload path retains defer_fill for the mapped staging destination. The target-format mapping combines packed16 substitutions with RGB9E5→RGBA16F, and preserves this PR's latest RGB9E5 SRV alpha/component handling. No source from the title was used in those conflict resolutions.

No retail files, captures or raw game logs attached.

Follow-up with 12 GiB additional active paging-file headroom: the same integrated runtime got past the earlier memory guard and attempted hundreds of draws per frame, roughly 1 fps. The first captured 3D-stage frame was black. The process then exited with DXGI_ERROR_DEVICE_REMOVED (0x887A0005), reported removal reason DXGI_ERROR_DEVICE_HUNG (0x887A0006), after a submission of 32 lists. Visible gameplay is not confirmed. That later run logged 104 host-pipeline refusal lines and 300 shader-translation refusal lines; the format fixes do not resolve those broader world-rendering problems. These counts are log lines, not a claim about all distinct shaders in the package.

@465d6a0eac

465d6a0eac commented Nov 24, 2026 •

Copy link
Copy Markdown

Thank you for this, @Yaekai! Many pull requests here are still waiting to be merged, so I've ported this one to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/34. You're credited as the author there. This pull request stays the original.

Test results

simnJS added a commit to MiamiGame/XTP that referenced this pull request Nov 24, 2026
VIctory #492 makes R9G9B9E5_SHAREDEXP (67) render targets and unordered
access textures R16G16B16A16_FLOAT, clear values included, with views of
67 binding the host format; sampled ones keep 67. fb3db31's format table
does not cover 67, but it already does the rest for the formats it has:
one host format per title format, applied by pc_format to textures,
views, render target views, pipeline targets and clear values, decided
once from CheckFeatureSupport. So 67 becomes an entry of that table
rather than a second, per-use mapping (resource::target_format and the
special case in descriptor/host.rs fits):
- #492's split leaves a title copy between a sampled 67 texture and a
  target of 67 between two host formats D3D12 does not copy between; one
  host format per title format keeps copies and views consistent.
- Title-written 67 texels (uploads, buffer-to-texture copies) convert
  exactly: every shared-exponent channel is a 16-bit float (at most 9
  significant bits, 2^-24 to 65,408); tested over every mantissa and
  exponent. xcl takes R11G11B10_FLOAT instead, which rounds the 9-bit
  mantissas to 6 and 5 bits.
- The cost: 8 bytes a texel instead of 4, sampled 67 textures included.

On the RTX 4080, the format sweep now creates 539 textures (534 before):
67 with render target and unordered access uses.

This is resource/format.rs, the dark-world task's: one table entry and
its conversion, nothing else there.

Ported from Marvisak/VIctory#492 (head b57e10d) by Yaekai

Co-authored-by: Yaekai <21324379+Yaekai@users.noreply.github.com>
@rafaconvaitis

rafaconvaitis commented Nov 24, 2026 •

Copy link
Copy Markdown

I independently checked the earlier bit-preserving alias-copy route on native Windows D3D12, with three mip levels and two array layers. A synthetic compute dispatch wrote different packed lighting words through R32_UINT UAVs. I used one CopyResource to copy to an otherwise matching R9G9B9E5_SHAREDEXP texture, then read back the packed bits and sampled the destination through a Texture2DArray SRV at each mip and layer.

The RTX 4070 and WARP both matched all 42 packed words (4×4, 2×2, and 1×1 on each layer) and all 42 expected RGBA tuples, with alpha 1. This corroborates the multi-subresource copy itself on native D3D12 for the alias case discussed in this thread. The fixture did not include VIctory's guest-address lookup, producer ordering, or resource lifetime. Those remain the integration questions before attributing any scene lighting change to it.

In two separate title runs on this RTX 4070, the fxceless/victory-gta6 578d459 alias path logged five multi-subresource matches for host format 42 written and format 67 read per run. The distinct shapes were 2048×456 with four subresources and 128×128 and 64×64 with six each. The runs used that fork's existing staging-copy implementation. This establishes that multi-subresource alias traffic occurs during the title and leaves its contribution to lighting open.

AI-assisted testing. No title files or images attached.

1984742628 added a commit to 1984742628/VIctory that referenced this pull request Nov 24, 2026
… PresentX planes

Merges https://github.com/fxceless/victory-fork (main, 4e17478) into this
fork. The two rewrote the same GPU and shader code (20 files, 80 conflicts),
so the merged tree is fxceless's tree, with two additions it does not have,
re-applied on top:

- The FidelityFX upscaler answered by AMD's PC FidelityFX SDK when
  VICTORY_FFX_DIR is set (the pc-fsr branch, f96ad82): applied unchanged.
- PR Marvisak#211's multi-plane PresentX compositing (Series S menus): several
  planes are composited in a list of their own; a single plane keeps
  fxceless's present path, including presents sent ahead.

Dropped in favour of fxceless's own implementations: this fork's lazy host
textures and VRAM report, bounds root constants, rectangle geometry shader,
mesh index/position changes, the diagnostics switches added with them, and
PRs Marvisak#89, Marvisak#492 and Marvisak#578 (fxceless has its own target formats and wave64
handling; Marvisak#578 refused every wave64 compute program on 32-lane GPUs). That
work stays reachable on the try/pr-211-578 branch at 575a4ee.

Builds with and without the diagnostics feature; the workspace tests pass.
Not run in the game yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
KainanP added a commit to KainanP/VIctory that referenced this pull request Nov 24, 2026
…6B16A16_FLOAT) onto Marvisak#211 + Marvisak#1024 + Marvisak#346 + Marvisak#334 + integ/next

Conflicts, both in tests:
1. crates/victory-gpu/src/descriptor/host.rs: the stack's tests
   (`raw_views_start_on_16_bytes` and the raw/structured view tests after
   it, from Marvisak#1426/Marvisak#704) and Marvisak#492's four `rgb9e5_srv_*` tests at the same
   place; git interleaved them over shared lines (a resource description's
   `SampleDesc`, a closing brace), so the two hunks are not separable
   texts. Resolved by keeping the stack's tests exactly as they were and
   adding Marvisak#492's four tests whole, as Marvisak#492 has them, before
   `dynamic_slots_are_held_until_released` (where Marvisak#492 put them). The
   resulting diff of the file against the previous head equals Marvisak#492's own
   (+235/-5 against main).
2. crates/victory-gpu/src/resource.rs: the stack's
   `get_desc_reports_the_allocated_mip_chain` and Marvisak#492's
   `r9g9b9e5_target_format_substitutes_rgba16f` /
   `r9g9b9e5_render_target_and_uav_textures_create_on_host` at the end of
   the module. The shared text holds the `#[test]` before and the closing
   braces after: the stack's test is closed in the hunk and Marvisak#492's follow
   as separate tests (not nested).

The non-test changes (`target_format`, `fits` taking a resource
description, `fits_texture_srv`, RTV and pipeline formats) merged without
conflict. `fits` has no other caller in the stack. Uploads from title
memory still skip render-target/UAV textures (`texture::title_written`),
so no 4-byte RGB9E5 rows are detiled into a substituted 8-byte texture.
Known open point from the review, not fixed by Marvisak#492: a copy between a
substituted target and a sampled-only RGB9E5 texture would mismatch
formats on the host; no report shows the title doing that.
No non-textual fix needed (cargo check --all-targets --all-features).
KainanP added a commit to KainanP/VIctory that referenced this pull request Nov 24, 2026
…sak#98, Marvisak#334 to Marvisak#492, validation)

The line rebuilt on the bundles' current heads (Marvisak#1402 119b763, Marvisak#1492 5bbc098
without Marvisak#98, Marvisak#1504 1d41891, Marvisak#1511 ca601f0) with every merge replayed, and the
merges after this file's first version (Marvisak#334, Marvisak#346, Marvisak#1024, Marvisak#211, Marvisak#492): merge
order, the runner's numbers on 967d3ae (RTX 571, WARP 570 + the known Marvisak#1084
failure, all features 580; Marvisak#98's one test leaves), what is not included (Marvisak#98,
Marvisak#282 for Marvisak#346, Marvisak#693 for Marvisak#1024, Marvisak#306's latest commit), and the open pull
requests whose head is contained here (109, from the 18:24 collection).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1984742628 added a commit to 1984742628/VIctory that referenced this pull request Nov 24, 2026
…l at the world)

In Series S mode the title asks for its FidelityFX upscale output as a
1920x1080 R9G9B9E5_SHAREDEXP texture with render target and unordered
access. PC D3D12 never allows either use in that format: the texture was
refused, and the render target view made for it in that format removed
the device ("CreateRenderTargetView: The format (0x43, R9G9B9E5_SHAREDEXP)
cannot be used with a RenderTarget view", then DXGI_ERROR_INVALID_CALL),
the moment the world began. Series X does not hit it: its title does not
upscale by default.

target_format now gives R16G16B16A16_FLOAT for R9G9B9E5_SHAREDEXP on every
host (PR Marvisak#492's rule, lost when this fork's tree replaced the one that had
it). Texture creation, clear values, render target views, pipeline formats
and the view checks all go through target_format, so they agree.
shortcut: a view of the stand-in reads the alpha written there, where
RGB9E5 reads 1.

Tests: the mapping, and the title's exact texture made on the host GPU.
Also fixes PR Marvisak#211's PresentX test for this fork's rtv() (an Option), which
did not compile with the diagnostics feature.

Verified in the game: Series S no longer loses the device; FSR upscales
(first upscale result=0) and the world runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/descriptor/host.rs, crates/victory-gpu/src/resource.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

@Yaekai
Yaekai force-pushed the fix/gpu-r9g9b9e5-render-target branch from c7bb83f to bf41b81 Compare November 25, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.