GTA VI: all local work to reach the lit world, on current main (draft) #1965
No reviewers
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!1965
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1965"
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?
@antocorvo3000 on GitHub · 2026-11-25 01:50 UTC · original
antocorvo3000:gta6-all-work→main· +6852 −604 · 38 files · 37 commits · draftUpdated: the branch is now on top of current main (
940d32f). This is the build that reaches the lit world of Grand Theft Auto VI 1.0.2.1 on an RX 6800 XT (Series X mode): exteriors and interiors lit, ~1.1-1.2 fps, about 5,000 draws/frame. Textures are still missing in places and some geometry is broken (hair as spikes); that is the next work. Opened as a draft so you can take what is useful; #1962 is the focused heap-usage change.Findings on current main
cd94d35and940d32fthe title crashes in the prologue cutscene (int_prolo_int_prolo_int, a title read of address -1, reproduced twice on plain940d32fwith only the run conveniences below). Without those two commits the same scene runs 19 minutes. Here view marks are behindVICTORY_VIEW_MARKS=1(off) and940d32fis reverted; the shader cache key includes the setting.VICTORY_PRESENT_STAND_IN, default on), with a window test that reproduces it.mademutex, which waited on theVIEWSmutex: 167 us per table in the world (~2.3 s of thread time per frame). Lock-free fast path for unchanged slots,RwLockforVIEWSand buffer copy lookups (VICTORY_MIRROR_FAST, default on).What is in it (beyond the earlier description)
VICTORY_HEAP_TABLE_MARKS).CopyTextureRegionto placed footprints,v_permlanex16_b32,v_cvt_f32_f64.VICTORY_GPU_PROFILE=1), per-stage CPU profile (VICTORY_CPU_PROFILE=1), capture on demand (capture-nowin the capture folder).VICTORY_VRAM_COPIES=1, with async it removed the device at the start screens) and overlapping CPU preparation with GPU completion (VICTORY_ASYNC_SUBMIT=1, reaches the world but the lighting disappears).VICTORY_TITLE_DIR,VICTORY_AUTO_A, in-memory patches of the 1.0.2.1 executable. The patches that switch off lighting passes (4, 5, 7-9) are off by default; patch 6 (world render resolution mode) is on: without it the title takes a render path where the light and tile lists are bound as 1x1 placeholders and the exposure sits at its minimum (black world).Testing
cargo test --release --lib: victory-gpu 182, victory-shader 258 passed on this machine.- Add CopyLocationData union so CopyLocation matches D3D12_TEXTURE_COPY_LOCATION exactly (subresource index and placed footprint share the same 36 bytes). - Route dst=FOOTPRINT, src=SUBRESOURCE to new copy_texture_to_buffer(), which: * validates format compatibility, row-pitch alignment (256 B) and source box; * uses host.shared_buffer() as a D3D12 staging buffer; * emits CopyTextureRegion on the host list (texture -> staging, offset 0); * barriers the staging buffer to COMMON and defers a TextureReadback so the next same-list buffer->texture upload that overlaps the same title range can compose the GPU-written bytes over the CPU-written bytes; * in defer_after(), opens the watched title pages and writes the texel rows back via write_mapped(), leaving row padding and out-of-box bytes alone. - Extend the buffer->texture path: check for overlapping prior readbacks and, when found, compose them into the upload buffer via compose_texture_upload() before recording the copy, so round-trip title reads see GPU output. - PlacedFootprint fields made pub(crate); bytes() now uses checked arithmetic and rejects footprints where the last row exceeds the pitch. - Deferred struct gains a readbacks Vec; HostList exposes defer_texture_readback and texture_readbacks helpers. - Unit tests: PlacedFootprint::bytes (1x1, two-row, full-row, BC1, invalid, unknown format) and CopyRows::new (full 2x2, sub-box, x-offset, volume two-slice, zero-size, out-of-bounds): 100 passed 0 failed.@antocorvo3000 on GitHub · 2026-11-25 01:56 UTC · original
More of the same work, for reference:
gta6-first-approach;gta6-placed-texture-budget(https://github.com/antocorvo3000/VIctory/tree/gta6-placed-texture-budget).@Marvisak on GitHub · 2026-11-25 03:15 UTC · original · edited 2026-11-25 16:17 UTC
Automated triage for the maintainers.
Needs rebase. This head now conflicts with
mainincrates/victory-gpu/src/bindless.rs,crates/victory-gpu/src/descriptor.rs,crates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/draw.rs,crates/victory-gpu/src/fence.rsandcrates/victory-gpu/src/host.rs. It will be reviewed once rebased. The earlier needs-work verdict (title-code patching needing the maintainer's decision, the revert of940d32f, local commits, splitting into separate PRs, failing CI) will be revisited after the rebase.Generated by Claude Code
@fiestorra on GitHub · 2026-11-25 05:09 UTC · original
Independent check on NVIDIA: as it stands, this branch still removes the device at frame 64 here — and that is the AMD/NVIDIA difference, not a criticism of the work
I ran your branch as it is (
rev = c68d6fb, based on42363ab, no rebase) on this machine: session 1 (interactive desktop), RTX 4090, driver 32.0.16.2124, release, empty cache, 150 s:So on an NVIDIA card it does not reach the world: it stops at the same frame 64 that
mainat that revision stops at.Why yours works and mine does not, as far as I can tell from the numbers:
B4G4R4A4_UNORM(DXGI format 115) can be a render target on the RX 6800 XT and cannot on this driver. That is theALLOW_RENDER_TARGETcall the D3D12 debug layer refuses here:On your card the same call is legal and the boot goes on to the world; here it removes the device. That is why the same tree gives two completely different reports.
The two fixes that make it survive on NVIDIA are already open against
mainand do not touch what you are working on:host texture made only as a fallback) instead of failing the call;dropping unordered access).With those two on
maintoday I measure no removal, 2,048 frames, 13,312 draws in 120 s, wheremainalone dies at frame 64. So the combination worth measuring is your branch rebased onto amainthat has those two: if your work is what reaches the world on AMD, that is the first candidate to reach it on NVIDIA as well.What stops that measurement right now: your branch conflicts with today's
mainin five files —which is also why GitHub reports it as not mergeable. I did not attempt the rebase: it is 3,262 lines across 28 files and the conflicts are in the page-marking and heap ground where guessing does more harm than good.
If it helps, I can measure the rebased tree the moment it exists — same scenario, numbers in a comment, on the card where the failure is reproducible.
No game data is involved: counts, warnings and a format name.
Written with an AI assistant.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.