Disable forced 4K rendering #203
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#203
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@ljm-233 on GitHub · 2026-11-24 01:24 UTC · original
Because of forced 4K rendering, 16 GB of RAM + 8 GB of VRAM will OOM on Windows, and tests should not use 4K.
Linux has not been tested yet.
@desplmfao on GitHub · 2026-11-24 01:34 UTC · original
doesnt seem to be easy to solve unless you run the series s version instead of series x
@kykifox1337-source on GitHub · 2026-11-24 01:48 UTC · original
Some numbers on how much Series S mode saves, and one thing that does not work.
The reported display mode is not the lever. I changed the console's mode list (
crates/victory-gpu/src/dxgi.rs, one 3840x2160 mode) to 1920x1080: the title still created a 3840x2160 window and swap chain. It creates its window before it asks for the mode list, so its output size comes from somewhere else, most likely the console type.--console series-slowers it, to a 1920x1080 scene with 1280x720 internal targets (Series X: 3840x2160 and 2560x1440). It needs #211 to show a picture; without it every frame is black.Windows 10 22H2, RTX 2070 SUPER 8 GB, 32 GB RAM, diag build of
maind2a4bae+ #175 + #211, same build for both runs. Committed memory isvictory.exe's private bytes; GPU memory isnvidia-smifor the whole system (about 0.8 GB at an idle desktop); sampled every 10 s.So Series S is a partial workaround: about 4 GB less RAM, but the world still commits about 17.7 GB, more than 16 GB of RAM (it needs page file), and an 8 GB card still fills up. Both runs lost the device about 30 to 45 s into the world (the NVIDIA hang in #71), with GPU memory near full just before.
AI-assisted (Claude Code); I ran everything above myself.
@ljm-233 on GitHub · 2026-11-24 09:48 UTC · original · edited 2026-11-24 09:49 UTC
We went at this from the "make the host run it at 1080p" side and ended up with a working 1920x1080 setup — menus at 30 fps, sharp picture, no OOM on an 8 GB card. Sharing the lever and the trap, because @kykifox1337-source's finding is exactly right ("the mode list is not the lever; the title still creates a 3840x2160 window and swap chain") and the "somewhere else" is findable.
1. The output size is a resolution ladder in the image.
In our dump (
game_scarlett_master.exefrom theGTA6.Xbox.v1.0.2.1-CYBERLEEKfiles; prepared image hashes tob99f876b…) it sits at.rdataRVA0x615c0c0and is five entries of 16 bytes,width, height, 60, 1:The title takes its window size, swap chain size and render-target sizes from this table. Capping every entry above 1920x1080 at 1920x1080 (two entries in our build) makes it create a 1920x1080 window and 1920x1080 render targets, with no
--console series-s. We locate the table by those five entries rather than by the RVA, so no bytes of the title live in the tree.2. Then an assert fires that has nothing to do with resolution.
Right after the cap, the title hits an
int3at+0x247af2d:It compares a pool ring-buffer offset (
0x2200000in our run), not a size. Stepping over that oneint3from a vectored exception handler (Rip += 1,EXCEPTION_CONTINUE_EXECUTION) is enough to continue. Worth knowing before concluding that a capped ladder "makes the title crash".3. The cap alone gives a blurry quarter, not a picture.
The title lays its picture out for a 2160-tall console: it draws into
frame * (frame height / 2160), anchored top-left, and leaves the rest black. At 1920x1080 that picture is the top-left 960x540.CopyResourceof the whole frame (what we did at first) shows it in the corner.What works: make the swap chain the size of the window's client area and
CopyTextureRegiononly that top-left corner into it, 1:1. The other three quarters of the presented frame are black, so the crop loses nothing. Two details matter for 1:1:CreateWindowExWtime — resizing it afterwards makes the title run its own crash handler and upload a minidump (we have those);4. Numbers (RTX 5060 Laptop 8 GB, 2560x1600 @150%, 32 GB RAM):
The 172 s world run stayed up with no device loss, but its frames were still black and streaming at that point, so that is not evidence about the NVIDIA hang in #71 — only that the 1080p layout itself was stable on 8 GB.
The world remains the expensive part either way: this only makes the host survive the menus and the loading, and gives a sharp picture instead of a stretched one.
One interaction to keep in mind with #211: it reports the title presenting a separate 3840x2160 UI plane. We present only the first plane, so the crop above preserves what the title draws into that plane — in our menus the UI was inside it. If a configuration presents the UI in a second plane, compose the planes first and crop the composed frame; the crop is not a substitute for #211.
If a PR is welcome I can send the patching (both patches are byte-pattern searches; nothing is stored by offset). Our patch code lives in a fork's
crates/victory-game, which upstream currently has aslib.rs+sgd5.rs, so tell me where such a patch belongs — avictory run --resolution/automatic cap, or undervictory-game.@ljm-233 on GitHub · 2026-11-24 10:26 UTC · original · edited 2026-11-24 10:31 UTC
An update: the change behind the comment above is on a branch, ready to become a PR.
mainatffe310e)VICTORY_RESOLUTION=1920x1080, default behaviour unchanged.What it does, in one line each:
crates/victory-game/src/output.rs, found by byte pattern, no offsets stored);int3of the pool-offset self-check the capped ladder reaches (pattern-found address,Rip += 1from the existing vector handler);frame height / 2160, 960x540 at 1080p) and presents only that corner into a swap chain the size of the client, 1:1.Measured on an 8 GB RTX 5060 Laptop (2560x1600 @150%): menus 30.0 fps and ~2.0 GB of host textures, window 982x596 with a 960x540 client; the world loads and runs 0.1-0.8 fps, and its device removal after 1-2 min is the hang in #71 (the crop is already off by then — the title maximizes its own window for the world).
Checks:
cargo clippy --workspace --all-targets -- -D warningsand--all-featurespass;cargo test --workspacepasses exceptload_probe, which needs the MSVC linker CI has.Where it should live is still the open question: an environment switch is a first cut, and the mechanical part is ready for
victory run --resolution 1920x1080or an automatic cap based on available memory. Also, for a configuration that presents the UI in a second plane (#211), the planes have to be composed before cropping.@ljm-233 on GitHub · 2026-11-24 10:33 UTC · original
To set expectations about the branch above: this is an experimental exploration, for reference only — it has many problems and is not something to merge as it is.
Known problems:
GTA6.Xbox.v1.0.2.1-CYBERLEEKfiles; 8 GB RTX 5060 Laptop; 2560x1600 at 150%).int3step-over is a workaround, not a fix. It skips a self-check we believe compares a pool ring-buffer offset rather than a size. If that reading is wrong on another build, the skip hides a real assertion.load_probetest needs the MSVC linker CI has).So please take it as notes and code to look at — not as a feature.
@Marvisak on GitHub · 2026-11-25 01:49 UTC · original
Automated triage for the maintainers.
This is a request for a lower output resolution to reduce memory use. That fits the project's scope (Windows hosts, the user's own files). On current
mainthe console reports a single 3840x2160 mode (crates/victory-gpu/src/dxgi.rs). As measured above, the title's output size does not follow that mode, andvictory run --console series-s(see the README) is the existing partial workaround, saving about 4 GB of RAM. The open PR #1701 (VICTORY_MODEoverrides the reported display mode) is related, but by the measurement above it would not change the output size by itself.The resolution-cap implementation is on a fork branch (
feat/1080p-window), and its author describes it as experimental. Pull requests are open to everyone, so if you want it reviewed, please open one. Where such a switch should live is for the maintainers.One request: please do not post the title's disassembly, addresses or byte contents, or the name of the copy the files came from. Material taken from the game must not be posted in this repository.
Generated by Claude Code