Skip to content

Series S: the second present plane, and a plain stretch for the upscale dispatch - #188

Open
sagouindupm wants to merge 9 commits into
fxceless:mainfrom
sagouindupm:series-s-pr
Open

sagouindupm wants to merge 9 commits into
fxceless:mainfrom
sagouindupm:series-s-pr

Conversation

@sagouindupm

@sagouindupm sagouindupm commented Nov 24, 2026 •

Copy link
Copy Markdown

Update (8dd30ab): main now carries the R9G9B9E5 stand-in itself, so after the merge of main this PR no longer changes resource.rs. What it adds is the second present plane, the stand-in stretch for the upscale dispatch and their tests; the two commits of #32 are still in the branch's history but change nothing against main.

Gets the Series S mode (--console series-s) from a black window to a rendered world on an 8 GB NVIDIA card. Stacked on #32 (its two commits are the first two here, unchanged, by their author); the commits after them are this PR's.

Merge order: #32 first, then this. Once #32 is merged I rebase this branch onto main, which leaves only this PR's own commits; if this is merged first instead, #32's two commits come in with it and #32 can be closed as merged. Please do not merge both as they stand.

What is in it

  • crates/victory-gpu/src/over.rs (new), host.rs, queue.rs: a present's second plane is drawn over the first. In Series S mode the title presents two planes (game image 1920x1080, interface 3840x2160 with alpha 0 where empty) and only the first was shown, so menus and loading screens were black. The second plane is drawn after the copy of the first, stretched to the back buffer and blended by its alpha (taken as premultiplied). Its views are kept in a ring, so presents sent ahead keep theirs.
  • crates/victory-hle/src/modules/ffx.rs (new), apps/victory/src/run.rs, crates/victory-gpu/src/list.rs: the executable's import of ffxDispatch is bound to ours. An upscale dispatch (type 0x10001, the public FidelityFX API layout; the title renders 1280x720 and asks for 1920x1080) becomes a compute pass that writes the output from bilinear samples of the colour input, then replays the list's state. Any other dispatch, and an upscale that cannot be stretched, goes to the title's own DLL. The console upscaler's passes are not translated ("falling back to NewBE" in the title's log), so its output was never written and the world was black behind the interface.

Tested

  • NVIDIA GeForce RTX 3050 8 GB, Intel Core i5-12400F, 32 GB RAM, Windows 11 Pro 26200, Rust 1.98.1.

  • Runs were made on 8f3f488 (these commits before the rebase onto current main; the rebase brought in only the two lane-mask commits):

    • release build, --console series-s, about five minutes: menus and loading at 30 fps; the opening cutscene renders at 0.4 to 1.2 s a frame with peaks of 3 s; the card about a quarter busy; 7 GB of video memory; no host error.
    • diag build with VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1, same mode, about five minutes: no debug-layer message, no device removal.
    • Series X on the same machine before these commits' last one: world renders at 2 to 7 s a frame (for comparison, not a test of this change).
  • After the rebase (66804e3, now 19a0240: the same tree, commit messages rewritten): cargo check --release -p victory passes; cargo test --release -p victory-gpu -p victory-hle: 110 passed, 0 failed, 1 ignored and 95 passed, 0 failed, plus no_dll_planting 1 passed.

  • After the review (82231c3): cargo test --release -p victory-gpu -p victory-hle: 113 passed, 0 failed, 1 ignored and 97 passed, 0 failed, plus no_dll_planting 1 passed. One release run with --console series-s, about 3.5 minutes: both passes fire, the world renders, no host error.

  • After c022e4d (explicit root signatures): cargo test --release -p victory-gpu --lib: 114 passed, 0 failed, 1 ignored, three times; an earlier run of the whole test binary ended in an access violation once and did not again. One release run with --console series-s, about 3 minutes: both passes fire, menus and the world render, no host error.

  • 03d1791 (by Filip722) adds a GPU read-back test of both passes; with it cargo test --release -p victory-gpu --lib: 115 passed, 0 failed, 1 ignored. Filip722 confirmed c022e4d under Proton (thread below).

Not tested

  • Wine / Proton: not run here. The two root signatures are serialized by the runtime since c022e4d (the compiler there writes none into the shader, reported in the thread below); the HLSL itself still goes through host::compile.
  • Series X after the last commit (it does not dispatch the upscaler in the runs made, but that was not rerun).
  • AMD and Intel cards; any card other than the one above.
  • Gameplay past the opening cutscene; planes after the second; a plane's placement parameters.
  • The stretch has no temporal accumulation or sharpening and ignores the depth and motion inputs: edges are aliased and the jitter the title applies is visible.

Related

AI use

  • Claude Code with Claude Fable 5.2 wrote this PR's commits and this description and made the runs above.

🤖 Generated with Claude Code

RicerBoy added a commit to RicerBoy/DropItLikeItsHot that referenced this pull request Nov 24, 2026
…resent plane, and a plain stretch for the upscale dispatch

Part of #16
@N7z

N7z commented Nov 24, 2026

Copy link
Copy Markdown

Works here: with this branch, --console series-s renders menus, loading and the world instead of a black screen.

Setup

  • Laptop: NVIDIA GeForce RTX 4060 Laptop GPU 8 GB, Intel Core i7-13620H, 16 GB RAM, Windows 11 Pro 26200.
  • pr-188 at 66804e3, cargo build --release -p victory, no extra environment variables.
  • cargo test --release -p victory-gpu -p victory-hle: 110 passed, 1 ignored; 95 passed; no_dll_planting 1 passed.

From the log (about 3.5 minutes)

  • All three parts fire: stand-in is used format=67 stand_in=10, a present's second plane is drawn over the first format=28, and upscale dispatch ... render=[1280, 720] upscale=[1920, 1080].
  • Menus and loading: 30 fps.
  • World: 1.3–2.1 fps (peak 3.2), 480–790 ms/frame, 2,700–7,100 draws/frame, 350–2,150 dropped without a host pipeline.
  • No device removal, no host error; the run ended when I closed the game.

On the same machine, Series X runs out of RAM after about 7 minutes, so Series S is the useful mode for 16 GB / 8 GB machines.

No game data.

(AI-assisted: Claude Code built the branch, read the log and wrote this comment.)

armin and others added 4 commits November 25, 2026 00:06
No PC GPU renders to R9G9B9E5, so CreateRenderTargetView on such a
target removes the device. Add it to the existing stand-in table, next
to the 16-bit colour formats.

(cherry picked from commit 7dc19f2)
(cherry picked from commit 9ba864a)
… for the upscaler's output

Two passes of ours for the title's Series S mode, in a new module `over`.

A present there has two planes: the game image at 1920x1080 and the
interface at 3840x2160, empty texels zero with alpha zero. Only the first
plane's first resource was shown, so the window was black through the menus
and loading screens. The second plane (its description 0x48 bytes after the
first, laid out the same) is now drawn over the back buffer after the copy
of the first: one triangle, the plane sampled across the whole buffer,
blended by its alpha, taken as premultiplied.

`list::upscale_stretch` records, on a title list, a compute pass that writes
a texture from the bilinear samples of the top-left part of another, then
replays the list's state. It is what the upscale dispatch is given in place
of the console upscaler (next commit).

Measured on an RTX 3050 8 GB, Windows 11: with `--console series-s` the
menus and loading screens are visible at 30 fps where the window was black.
One plane behaves as before. No test yet; planes after the second and a
plane's placement parameters are not read.
In its Series S mode the title renders at 1280x720 and calls the console's
FidelityFX upscaler (`ffxDispatch` of amd_fidelityfx_loader_xbox.dll) to make
the 1920x1080 output. The loader and upscaler are the title's own DLLs and
run, but the upscaler's passes are compute pipelines in a container that is
not translated ("falling back to NewBE" in the title's log), so the output
was never written: the world was black behind the interface.

The executable's import of `ffxDispatch` is now bound to ours. An upscale
dispatch (type 0x10001, the public FidelityFX API's layout) is recorded as
`victory_gpu::list::upscale_stretch` of its colour input into its output;
any other dispatch, and an upscale that could not be stretched, goes to the
title's DLL. The DLL is not registered as an HLE module: that kept the
title's own from loading and left its other three entry points missing.

Measured on an RTX 3050 8 GB, Windows 11, release build, on top of the
R9G9B9E5 stand-in (fxceless#32): the Series S world renders (opening cutscene), 0.4
to 1.2 s a frame with peaks of 3 s, the card about a quarter busy, 7 GB of
video memory, no host error in a five-minute run. Series X is not affected
in the run made (it does not dispatch the upscaler).

Not done: temporal accumulation, sharpening, use of the depth and motion
inputs. No test yet. Only the opening cutscene was looked at.
@Jonirulah

Copy link
Copy Markdown

Tested on Windows, works for menus in Series S mode.

Setup: NVIDIA GeForce RTX 3070 Laptop GPU, AMD Ryzen 7 5800H, 32 GB RAM, Windows 11 IoT Enterprise LTSC (build 26100), rustc 1.99.0. Diag build (--profile diag --features diagnostics) of this branch at 19a0240, merged as a fast-forward onto fork main (2119b0e). Run with --console series-s --unimplemented zero.

Before (fork main without this PR): the window and the VICTORY_CAPTURE frames were solid black at 5-19 draws/frame. The log showed amd_fidelityfx_upscaler_xbox.dll refused by the host policy.

With this PR:

  • The first-boot setup screen ("UI TEXT SIZE") renders correctly at a steady 30 fps.
  • Once it moves into the heavier scene, it runs at about 2.5-4 fps (280-390 ms/frame, ~160 draws/frame). The picture there is still mostly a flat dark frame so far, and I haven't confirmed yet whether that's the cutscene or loading.
  • After ~2 minutes: no ERROR lines, no device removal/DRED.

Remaining warnings (same as without the PR): unimplemented pipeline creation methods at device slots 0x1c8 and 0x218, depth bounds test dropped on 4 pipelines, and the host view heap capped at 1,000,000.

Thanks, this fixes the black Series S menus here.

@ErRusso ErRusso 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.

Reviewed at 19a0240 against 2119b0e. The first two commits are #32's and unmodified; the review below covers the last two.

Verification:

  • cargo xwin check --release -p victory-gpu -p victory-hle passes.
  • victory-gpu --lib under Wine: 110 passed, 0 failed, 1 ignored.
  • victory-hle --lib under Wine: 94 passed, 1 failed (net::tests::only_loopback_is_reachable, Wine lacks WSAConnectByList; unrelated).

Requesting changes for three concrete items:

  1. over.rs:245-247 writes out of bounds for non-multiple-of-8 sizes. Dispatch(width.div_ceil(8), height.div_ceil(8), 1) launches threads past target's width/height, and the shader writes target[id.xy] unconditionally. The tested 1920x1080 and 1280x720 happen to divide by 8, but the pass is generic. Add if (id.x >= width || id.y >= height) return; (pass the dimensions in the constants or use GetDimensions) instead of relying on typed-UAV out-of-bounds writes being discarded.

  2. ffx.rs:108-111 returns success when there is no real dispatch. If REAL == 0 and upscale_stretch returns false, dispatch returns 0 (FFX success) without writing the output or calling the title's DLL. That is the silent-black case this PR is meant to remove, and it also masks a missing loader/export. Return a non-zero FFX error, or log once and make the interception conditional on REAL != 0 in run.rs so the original import is not replaced when no fallback exists.

  3. No tests for the new logic. The compile-time offset_of!(Upscale, output) assert is good, but the PR adds 671 lines of unsafe ABI/descriptor code with no test. Please add at least unit tests for the pure pieces: typed() mappings, Upscale offsets for render/upscale (not just output), and the plane-selection predicate. A GPU test for the stretch/over passes would be better, but the pure checks are the minimum.

Process: #32 is still open and its two commits are carried here. Please state the merge order explicitly (or rebase this onto #32) so reviewers do not merge #32 twice or merge this without #32's review.

Non-blocking:

  • record_stretch caches a failed make_stretch as None forever (over.rs:334), unlike over::record, which retries. A transient first-call failure leaves the output black for the session.
  • RING = 16 and STRETCH_RING = 64 are fixed in-flight assumptions; document or derive them from the maximum presents/dispatches sent ahead.
  • On Wine, both new shaders go through host::compile; without #20's root-signature fallback they will fail CreateRootSignature. Worth noting as a dependency for Proton/Series S.

@ryotdev

ryotdev commented Nov 24, 2026

Copy link
Copy Markdown

Confirmed a lit 3D scene on a desktop RTX 5070, Windows, NVIDIA 610.88. I applied the four commits from 19a0240 onto #63 plus a local shader visibility fix. Git range-diff matched all four patches. Both profiles used the same checkpoint and diagnostics settings, including VICTORY_LATE_WAIT=3.

With --console series-s, loading artwork and the prison yard both appeared in the actual window. At the same rear doorway, the dominant world viewport was 1280×720 versus 2560×1440 on my Series X reference. The foreground chain-link was visible on Series X and absent in the Series S view. The character’s hair also showed bright stippling on Series S. The profiles differ, so this comparison leaves the cause open.

The last Series S interval was 424 ms/frame at 4,481 draws. All nine timing intervals late in the Series S capture were still compiling pipelines from its fresh cache. A warm-cache comparison would be needed to establish a speed difference. The run reached its target frame without device removal.

AI-assisted build, capture, and review.

… is an error; tests

What the review of fxceless#188 asked for.

- over.rs: the stretch's groups are 8 by 8 and reach past a target whose
  size is not a multiple of 8; the shader now reads the target's size and
  returns for texels outside it, instead of leaving them to out-of-bounds
  writes being dropped.
- ffx.rs: a dispatch that was neither stretched nor passed to the title's
  own DLL (none found) returned success with the output unwritten. It now
  returns FFX_API_RETURN_ERROR and says so once in the log.
- queue.rs: the choice of a present's second plane is a function of its own
  (`second_plane`), so it can be tested.
- over.rs: a stretch pass that could not be made is tried again at the next
  dispatch, as the pass over a present is; the two view rings say what their
  fixed sizes rest on.

Tests: the typed-format mapping and the stretch's bounds guard
(`over::tests`), the second plane's choice over seven cases
(`queue::plane_tests`), the upscale description's offsets and the
unanswered dispatch (`ffx::tests`).

`cargo test --release -p victory-gpu -p victory-hle`: 113 passed, 0 failed,
1 ignored; 97 passed, 0 failed; `no_dll_planting` 1 passed. One release run
with `--console series-s` on an RTX 3050 8 GB, about 3.5 minutes: both
passes fire, the world renders, no host error.
@sagouindupm

Copy link
Copy Markdown
Author

Thanks for the review; all three items are addressed in 82231c3.

  1. Out-of-bounds writes. The stretch now reads the target's size (GetDimensions) and returns for texels outside it, so sizes that are not multiples of 8 no longer rely on out-of-bounds writes being dropped.
  2. Success with no real dispatch. When the dispatch is neither stretched nor passed on (the title's own ffxDispatch was not found), it now returns FFX_API_RETURN_ERROR and logs that once. I kept the interception unconditional and made the failure visible instead, so a missing loader shows up as an error from the call rather than as a black frame.
  3. Tests. Added: the typed() mapping, the bounds guard in the stretch's source, the upscale description's offsets (list, colour, depth, motion, output, jitter, motion_scale, render, upscale, and Resource's fields), the unanswered dispatch returning an error, and the plane choice. For the last one the predicate moved out of the present into second_plane, tested over seven cases (one plane, no descriptions, same resource, empty plane, no list, null resource, and the valid one). No GPU test of the two passes yet; I agree that would be better and say so under Not tested.

Process: the description now states the merge order (#32 first; I rebase once it lands so only this PR's commits remain).

Non-blocking:

Verification on 82231c3: cargo test --release -p victory-gpu -p victory-hle: 113 passed, 0 failed, 1 ignored; 97 passed, 0 failed; no_dll_planting 1 passed. One release run with --console series-s on an RTX 3050 8 GB, about 3.5 minutes: both passes fire, the world renders, no host error.

AI-assisted: Claude Code (Claude Fable 5.2) wrote the changes and this reply and made the run.

@Filip722

Copy link
Copy Markdown
Contributor

On 82231c3, the Series S account picker was black on Bazzite 44 with an RTX 5060 Laptop GPU (8 GB), driver 615.78.08, Proton Experimental 11.0-20261112 and vkd3d-proton ec20719. All seven window samples from a 25-second run were black. With a local change that serializes the overlay and stretch root signatures using D3D12SerializeRootSignature, five of six samples showed the account picker. The runs used separate prefixes cloned from the same seed, the same cache contents at launch and no input.

An asset-free test isolated the failure. Wine’s compiler returned success for both shaders but emitted no RTS0 chunk. Both calls to CreateRootSignature failed with E_FAIL. After the change, four focused tests passed on the RTX, including a readback of all 15 pixels from a stretched blue scene with transparent, premultiplied green and opaque red overlay regions. This comparison ends at the account picker.

OpenAI Codex assisted with the patch, testing and report.

justlovett0 pushed a commit to justlovett0/victory-gta6 that referenced this pull request Nov 25, 2026
… is an error; tests

What the review of fxceless#188 asked for.

- over.rs: the stretch's groups are 8 by 8 and reach past a target whose
  size is not a multiple of 8; the shader now reads the target's size and
  returns for texels outside it, instead of leaving them to out-of-bounds
  writes being dropped.
- ffx.rs: a dispatch that was neither stretched nor passed to the title's
  own DLL (none found) returned success with the output unwritten. It now
  returns FFX_API_RETURN_ERROR and says so once in the log.
- queue.rs: the choice of a present's second plane is a function of its own
  (`second_plane`), so it can be tested.
- over.rs: a stretch pass that could not be made is tried again at the next
  dispatch, as the pass over a present is; the two view rings say what their
  fixed sizes rest on.

Tests: the typed-format mapping and the stretch's bounds guard
(`over::tests`), the second plane's choice over seven cases
(`queue::plane_tests`), the upscale description's offsets and the
unanswered dispatch (`ffx::tests`).

`cargo test --release -p victory-gpu -p victory-hle`: 113 passed, 0 failed,
1 ignored; 97 passed, 0 failed; `no_dll_planting` 1 passed. One release run
with `--console series-s` on an RTX 3050 8 GB, about 3.5 minutes: both
passes fire, the world renders, no host error.
Under Wine / Proton the system compiler compiles a [RootSignature] attribute
without writing the signature into the shader, so CreateRootSignature on the
shader failed and both passes of over.rs were never made: Series S stayed
black there (reported on fxceless#188, Bazzite, RTX 5060 Laptop, vkd3d-proton).

The signatures are now built from descriptions and serialized with
D3D12SerializeRootSignature: a table of the plane and a bilinear sampler for
the pass over a present; four constants, a table of the source and the
target, and the sampler for the stretch. The sources no longer name one.

cargo test --release -p victory-gpu --lib: 114 passed, 0 failed, 1 ignored
(three runs; an earlier run of the whole test binary ended in an access
violation once and did not again). One release run with --console series-s
on an RTX 3050 8 GB, Windows 11, about 3 minutes: both passes fire, menus
and the world render, no host error. Not run under Wine here.
@sagouindupm

Copy link
Copy Markdown
Author

@Filip722 thank you, that was precise enough to act on. c022e4d on this branch serializes both root signatures with D3D12SerializeRootSignature (a table of the plane and a sampler for the pass over a present; four constants, a table of source and target, and the sampler for the stretch), and the two sources no longer carry a [RootSignature] attribute, so nothing depends on the compiler writing an RTS0 part.

On Windows it behaves as before: cargo test --release -p victory-gpu --lib 114 passed, 0 failed, 1 ignored; one release run with --console series-s on an RTX 3050 8 GB, both passes fire, menus and the world render. I cannot run it under Wine here, so if you can rerun your seven-sample check on c022e4d that would settle it.

Your read-back test (the stretched blue scene with the transparent, premultiplied green and opaque red overlay regions) is exactly the GPU test the review asked for and that this PR still lacks. If you are willing to push it somewhere, I will take it into this branch with your authorship.

AI-assisted: Claude Code (Claude Fable 5.2) wrote the change and this reply and made the run.

@Filip722

Copy link
Copy Markdown
Contributor

Confirmed on the RTX 5060 Laptop (8 GB), Bazzite 44, NVIDIA 615.78.08, Proton Experimental 11.0-20261112 and vkd3d-proton 3.2.0 (ec20719). I repeated the 25-second Series S run with the unmodified release binaries and separate copies of the same prefix, settings and caches. On 82231c3, all seven samples were black. On c022e4d, the first two samples were black and the next five matched the previously verified account picker pixel for pixel. Both runs used zero cgroup swap.

The test-only commit is ready to cherry-pick onto this branch. It runs the stretch and overlay, reads all 15 output texels, and checks the transparent, half-green and opaque-red regions. The fixture failed at record_stretch on 82231c3 and passed on c022e4d. All four focused display tests passed and the GPU readback ran on the NVIDIA adapter.

I also ran the full Windows-target victory-gpu unit suite under Proton with that same fixture. The old revision had 109 passed, 5 failed and 1 ignored. The new revision had 111 passed, 4 failed and 1 ignored. Both had failures in the argument-clamp build, indirect scratch reuse, rejected pipeline-library blob and depth-plane draw tests. This comparison verified the menu and both display passes. It ended before gameplay.

OpenAI Codex (GPT-6.2-Sol) assisted with the fixture, builds, testing and report.

Run the real stretch and overlay passes on a 3 by 2 blue scene and a 5 by 3 synthetic overlay. Read back the output and check every texel for transparent, half-alpha and opaque regions. On the RTX 5060 Laptop under Proton the previous revision fails to record the stretch and the serialized-root revision passes.

Assisted-by: OpenAI Codex (GPT-6.2-Sol)
(cherry picked from commit 76687ee3b125e7b94bd9db12549fd36705e91023)
@sagouindupm

Copy link
Copy Markdown
Author

@Filip722 taken as 03d1791 (cherry-picked with -x from your 76687ee, your authorship kept). Here on Windows, RTX 3050 8 GB: cargo test --release -p victory-gpu --lib 115 passed, 0 failed, 1 ignored, with over::readback::stretch_and_overlay_preserve_the_expected_pixels among them. Thanks for the Proton confirmation of c022e4d too.

@ErRusso this is the GPU test of the two passes your review said would be better than the pure checks: it runs the stretch and the pass over a present and reads the output texels back. With 82231c3 (bounds guard, error instead of silent success, unit tests) and c022e4d (root signatures serialized by the runtime, which also removes the Wine dependency you noted), I think every point of the review is covered. Could you take another look when you have time?

AI-assisted: Claude Code (Claude Fable 5.2) made the cherry-pick and the run and wrote this comment.

soldsawn added a commit to soldsawn/victory-nvidia-8gb that referenced this pull request Nov 25, 2026
x0sman added a commit to x0sman/victory-fork that referenced this pull request Nov 25, 2026
…t time)

Hardware-verified on RTX 5070 Laptop GPU (8 GB) in 95s 3D gameplay (0 crashes).

Includes upstream PRs (#1677, fxceless#987, fxceless#188, fxceless#610) plus Phase 1-3 changes:
- descriptor/host.rs: lock-free AtomicU64 + 64-striped slot_locks/kept in HostHeap::mirror
- host.rs & queue.rs: victory-reaper background thread for COM/late-wait drops; Held::Present 2nd MPO plane support for VICTORY_ASYNC_PRESENT=1
- xmem.rs: XMemMapPhysicalPagesScatter single-lock hoisting, no-op skipping, exact 64 KiB placeholder fast path (preserving 64 KiB page independence)
- shadow.rs: move D3D12 buffer allocations (shared_buffer, card_for, window_card_for, place_for) outside BUFFERS/LOOSE write locks
- draw.rs, host.rs, indirect.rs, list.rs: 2-slot isolated indirect_window_scratch ring synced with draw::State::windows, remove post-clamp global UAV(None) barrier, use targeted uav_barrier_for(src/count) via UAV cleanliness tracking, default VICTORY_TEXTURE_STAGE_MB=48

Measured 1000 Hz profile (baseline -> Phase 3):
- usual frame: 183.2 ms -> 102 ms (-45%)
- GPU all other lists: 70.3 ms -> 36.4 ms (-48%)
- GPU card busy: 47% -> 68%
- shadow RwLock wait: 93.46 ms (P1+2) -> 0.00 ms (-100%)
- execute_indirect: 167.05 ms (P1+2) -> 78.10 ms (-53%)
KomanderDG88 pushed a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 25, 2026
… is an error; tests

What the review of fxceless#188 asked for.

- over.rs: the stretch's groups are 8 by 8 and reach past a target whose
  size is not a multiple of 8; the shader now reads the target's size and
  returns for texels outside it, instead of leaving them to out-of-bounds
  writes being dropped.
- ffx.rs: a dispatch that was neither stretched nor passed to the title's
  own DLL (none found) returned success with the output unwritten. It now
  returns FFX_API_RETURN_ERROR and says so once in the log.
- queue.rs: the choice of a present's second plane is a function of its own
  (`second_plane`), so it can be tested.
- over.rs: a stretch pass that could not be made is tried again at the next
  dispatch, as the pass over a present is; the two view rings say what their
  fixed sizes rest on.

Tests: the typed-format mapping and the stretch's bounds guard
(`over::tests`), the second plane's choice over seven cases
(`queue::plane_tests`), the upscale description's offsets and the
unanswered dispatch (`ffx::tests`).

`cargo test --release -p victory-gpu -p victory-hle`: 113 passed, 0 failed,
1 ignored; 97 passed, 0 failed; `no_dll_planting` 1 passed. One release run
with `--console series-s` on an RTX 3050 8 GB, about 3.5 minutes: both
passes fire, the world renders, no host error.

(cherry picked from commit 82231c3)
KomanderDG88 pushed a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 25, 2026
Under Wine / Proton the system compiler compiles a [RootSignature] attribute
without writing the signature into the shader, so CreateRootSignature on the
shader failed and both passes of over.rs were never made: Series S stayed
black there (reported on fxceless#188, Bazzite, RTX 5060 Laptop, vkd3d-proton).

The signatures are now built from descriptions and serialized with
D3D12SerializeRootSignature: a table of the plane and a bilinear sampler for
the pass over a present; four constants, a table of the source and the
target, and the sampler for the stretch. The sources no longer name one.

cargo test --release -p victory-gpu --lib: 114 passed, 0 failed, 1 ignored
(three runs; an earlier run of the whole test binary ended in an access
violation once and did not again). One release run with --console series-s
on an RTX 3050 8 GB, Windows 11, about 3 minutes: both passes fire, menus
and the world render, no host error. Not run under Wine here.

(cherry picked from commit c022e4d)
KomanderDG88 pushed a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 25, 2026
…to the right and bottom edges

The title's colour can be the top left of a larger texture. The sampler clamps at the texture's edge, not at the rendered size's, so the last column and row took in texels beside it. The coordinate now stays half a texel inside the rendered size.

Reported with the fix and the measurement by ArturoWolff on fxceless#188; the readback test gets a padded source for it (red beside a blue 3 by 2 scene in a 4 by 3 texture: top right was (51,0,204), now blue).

(cherry picked from commit 3ed3b19)
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 25, 2026
Our presents held behind a queue's line (VICTORY_ASYNC_PRESENT=1, off by
default; from the fork's 3973179) carry one texture and are shown later
with no second plane. With fxceless#188 the second plane (the interface, in the
title's Series S mode) is drawn by the present made at once, so such a
present now goes that way instead of being held. Without the switch
nothing changes: presents are never held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 25, 2026
…till wrong with the 3D picture

- What the fork adds: fxceless#188, the second present plane and the plain stretch,
  with its limit (the size of a plane's description is not from Microsoft's
  documentation).
- Status: on Series S the selector and the loading pictures show and the
  session goes on into the game (Codex, build 3f07a38, 606 s to the time
  limit, no crash). Measured here: two planes on Series S, one on Series X.
  The 3D picture is nearly black; no frame-rate change is claimed.
- What's next: the three separate reasons the 3D picture is poor (ray
  tracing off by default, no room for textures on 8 GB, the plain stretch)
  and then the frame rate.

English and Spanish.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
RyanCase94 added a commit to RyanCase94/victory-Rycas that referenced this pull request Nov 25, 2026
…sent plane, a plain stretch for the upscale dispatch)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@Exopus-0x65f7ad0

Copy link
Copy Markdown
Contributor

Tested on RTX 5060 Ti 8 GB (Windows 11) on top of fork main d510ee4. Without it, Series S was a black window from start to end, though the game ran blind. With it, the title screen, loading art, cutscene and first room all show. One conflict with main in host.rs present(): the framelog wrapper and present_now both need the over argument. Also queue.rs's held present (VICTORY_ASYNC_PRESENT) calls present with 3 arguments; I passed None there. One note: the loading screen with the artwork waits for a second press of Enter in Series S. Series S gives the best frame rate on this 16 GB machine (19 GB private instead of 23.6 for Series X).

🤖 Generated with Claude Code

@MKmajster

Copy link
Copy Markdown

How this merges on current main (3973179 and later, up to ca8829f), and how it ran with that.

The conflict is in Host::present. Main's frame log now wraps it: present times the call and passes it on to present_now. I kept that wrapper. Both functions take this PR's over: Option<(&ID3D12Resource, u32)>, and present passes over on to present_now.

One more call site. Main's held present (Held::Present in queue.rs, used with VICTORY_ASYNC_PRESENT, off by default) calls present(texture, state, frame). After the merge it needs the overlay as well. As a stopgap I pass None there, so with ASYNC_PRESENT=1 the overlay would be missing. The fuller fix is to carry the overlay in Held::Present, as #1053's branch does.

Run. RTX 3070 8 GB, 16 GB RAM, Windows 11, --console series-s, on that tree with #258, #883, #1016, #1014, #1020 and #1032. The interface, loading art, cutscene and the first room all show. With the switches from #1083 (draw windows, gather, COPY_PLAIN, JOIN_PARTS, BACK_OWN_VIEW, ASYNC_SUBMIT, QUEUE2, a 4 GB texture budget) the median frame is 144–155 ms. A 10-minute run kept 18.5 GB private memory flat, with no errors and no device loss.

AI-assisted (Claude Code). No game data attached.

@gmankab

gmankab commented Nov 26, 2026

Copy link
Copy Markdown

I rebased the six presentation and stretch commits onto ceb9e1f7 and tested the Series S checkpoint on Fedora 45 with an RX 6800, Wine and vkd3d-proton 3.2.0. The rebase preserves the timed present wrapper and retains the second resource and its state for queued presents, following the existing queue changes. Tested branch · Queue changes

The benchmark initially captured black PNGs because it read the first plane before composition. Reading the composed buffer produced visible content in 26 of 28 captures. The same 28 frame numbers were black with the original readback. Both asynchronous switches were enabled. Captured frames use the synchronous readback path. The latest captured frame showed illustrated loading. Readback commit

Both GPU readback tests ran on RADV and passed. The plane parser test passed too.

Tested-on: Radeon RX 6800, Fedora Linux 45, Wine and RADV
Assisted-by: gpt-6.2 sol xhigh

@MKmajster

Copy link
Copy Markdown

A follow-up to my earlier note here: with VICTORY_ASYNC_PRESENT=1 the held present (Held::Present in queue.rs) dropped this PR's second plane, so the HUD plane was missing whenever presents were queued. On my merge of this PR onto main I now carry the optional second plane and its tracked state through send_behind into Held::Present, and pass it to host.present when the held present runs. With that, VICTORY_ASYNC_PRESENT=1 works with the Series S profile here: the render thread no longer waits in present (172 → 0 ms a frame on an RTX 3070 8 GB), and the HUD plane shows as before. The change is small (one file, about 70 lines, with a unit test for the mode parsing and the plane extraction); I can open it as a PR against this branch if that helps.

AI-assisted (Claude Code, with Gemini). No game data attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.