GPU: packed 16-bit colour targets the host cannot write are RGBA8 there #2624
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2626"
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 moe-miau on 2026-11-25T17:07:03Z.
Problem
B5G5R5A1_UNORM(86) andB4G4R4A4_UNORM(115) have no typed unordered access on NVIDIA, andB4G4R4A4is not a render-target format there.maindrops the texture the host refuses, and the next submission removes the device. This is the crash of #1952, #1781 and #2024 (RTX 3060, 3070, 4090).On an RTX 4070 SUPER,
main67e8ae1+ #1906 + #2098 dies 30 s after start with0x887A0004, 0.2 s after:Change
When the device lacks render-target or typed-UAV support for one of these two formats (
CheckFeatureSupport), their writable textures are made asR8G8B8A8_UNORM, and their views and pipeline render-target formats follow.texture::expand_row/pack_row).Ported from Zettrox/ztrx (commit
578d459), which is based on fxceless/victory-fork. Both are GPL-3.0-or-later. Compared with the fork, this adds the texel conversion on upload and readback, and per-format keys.Tested
RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build. Scripted Enter presses reach the intro cutscene; 6-minute runs.
67e8ae1+ #1906 + #20980x887A0004) after the format-115 target is refusedWith the fixes from review folded in (head
d1dc7ad), a second 6-minute run: no device removal,no host texture0 (the base had 1, the format-115 target), 141 compute pipelines refused (theWaveSize(64)programs #189 is about). The world stays black at about 8 s a frame on this stack because it leaves out #2178 (structured views as raw), which no longer merges withmain.cargo test -p victory-gpu --locked: 197 passed. 2 failed:dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, the same asmainon this card. New tests cover the format decision and the texel conversion of both formats, in both directions, including alpha.cargo clippy --workspace --all-targets --locked -- -D warnings, also with--all-features: clean.cargo xtask policy: ok.AI-assisted (Claude Code, with a review pass by Codex). Runs done on my machine.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-25T17:15:27Z.
Related: #2462 (no typed UAV in a format the host cannot store to). The two cover different cases and don't conflict:
B5G5R5A1no longer removes the device. The texture stays in the packed format and those writes are dropped.R8G8B8A8_UNORMwhen the host can't render or store to the packed format. That also covers the case #2462 doesn't reach: the 2560x1440B4G4R4A4(115) render target that NVIDIA refuses to create at all (no host texture ... format: 115), which is what removed the device here 30 s in. The title's writes to it are kept.With this PR applied, #2462's check no longer fires for these two formats on NVIDIA, because the textures and their views are RGBA8.
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:49:58Z.
Reviewed: the three pieces fit together — (1)
seen()now also treats aView::Unorderedon a packed texture (or any written shader view) as a texture needing copy-back, (2)fits()short-circuits whentarget_format(view) == ownso the RGBA8 host stand-in passes family checks, (3) copies guard withincompatible_copy/host_footprintso packed≠unpacked copies don't blit garbage. Moving the typed-UAV probe into sharedresource::format_supportalso converges with what #2442/#2462 did elsewhere — good dedup. CI green.Imported from Marvisak/VIctory. Originally posted by Machad3x on 2026-11-25T18:26:39Z.
Setup: RTX 3080 Ti (driver 621.24), Windows 11, a local stack of open PRs merged with main
67e8ae1.Tested on an RTX 3080 Ti (driver 621.24, Windows 11). Format support reported:
no render target for B4G4R4A4_UNORM (115), and no typed UAV store for it or for
B5G5R5A1_UNORM (86), so both take the RGBA8 path as intended.
It conflicts with a tree that carries #2332: the 115 to 86 mapping in
pc_formathas to go (and its test), or the targets never reach the RGBA8 path.With that, one 10-minute game run (together with #2601, #2598, #2576, #2611)
had no device removal.
Written with Claude Code; tested locally.
Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-25T19:04:42Z.
Thanks @Machad3x. Right: #2332 and this PR are alternatives for the format-115 target. #2332 remaps 115 to
B5G5R5A1(86) inpc_format, which still has no typed UAV store on NVIDIA. This PR keeps the guest format and makes the host texture RGBA8 wherever the device lacks render-target or typed-UAV support for 86 or 115, with texel conversion on upload and readback. If this one lands, #2332's 115-to-86 mapping (and its test) should go, as you found. Otherwise, a 115 target never reaches the RGBA8 path.Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-25T19:36:16Z.
RTX 4060 Laptop (610.47), merged onto main
13f91cae: both halves fixed (R8G8B8A8 host textures; the UAVs and the RTV are real views), on Intel UHD too, and a no-op on WARP; no new failures incargo test -p victory-gpuon any of the three. This is the only one of the #1753 PRs that does this. Details and the side-by-side table with the other #1753 PRs: https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623. Tested with the help of an AI assistant (Claude Code).Imported from Marvisak/VIctory. Originally posted by regiumlepidi on 2026-11-25T21:37:31Z.
Run report: RTX 5070 Ti (16 GB, driver 617.42), Windows 11 26300, Ryzen 7 9800X3D. Retail Series 1.0.2.1. Release builds, default switches, full
translate --cache --pipelinesbeforehand (27,160 pipelines: 23,127 made, 3,609 found in the library).main13f91cano host texture error=0x80070057 desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, flags: 1 }→0x887A0001main13f91ca+ #2626 (d1dc7ad) + #1763 (73a602b)no host textureline and no0x887A0001. Menus ran for ~2 min at 30 fps (frame 2048, 12,937 draws / 1,026 dispatches in the last log interval)So on this card #2626 removes the B4G4R4A4 start-up crash.
Merge note: #1763 conflicts with #2626 in
fits()(descriptor/host.rs). On top of #2626,typed_storeno longer exists. I resolved it with #1763'stargetlogic and atyped_store(format)that wrapscrate::resource::format_support(format).contains(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW).cargo test -p victory-gpu --lib -- --test-threads=1gives the same 2 failures with and without the two PRs on this card (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views;frame::waits_end_on_ticks_and_count_framesfails only when run in parallel). So the merge adds no regressions.The run with the fixes then ended on a different failure:
0x887A0006(hung) after a 4,820 ms submission of 25 lists, 135 distinct compute pipelines refused with0x80070057before it (wave64 compute on a 32-lane host, cf. #2688 / #1216). I'll report that separately once I have a diagnostics run.AI use: run, merge and report by Claude Code (Claude Opus 5.5) on the reporter's machine.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:15:43Z.
Automated triage for the maintainers.
Verdict: merge candidate. Thanks for the rebase, and to @steven-seagull27 for the readback tests. At
c8cc83e,resource::target_formatmakes writable B5G5R5A1 (86) and B4G4R4A4 (115) textures R8G8B8A8_UNORM whenCheckFeatureSupportreports no render-target or no typed-UAV support. The format is applied inhost_desc,shared_texture, clear values,RtvRecord, pipeline RT formats anddescriptor::host::fits.This PR also handles the copy paths that held back #2767:
list.rsread_backrepacks throughtexture::pack_rowwith a doubled footprint (host_footprint).expand_row.Stagingdetile expands the texels.alias_copy,copy_resourceandresolveskip mixed layouts behind a one-timeshortcutwarning.The conversions round-trip all 65,536 words in
packed_colors_round_trip_with_their_alpha, and devices that support the formats are unchanged. The evidence is hardware runs on an RTX 3070 and an RTX 4070 SUPER, plus a WARP and RTX 5080 run of the new tests.For the maintainers: this overlaps #89, #2767 and #2936, which widen the same formats, and #2773, which drops the refused uses instead. Only one direction should land.
CI: passing (
check). Merges cleanly.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-26T01:34:08Z.
@moe-miau I rebased your commit onto upstream
63bcca43for the conflict reported by triage. The conflict was between adjacent tests inresource.rs. Both sides' tests are present, andgit range-diffshows only the change in surrounding context. Your commit keeps its original author. Rebased commitI also put two optional GPU readback tests in a separate commit. They upload a 7×4 packed texture from a padded guest buffer, clear one texel to transparent red, then copy a 4×3 rectangle back to an offset inside a different footprint. They check all 4,096 bytes, including untouched texels and row padding. The clear has an independent expected guest value,
0x0f00for B4G4R4A4 and0x7c00for B5G5R5A1. Regression testsBoth adapters ran with the D3D12 debug layer. The all-feature GPU library suite, excluding the new tests and one presentation test that terminated the process on both revisions, went from 243 to 247 passes on RTX and 245 to 249 passes on WARP. The same two existing descriptor/memory tests failed on RTX on both revisions. Strict GPU Clippy and the asset-policy check passed.
To try the tested combination on a fresh local branch:
The branch
codex/pr2626-packed-forwardcontains just your rebased change. This was a synthetic D3D12 check. The in-game evidence remains the runs already posted above.AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-26T01:50:53Z.
@steven-seagull27 Thanks, taken as is:
6796b74(rebased onto63bcca4) and your testsc8cc83e, now the head of this PR. On an RTX 4070 SUPER:cargo test -p victory-gpu --all-features --lib packed_copy_tests2 passed;cargo test -p victory-gpu --lib235 passed, 2 failed (the two heap-cap tests #2628 fixes, failing onmainhere too); strict clippy and the asset policy clean.Imported from Marvisak/VIctory. Originally posted by walterwallaceson on 2026-11-26T03:02:50Z.
RTX 3070 on Windows 10,
main63bcca4+ #463: the fix holds onc8cc83e. The format 115 target (2560x1440) is created, and theno host texturerefusal is gone. On this card the refusal never removed the device, so without the PR nothing crashes, and the target is simply missing.Setup: RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045).
main63bcca4+ #463 (Agility SDK runtime, needed on Windows 10), then + this PR atc8cc83e(a clean merge). Diag build, scripted Enter at 17, 30 and 60 s, nothing skipped, 15-minute runs, one run each.main+ #463no host texture ... format: 115(2560x1440)A correction to what I saw earlier: in one earlier run without the PR the title stayed on its first screen, but that was a missed key press, not this bug. With the extra presses, both builds reach the world. The speed and copy differences come from one run each, so I wouldn't read much into them yet.
Not tested: a second run of each; whether the picture differs. The recordings are mostly dark on this setup either way.
No game data attached. I'm testing with Claude's help, and Claude drafted this comment.
Imported from Marvisak/VIctory. Originally posted by TheGrayOrange on 2026-11-26T04:46:23Z.
Tested
c8cc83eon RTX 4070 Ti SUPER, driver 621.24, with D3D12 validation enabled.Both existing
packed_copy_testspassed. Confirmed formats 115 and 86 used RGBA8 backing, with exact packed readback across all 4,096 guest bytes per test, including untouched padding. Zero D3D12 validation errors.Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T05:09:42Z.
Review: APPROVED
Tested merged onto
origin/main(63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP):cargo test -p victory-gpu --lib list::packed_copy_tests: 2 passed, 0 failed on RTX 5090 hardware (b5g5r5a1_partial_copy_preserves_guest_texels_and_paddingandb4g4r4a4_partial_copy_preserves_guest_texels_and_padding).VICTORY_WARP=1 cargo test -p victory-gpu --lib list::packed_copy_tests: 2 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by evan-kolberg on 2026-11-26T08:55:27Z.
An Apple GPU result for
c8cc83e. I adapted the production patch and the two existingpacked_copy_teststo VIctory-macOS08f76efand ran them on an M4 Pro with CrossOver 26.3.0.39832 and D3DMetal 4.0 beta 3. The guest process mapped that D3DMetal build.Support1=0x1e4d3fffor 86 and0x3ecd3fffor the selected format 28.0x7c00. All 16 in the inferred view returned0x83ff. The padded 2,048-byte buffer matched exactly.This covers the widened typed shader write as well as the existing transfer regression on a separate backend. All three test invocations used generated inputs. An in-game comparison of the patched runner is still pending. Tested and summarized with Codex.
Imported from Marvisak/VIctory. Originally posted by loren2000vlort-cmd on 2026-11-26T10:55:55Z.
Independent test report: RTX 3060 (Ampere, GA106), unit tests only, no game files.
The #1952 reporter has the same card model. Nothing below was run in the title.
Setup
cargo +stable, which is the pinned 1.98.1), MSVC, Windows SDK 10.0.26100.0.c8cc83e, and upstreammainat63bcca4(this PR's base) as the control. Each was in its own worktree.1. This PR's six tests (
c8cc83e)CPU only:
WARP:
Real RTX 3060:
list::packed_copy_tests::b4g4r4a4_partial_copy_preserves_guest_texels_and_paddinglist::packed_copy_tests::b5g5r5a1_partial_copy_preserves_guest_texels_and_paddingresource::tests::packed_textures_keep_the_guest_layout_until_writableresource::tests::packed_targets_require_both_writable_usesresource::tests::only_expanded_packed_texels_use_the_stand_intexture::tests::packed_colors_round_trip_with_their_alphapacked_filter also matchedcapture::tests::packed_float_classifies_special_and_finite_values, which is already onmain. That is the seventh test.--nocapture, no "skipping … (no D3D12 device)" line was printed, so the device-dependent tests did run.2. Regression check: full
victory-gpulibrary suite on the RTX 3060cargo +stable test -p victory-gpu --lib --locked -j 6 -- --test-threads=1, the same command on both trees:main63bcca4c8cc83eobject::tests::benchmark_private_data_releaseon both sides (#[ignore]).descriptor::host::tests::dynamic_slots_are_held_until_released:assertion failed: heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS. The assertion is atdescriptor/host.rs:2226onmainand:2210here, because this PR removes lines above it in that file.memory::tests::lists_share_a_table_and_copies_keep_their_views:past the dynamic slots(memory.rs:1030on both).git diff 63bcca4 c8cc83edoes not touchmemory.rs,HostHeap::new, the dynamic-slot sizing, or these two tests. They are the capped-view-heap failures already reported on other NVIDIA cards (#1744, #747), not caused by this PR.nvlddmkm,Display,dxgkrnlor TDR events during the runs.Not measured
CheckFeatureSupportflags for formats 86 and 115 on this GPU. The tests do not print them.b4g4r4a4_partial_copy_…only asserts that the format the host ends up using supports both render-target and typed-UAV access, and that check passed.HEAP_VIEWS.AI-assisted (Claude Code). The runs are mine, on my machine.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T11:15:35Z.
Review: APPROVED
Reviewed the packed 16-bit writable colour target fallback across resource creation, footprints, staging/copy paths, views, and pipeline state at
c8cc83e2.packed_target_formatonly substitutesRGBA8_UNORMforB5G5R5A1_UNORM(86) andB4G4R4A4_UNORM(115) when the texture is writable (TARGET | UNORDERED) and the host lacks eitherRENDER_TARGETorTYPED_UNORDERED_ACCESS_VIEW, keeping read-only packed textures in their guest layout.list.rsmaterializehost_resource(...)before queryingpacked_format(...), andhost_footprint/ region copy scaling (at * 2,n * 2, doubled 256-byte-aligned row pitch) stay consistent with the expanded 4-byte texels.expand_row/pack_rowpreserve channel order and alpha rounding across all 65,536u16values,Staging::detilehandles the final unpadded row safely,Staging::maybe_changedavoids clobbering GPU-written stand-ins, andRtvRecord,fits,view_format, clear values,memory_key, andGraphicsStateall match the stand-in format.Verified locally on Windows 11 with both RTX 5090 and WARP (
VICTORY_D3D12_WARP=1+--features diagnostics) underVICTORY_D3D12_DEBUG=1:cargo xtask policy(192 files ok) andcargo clippy -p victory-gpu --tests -- -D warnings(default and--all-features): clean.list::packed_copy_tests2/2,texture::3/3,resource::21/21,draw::tests::20/20,descriptor::21/21 passed with no Debug Layer warnings.list::packed_copy_tests2/2,texture::3/3,resource::21/21,draw::tests::20/20 passed.Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-26T12:57:33Z.
A stacked branch for 50-series:
main+ #2626 + #1763 + #2178 + #2098The two 50-series recipes in this thread now differ by exactly one PR, and it is the one about the picture rather than the crash:
13f91ca + #2626 + #1763 + #1906 + #2098-- 3.5 min into the intro cutscene, no removal.main + #1763 + #2178, program A of #1968 skipped -- the targets move but the presented image does not (depth dumps differ by 57.9 between frames while the 2560x1440 lit target, the TAA output and the presented image differ by 10.8).So the first set gets you in, and #2178 is what makes the picture actually follow. #2178's own description is the reason: on NVIDIA,
rawBufferLoadagainst aStructuredBufferdescriptor multiplies the byte offset byStructureByteStrideand returns zeros pastwidth / stride. Zeros from a buffer read is exactly what a black or frozen frame looks like from the outside, and it would explain both reports above.#1906 is merged now, so the set is #2626 + #1763 + #2178 + #2098 on current main. Three of the four are small (#1763, #2098 one file each; #2178 six files); #2626 is the nine-file one.
Would someone with all four in front of them push one branch?
moe-miauhas #2626 and #2098,n-romanovichhas #2178, and both branches are based on main, so a linear stack should not need code decisions from me -- just order and a rebase.I will run it here on an RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074): diag build, DRED on, full debug-layer log, and I will report frame times plus a per-frame luminance series, because the failure on this card is not only the removal but a picture that alternates black and drawn for seconds at a time. A branch name in this thread is enough.
Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-26T14:34:27Z.
On current main (
63bcca4) this looks like the single remaining blocker for a visible pictureMachine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200. Title 1.0.2.1, Series X profile. Release build, no patches applied by hand -- the first time that is true here.
What main does now, after #2462 + #2286 + #1906:
VICTORY_KEYSneeded to get in.The log has exactly one relevant line:
So the
B4G4R4A4_UNORM2560x1440 render target is still refused, and as potatoe0100 said it is no longer fatal -- but nothing is drawn into it, so the world's output is black while 2,610 draws are submitted. That matches the geometry #841 describes from the other direction (targets that move, presented image that does not).The view heap is still capped too (
host view heap capped at 1000000 ... count=1245184), and that is not fatal either.So #2626 looks like the one that turns this from "runs, black" into "runs, visible" here: an RGBA8 stand-in for the packed target is enough for a 2560x1440 surface that is only ever rendered into and then scaled.
If there is a branch with #2626 on current main, I will run it now: diag build available, DRED on, and I can report frame times, a capture of the presented image, and whether the black frame count changes.
Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-26T16:17:02Z.
This one is clean and green -- is it held for a reason, or just not scheduled?
mergeable: true,mergeable_state: clean, CIsuccessonc8cc83e, nine files. No conflicts with63bcca4.On current main (
63bcca4), an RTX 5070 Ti runs the title to the world with no device removal and no flicker, 2,610 draws/frame, and the picture is pure black. The only relevant line in the log is the 2560x1440B4G4R4A4_UNORMtarget being refused. As much as anything, this PR is the difference between "runs, black" and "runs, visible" on 50-series -- the rest of the chain already merged.Happy to run it as soon as it is in
main.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T17:42:25Z.
I extended the existing partial copy and clear test to mip 1 of a synthetic 14×8 texture. It uploads the 7×4 mip, clears one texel through an RTV for mip 1, then reads a cropped region into an offset guest footprint. All 4,096 bytes matched for each of B5G5R5A1 and B4G4R4A4, including the surrounding padding. Test commit on
c8cc83eApp-local WARP 1.0.22 / Agility 1.620.2 supports both packed formats directly. The same mip-1 test passed on
63bcca4and on this branch with those capabilities. I used a temporary test-only format-support override to exercise the fallback: D3D12 created RGBA8 backing for both formats, and the four mip-0/mip-1 cases still matched every byte. The branch contains the mip test extension.All eight packed tests and the full native-capability GPU suite passed (253 passed, 1 ignored). Both Clippy configurations and the asset policy passed. If taking the test, please retain its Git author or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>when folding it into another commit. AI-assisted with Codex.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T20:07:35Z.
I checked this head with #3340’s target-format variants in
5581f9f. Its keys use the formats actually passed to D3D12. The new CPU regression compares the translated graphics-stream key and the key from the recorded RTV. They agree for formats 86 and 115 both with native support and in a synthetic capability configuration where both use RGBA8 (28). Details and the standalone fix are on #3340.If the two PRs land separately, this is a tested reference for the key handling in the second. Please preserve the Git author or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if you fold the test or resolution into another commit.Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-27T02:36:25Z.
@andrewpozdnakov7-jpg thanks, I took your mip-1 test commit as is, with your authorship kept. The 7 packed tests pass here on an RTX 4070 SUPER. On the #3340 key handling: if #3340 lands first, I'll rebase onto it.
Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T13:38:15Z.
On an RTX 5070 Ti, this PR is the one that turns main from black to visible -- and with #2098 and #2178 stacked it is also the fastest 50-series build I have run
Built by merging three PRs onto
main63bcca4with git (all three merged cleanly, no manual edits): this PR, #2098, and #2178. Machine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200, title 1.0.2.1, release build.mainaloneNo device removal in any of the three, and no flicker.
no host texture ... format 115disappears as soon as this PR is in, which is the whole of the difference between the first row and the second: the 2560x1440B4G4R4A4_UNORMtarget exists, so the 2,610 draws have somewhere to land instead of being discarded.#2178 is worth ~3.5x on frame time here and roughly four times the draws per frame at the same settings, so the two stack rather than substitute: this one for the target, that one for the reads.
The remaining cost is CPU: a submission is 1.1-1.7 s and
slow host submission ms=4532appears while the world loads. That is not this PR's ground, just what is left.If it helps, the merge is three commands (
git fetch origin refs/pull/2626/head:pr2626, same for 2098 and 2178, then threegit merge --no-edit), and I can rerun any combination on this card and report the same three rows.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T14:02:25Z.
I updated the target-variant check for the current #2626 (
6092548) and #3340 (f8df6ee) heads on63bcca4. The commits merge cleanly. On a device that needs the packed-format fallback, the combined code can send an RGBA8 RTV to D3D12 while using the original packed format as the bound-target pipeline key.Follow-up
e6b453fapplies the sametarget_formatmapping to the key. With a test-only capability override that reports no writable support for formats 86 and 115, the unchanged combination fails with key 86 and view 28. The follow-up passes the same check for both packed formats and the RGBA8 control. The capability override was removed before publishing.The three packed-copy tests and the key test passed on the normal adapter path. The app-local WARP 1.0.22 run passed all 29 pipeline tests on repeat and the three copy tests. The first app-local suite failed to produce the synthetic placed-UAV pipeline, which passed in isolation and in the full repeat. The stock WARP depth-bounds test failed on both the original and patched combination. Strict GPU Clippy in both feature configurations and the asset check passed.
This updates the integration result from the earlier 5581f9f branch. The next step is for the PR authors to use the targeted commit when combining the changes. A physical fallback retest is still open. Please keep the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding it in. AI-assisted. Synthetic tests only.Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T15:24:31Z.
The physical retest you are waiting on has been done here, and the fallback path works on hardware as-is -- without #3340 or
e6b453fRTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200, title 1.0.2.1, release build. Built by merging
refs/pull/2626/head,refs/pull/2098/headandrefs/pull/2178/headontomain63bcca4; all three merged cleanly and nothing was edited by hand. So this is the plain PR head, not your key follow-up.Result on the card that needs the fallback:
mainalone"Correct" here means the opening title card, subtitle overlay and end credits all render, and
no host texture ... format 115is gone from the log. No device removal and no flicker in any of the three.So on this machine the RTV/view mismatch your synthetic override describes did not surface at the API level: the D3D12 calls were accepted and the frames are right. Either the driver reports the format as writable here and no fallback was taken, or the fallback was taken with the original format still used as the pipeline key and it did not matter for these submissions. I cannot tell which from the log alone -- if there is a one-line way to log whether
target_formatactually substituted, I will run it and say.Two things this does not cover: the frame rate is CPU-bound at ~1 s per submission, and the dark overlapping surfaces that #841 is chasing are still there.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T15:40:33Z.
@ChenmouXu Thanks for checking the plain #2626 head in your hardware stack. The prior pipeline-key check measured the combination of #2626 and #3340.
Diagnostic commit
76f8792applies directly to #26266092548. It prints onepacked target formatINFO line per requested packed format, so the default release log is enough. For guest format 115 or 86,host_format=28meanstarget_formatselected RGBA8. A matching guest and host number means it kept the packed format.On app-local WARP 1.0.22 I got one line each for 86→86 and 115→115. Temporarily forcing the missing-capability case in the synthetic fixture produced exactly one line each for 86→28 and 115→28. The published commit adds only the diagnostic. All eight packed-format tests passed, along with strict GPU Clippy and the asset policy.
If you retest your current stack with this commit, please post the
packed target formatlines. Those console lines are enough to identify the selected formats. If you reuse the diagnostic in source, please retain the Git author on cherry-pick or rebase, or useCo-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding it into another commit.AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T16:01:01Z.
Diagnostic output from the 5070 Ti -- the fallback is taken here, not the native path, and the frames are correct
Applied
76f8792on top of the same stack (main63bcca4+ #2626 + #2098 + #2178), release build, default log level. Two lines, nothing else:So on this card both packed formats go to RGBA8 -- it does not report them as renderable targets -- and the substitution is what the picture comes from. That answers the question I could not settle from the log before: it is your fallback path, taken for real, not a native path that happened to work.
With that build the opening scene renders: Lucia at the window, the chain-link fence, the watchtower and the sunset behind it, with the subtitle line showing. ~888 ms/frame at that point, 3,688 draws/frame, no device removal. The first few frames come out washed out and settle once the exposure/TAA converges, which at 1 fps takes several seconds -- worth knowing before anyone reads a bright frame as a colour bug.
So for the earlier question about the pipeline key: the key still uses the packed format while the RTV is RGBA8 here, and nothing broke at the API level in a 20-minute run. If anything downstream of this wants the same diagnostic,
76f8792prints one line per format and the default release log is enough.Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T18:24:43Z.
One more data point, on where the remaining time goes after this PR -- and a hint from a fork that submission-side work is the next lever
Same hardware, stacked build (
main63bcca4+ #2626 + #2098 + #2178), release, no debug layer. With the picture correct, the steady state in the opening room is ~888 ms/frame at 3,688 draws/frame, and during the world load the log hasslow host submission ms=4532 lists=30. Nine cores are busy while that happens, so this is the CPU translating and submitting, not the card.For scale, the same card on a fork that moves submission off the single thread (
VIctory-NVIDIA,VICTORY_ASYNC_SUBMIT=1) goes from 355 ms to 294 ms at a similar draw count. Not a comparison between trees -- different code -- but it says the submission path is worth a few tens of percent on its own, before anything about shaders changes.That is the only thing I would ask for after this PR: the frame is correct, the target exists, and what is left is that one thread.
VICTORY_GPU_TIMING=1already attributes a slow list to its slowest command if someone wants the shape of it; I can run that on this stack and post the result if it is useful.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T18:27:50Z.
@ChenmouXu Yes, a short timing sample from the same stack would help. Could you share two or three of the regular
ms/framelines with thepreparing,on the GPUandcopying backvalues and the draw counts?On the stated
mainbaseline,slow host submission ms=4532is measured after preparation. It covers the queue submission and the wait for its fence. The regular frame line includes the preparation time separately. Timer in host.rsIf you already have a
VICTORY_GPU_TIMING=1sample, the slowest command types and their durations would help locate the wait. That mode runs lists separately, so the ordinary frame lines are the baseline for comparing frame times. Aggregate timings are enough.Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T19:19:06Z.
Timing samples from the 5070 Ti, from the stack you asked about -- and the shape is not what "slow submission" suggests
Same machine (RTX 5070 Ti Laptop, Blackwell, driver 32.0.16.1074),
main63bcca4+ #2626 + #2098 + #2178 + your diagnostic commit76f8792, release build, Series S profile, DLSS Quality (0.667), 4,611 draws/frame.Regular frame line:
The submitting thread's own breakdown for that frame:
Two things stand out, and neither is the submission itself:
Sending the lists is 3.2 ms of the 206. The time is
waiting for flights(77.1 ms),snapshots(46.0), the lists' steps (55.2) andcopying back(100.0 ms, for 27.8 MB). So the queue submission and its fence wait are not where the frame goes here -- ifslow host submission ms=4532on your baseline is the same measurement I am looking at, it may be measuring the wait rather than the send.Copying back 27.8 MB costs 100 ms. That is ~280 MB/s effective, which looks like per-range stalls rather than bandwidth. #2428 ("a submission refreshes a copy's ranges disjoint, not their span") sounds like it might be the same ground; I do not know if it is in
63bcca4.Also visible in that line: 271 draws dropped for want of a host pipeline and 591 indirect ones left out on purpose. The pipeline coverage is still incomplete at this point, which is worth knowing before reading the frame rate as a rendering limit.
If it helps, I can run
VICTORY_GPU_TIMING=1on the same save and post the slowest command types with their durations -- say the word and which limit you want.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T19:25:06Z.
Thanks, @ChenmouXu. The sample separates the 3.2 ms spent sending lists from 77.1 ms waiting for flights and 100.0 ms copying back 27.8 MB. On main at
63bcca4,slow host submission msmeasures from the end of CPU preparation through submission and the fence wait, ending before the copy-back. The 4,532 ms warning and this stack's per-frame send column cover different intervals.#2428 is still open and
63bcca4still combines refresh requests into a span. That patch works on refreshes into the host copy, so its relevant comparison would be the refresh and copy portion of preparation. The 100 ms result is the separate copy-back path.You've already confirmed both packed-format substitutions on this adapter. These timings give us enough context for the #2626 review. No additional timing run is needed from you for this PR.
Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T20:26:54Z.
Series S still comes out black on this stack, and the reason is a third packed format this PR does not cover -- maybe the substitution should follow the host's answer rather than a list of formats
Same machine and stack as before (
main63bcca4+ this PR + #2098 + #2178, diagnostics build), only the console profile changed:format 67isR9G9B9E5_SHAREDEXPrequested as render target and unordered access (flags: 5). This PR redirects 86 and 115, and both of those reportpacked target format guest_format=86/115 host_format=28here, so the substitution works for them -- but 67 goes to the host unchanged and the target is refused, so the picture is black in Series S where Series X is fine. The difference is only the profile: Series X asks for 2560x1440, Series S for 1920x1080.Suggestion, if it is cheap: drive the substitution off
CheckFeatureSupportfor the requested format and flags (as #1832 does for typed UAVs) rather than a table of packed formats, so the same path covers 67, 86, 115 and whatever a later title asks for. A table will keep catching these one at a time, and each one looks exactly like this: a target that silently does not exist and a black picture.Happy to run whatever build tests it -- the Series S case is a one-flag change here, and the log line above is the check.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T20:45:32Z.
@ChenmouXu I tested a combination for the format-67 creation error in your Series S run. It keeps the packed 86/115 handling from #2626 and includes @Yaekai's RGB9E5 capability check and RGBA16F fallback from #492. The two exact PR heads are the parents of the test branch. Combined commit 8ba4fa4
On local Windows WARP, I forced the capability answers for formats 67, 86 and 115 to exercise the fallback paths. The RT+UAV texture, explicit RTV and pipeline target agreed on RGBA16F for 67. A real RTV clear read back (2.0, 3.5, 0.5, 1.0) in both test pixels. Formats 86 and 115 still used RGBA8, and their partial copy/readback tests retained the original packed texels and padding. Sampled-only format 67 still used native RGB9E5. The regular diagnostics run passed 263 project GPU tests and the SDK/WARP identity check, with one ignored test. Both strict GPU Clippy configurations and the asset policy check passed.
I used synthetic textures. This branch still has the RGB9E5 mixed-format alias and cross-family copy limits described in #492. If you can do the Series S rerun you offered, could you keep your previous stack/settings, add the combined #492 path and check whether the format-67 E_INVALIDARG line is gone and whether a picture appears? Test branch
If you reuse the merge resolution or the added regression tests, please retain the original Git author when cherry-picking or rebasing. If folded into another commit, please add the trailer below.
Co-authored-by: andrewpozdnakov7-jpg [email protected]
Imported from Marvisak/VIctory. Originally posted by lhnizdo on 2026-11-27T21:27:51Z.
RTX 2080, Windows 10 (19045): the stand-in works, and frames got faster.
Tree: my game stack (
main63bcca4plus #2920, #3584, #2958 and diagnostics) with this PR's head6092548merged. It merged cleanly. Diagnostics build, warm caches. Each run is 6 minutes in the opening prison cell, with the BVH builder running.Without this PR, the first frames log:
With it, none of these three lines appears, and the run has no device loss.
Frame time, medians of the last 15 frame lines of each run:
That's one run each, so take the 18% as indicative. Draw counts are similar.
What it doesn't change here: the cell's green cast is the same in both runs, so that comes from elsewhere.
AI-assisted (Claude Code). No game data attached.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T21:37:34Z.
@lhnizdo Thanks for the RTX 2080 comparison. The missing 86/115 warnings after
6092548are the device check this fallback needed.I tested one more capability case on that exact head. Direct3D 12 reports typed UAV view support in Support1 and typed stores separately in Support2. With a synthetic answer that offered an RTV, a typed UAV and typed loads, the original policy kept format 86 even without stores. The follow-up requires the store bit when choosing writable formats 86 and 115. D3D12 format support · Follow-up commit
On local WARP, a test-only override cleared just that store capability for the packed formats while exposing the other required flags. Both writable textures used RGBA8. Partial copies preserved their guest texels and padding at mips 0 and 1. The normal capability suite passed 253 project GPU tests and the SDK identity check, with one ignored test. Both strict GPU Clippy configurations and the asset policy check passed.
The persistent green cast has a separate Series X data point from the ambient fallback investigation. RTX 4070 SUPER report in #3414
If reusing the change or test, please retain the Git author when cherry-picking or rebasing. If folding them into another commit, please add the trailer below.
Co-authored-by: andrewpozdnakov7-jpg [email protected]
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.