Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
bd9b273
GPU: a draw dropped because a root view cannot be bound says why
Nov 25, 2026
1365fe1
GPU: diagnostics for the frame's cost: heap sync time, video memory, …
Nov 25, 2026
1953339
GPU: a submission skips host copies the title has not written since t…
Nov 25, 2026
3e10052
GPU: D3D12 objects freed after a submission are released on a thread …
Nov 25, 2026
0086ccb
GPU: traced shaders' indirect records are logged in every frame
Nov 25, 2026
eddde73
HLE: DirectStorage reads into physical pages wait for the title's Submit
Nov 25, 2026
f1c55a8
GPU: a placed texture's slot left null is not made again at every hea…
Nov 25, 2026
67e330a
GPU: process memory and a host texture census in the statistics
Nov 25, 2026
a7381ed
GPU: host textures made on first use
Nov 25, 2026
5622159
GPU: debug lines for sampled texture uploads
Nov 25, 2026
5cb63d8
GPU: texture to buffer copies read back into the title's buffer
Nov 25, 2026
97721d1
GPU: the title memory read to detile a tracked texture is not kept
Nov 25, 2026
7433988
GPU: 8-bit RGBA dumps log their alpha range and zero counts
Nov 25, 2026
98c654b
GPU: the console's 16-bit depth with stencil is float depth on the host
Nov 25, 2026
2d4aa55
GPU: the snapshot pool keeps at most 512 MiB
Nov 25, 2026
2a93ff0
GPU: our heap bytes and the process heaps in the memory line (diagnos…
Nov 25, 2026
280b150
GPU: change tracking guards only the runtime's memory, region by region
Nov 25, 2026
f809521
GPU: a heap sync looks at a page's slots under one lock and makes onl…
Nov 25, 2026
cc0e153
GPU: change trackers keep their "written since taken" flag in one den…
Nov 25, 2026
ed887f2
GPU: diagnostics: copies redone piece by piece are timed; GPU timing …
Nov 25, 2026
6cc6aa3
GPU: copies of single views share large buffers
Nov 25, 2026
c4e022d
GPU: diagnostics: title threads' wait for the heaps' lock; host copie…
Nov 25, 2026
2922141
GPU: a heap's merged view ranges are kept current, not rebuilt whole …
Nov 25, 2026
ac7ffc0
GPU: large heap allocations name their caller; list upload memory in …
Nov 25, 2026
23a4b62
GPU: a texture is uploaded once per submission, and only when its byt…
Nov 25, 2026
a2c50db
GPU: a drop counted by its reason names the pipeline's shaders
Nov 25, 2026
59c78bb
Shaders: descriptors joined by nested control flow
ThiagoAlexsander Nov 24, 2026
ff47463
Shaders: a descriptor no lane brings along an edge needs no source there
Nov 25, 2026
e8e9f0c
Shaders: a lane mask joined with data at a uniform join is its number
Nov 25, 2026
fbac5bb
Shaders: descriptors joined by nested control flow stay refused for now
Nov 25, 2026
f342dcf
Shaders: inputs a counted v_movreld loop overwrites first need no value
Nov 25, 2026
eed1670
GPU: a listed frame's trace shows the title's barrier calls
Nov 25, 2026
4243a96
Shader: 16-bit typed buffer accesses pass bits through integer views
Nov 25, 2026
d75491e
GPU: a texture written in pages of its own is uploaded without hashin…
Nov 25, 2026
2a4938e
GPU: pages with nothing mapped are zeroed in host copies without fail…
Nov 25, 2026
9c179ea
GPU: a frame wait begun after its tick passed ends at once
Nov 25, 2026
5c4c685
victory: the exe's bytes are dropped once the image is mapped
Nov 25, 2026
9337b35
GPU: while lists using title memory miss, none of their writes go back
Nov 25, 2026
a3b0f36
GPU: dropping a tracker keeps guards another mapping's tracker relies on
Nov 25, 2026
b2f6c95
GPU: upload tests count their own texture's uploads
Nov 25, 2026
38994e5
GPU: what a frame withholds leaves the host copies at the frame's end
Nov 25, 2026
ed10c27
GPU: the statistics line no longer walks the process heaps
Nov 25, 2026
36ca299
GPU: a retake marks the copies without opening their guards
Nov 25, 2026
658a0d1
GPU: a retake marks host buffer copies alone, not textures' staging
Nov 25, 2026
2921092
HLE: writes into physical pages are reported where the pages show whe…
Nov 25, 2026
fdf34ab
GPU: texture staging buffers come from a small shared pool, not one p…
Nov 25, 2026
cc5f961
GPU: a texture re-detiles only the subresources whose pages changed
Nov 25, 2026
58b5255
Shaders: an address half set on every taken edge into its join is known
Nov 25, 2026
e790217
Shaders: an image descriptor read only for its size takes it from the…
Nov 25, 2026
889b871
Shaders: a scalar VALU result takes no EXEC guard
Nov 25, 2026
4a3166e
Shaders: lanes skipping a compare's region read 0 of its lane mask
Nov 25, 2026
47cde30
Shaders: a test of register arrays indexed in waterfall loops
Nov 25, 2026
52d14b1
GPU, Shader: placed textures made when shaders read their heap slots
Nov 25, 2026
2d6c0df
Shader: read marks only for texture views taken from the heap itself
Nov 25, 2026
80d8cf5
GPU: read marks are taken from both written-page bitmaps
Nov 25, 2026
672e716
Shader: the read-mark test's doc comment is no list
Nov 25, 2026
69d1e8e
GPU: host textures fed from title memory are given up when unused, an…
Nov 25, 2026
4959d34
GPU: textures the heaps view are brought up to date only when shaders…
Nov 25, 2026
cea278c
GPU: textures for heap slots shaders read are made outside the heaps'…
Nov 25, 2026
ed25c0e
GPU: a slot the title rewrites keeps no per-texture list of slots
Nov 25, 2026
c6e9500
GPU: a texture's refresh asks its tracker's clean bit before taking i…
Nov 25, 2026
42ea09f
GPU: what a view needs is made before its slot's lock is taken
Nov 25, 2026
56f75f8
GPU: textures are brought up outside the heaps' locks, several at a time
Nov 25, 2026
ec9e750
GPU: what a submission that missed title memory withheld leaves the c…
Nov 25, 2026
8ff7913
Shader: rectangles complete opposite their right angle, wherever it is
Nov 25, 2026
8a3d975
GPU: textures' staging space is carved from large upload buffers
Nov 25, 2026
ab2e2b2
GPU: the textures of slots shaders read are made several at a time
Nov 25, 2026
ea81289
GPU: a submission's texture uploads become readable in one barrier batch
Nov 25, 2026
0a5be3c
GPU: only what programs using title memory write is withheld when the…
Nov 25, 2026
f68442f
GPU: a texture a host copy writes is the host's from the copy's submi…
Nov 25, 2026
11e9a54
GPU: textures fed from title memory are placed in heaps made ahead
Nov 25, 2026
9cc37c5
GPU: lists wait on memory values; queues hold work until its waits hold
Nov 25, 2026
8f2a6f1
GPU: a texture refresh reads title memory into its thread's own buffer
Nov 25, 2026
286a00e
Shaders: the DXIL writer leaves out what no edge or reader reaches
Nov 25, 2026
850b66f
Shaders: one handle per descriptor at a fixed address, and per join
Nov 25, 2026
8681044
Shader tests: the differential harness binds the view-stride table
Nov 25, 2026
a1a2077
Shaders: vertex, geometry and mesh programs with UAVs say so in their…
Nov 25, 2026
4015a18
Shaders: quad reads in pixel programs reach the helpers at triangle e…
Nov 25, 2026
315cea1
GPU: barriers start from the states resources are in: prelude order, …
Nov 25, 2026
54ab406
Shaders: descriptors joined by nested control flow, again
Nov 25, 2026
da82e44
Shader: normalized buffer codes convert to the float nearest their qu…
Nov 25, 2026
67e8ae1
Shader tests: the compute harness zeroes its UAVs
Nov 25, 2026
971a975
Merge remote-tracking branch 'upstream/main' into upstream-sync
openhands-agent Nov 25, 2026
5b602d8
AGENTS.md: record the second upstream sync's conflict resolutions
openhands-agent Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Fork: MagiccConch/VIctory, upstream: Marvisak/VIctory. CI: windows-latest only (
- Title run (2026-11-25 ~02:17): title boots deep into init on the 5080, then 0xc0000005 null write (title-image+0x2215c35) amid a flood of "title slot past the host heap index~1179606 count=934464 for_draw=false" (also the title's own Breakpad minidump upload attempt, blocked by net HLE - benign). Root cause: the title requests 0x120000 (1179648) shader-visible slots; HostHeap::new fallback jumped from make(max(count+DYNAMIC, HEAP_VIEWS)=2M) straight to the 1M cap (PORTABLE_VIEWS, NVIDIA), leaving count=934464 and every title slot past it null. Commit 6ac8fbe (CI 45532159717 green): ordered fallbacks - try make(count+DYNAMIC) then make(count+MIN_DYNAMIC) before the PORTABLE_VIEWS cap, so the full console heap fits when the host allows ~1.245M. If the 5080 still caps (log shows host view heap capped at 1000000), real remapping is needed (upstream comment: a title that reaches them needs remapping). Breakpad line = the title's own crash reporter trying submit.backtrace.io, net-blocked, harmless.
- Remap sketch (for the 2-heap fix): uniform root layout on ALL hosts - two root SRVs (heap0=title slots [0, 1000000), heap1=title slots [1000000, 1179648) + the DYNAMIC tail) with SPLIT=1000000 fixed in emit (HEAP_VIEWS clamp stays; NULL_BUFFER_VIEW lands in heap0). Heap0 exactly 1000000 slots (NVIDIA max, empirically confirmed), heap1 sized per host. Root signature changes -> pipeline library rebuilds (user re-runs pre-build). Update: emit/shader.rs, pipeline/make.rs root layout, descriptor/host.rs heap manager + GPU_RANGES.

## Upstream sync (2026-11-24/25, merge 42b5c9c)
## Upstream sync (2026-11-24/25, merge 42b5c9c; second sync 971a975 → 67e8ae1 via PR #14)

- Reviewed upstream's 291 commits since 70564ae, checked upstream CI (green), merged, resolved 5 conflict files, CI 45536238395 green on windows-latest.
- Key upstream fixes now in the fork: copy-back page marks via shader view writes (cd94d35) — touches `crate::memory` copy-back and `emit::HostShader::view_marks` (new `Parts::view_marks`, `Options::view_marks`, `HostShader::view_marks`; test initializers must set it); descriptor cursor range (c6c244d) + dynamic wraparound scan (c1c3281); swap-chain throttle (f096774); TDR log (42961e8, `crate::tdr::log` — called beside our adapter-by-preference in `victory-gpu/src/host.rs`); device-removed reason (13185f5); no-GPU skip for hardware-only shader checks (42363ab/ccfb029: `hardware_adapter` requires DedicatedVideoMemory > 0).
Expand Down Expand Up @@ -129,3 +129,16 @@ Fork: MagiccConch/VIctory, upstream: Marvisak/VIctory. CI: windows-latest only (
- **#911 ported (same commit):** `tables()` now rolls back the failing stage's just-allocated ranges on `table_failed` — release(first, n), fresh_tables entry removed, self.dynamic entry dropped, made cleared. Safe because those binds were never recorded (the draw drops before its root arguments are set); later draws re-make them. Previous behavior cached them until list reset, amplifying exhaustion exactly as #911 describes.
- NOT ported now: #876/#2190 (typeless views — 494-line unmerged rework; our cutscene/UI symptoms were addressed by the twin work), wave64/compute translation (#2176, large), #2189's tier ladder (our ladder already degrades gracefully with the 2^18 port). Re-check #2177/#2185/#2189/#2190 when upstream merges any — all touch descriptor/host.rs + emit/lower.rs, which PR #13 now modifies; expect rebase work then.
- Run 8 expectations UPDATED by 3bf9424: capped warn now logs `kept=705085`; `host view heap capped at 1000000` count=934464. The past-cap title range widens (title slots [705,085, 1,179,648) read null) — that is #747's accepted trade (its own tested config mirrored only 672,319 title slots). Watch for "no dynamic slots" drops GONE from the log (was thousands/frame in #747's measurements).

## Second upstream sync (971a975, PR #14, upstream 67e8ae1; 2026-11-25)

- Scope: upstream commits 940d32f..67e8ae1 (58 commits). Key fixes: 315cea1 barriers start from the states resources are in (prelude copies from real states; indirect clamp writes clamped records into a list-owned argument buffer - addresses run-9's id=538 vertex-buffer-in-UAV class); 98c654b 16-bit depth w/ stencil is host D32_FLOAT_S8X24 (depth() = f32(u)*0x37800080 - EQUAL-tested depth now exact on AMD/any-float-depth); 4015a18 quad reads reach helpers at edges (helpers at triangle edges exist regardless of discards); 8f2a6f1 texture refresh per-subresource spans + thread-local staging (Buffers reuse); a1a2077 vertex/mesh UAV flag declaration (the 5,046 "Flags must match usage" programs); da82e44/67e8ae1 buffer codes + compute-harness UAV zeroing.
- Conflict resolutions (7 files):
- texture.rs: took UPSTREAM wholesale - the fork's PR #9 splitmix digest (527c237) is superseded by upstream's per-subresource spans + blake3 + Buffers. Do not re-merge digest() by hand.
- twin.rs: kept BOTH - upstream's float depth (depth()/u16()) AND the fork's packed-colour modes 1-3 (up()/down(), B5G6R5/B5G5R5A1/B4G4R4A4 twins from b3a8b22). Doc comment merged.
- emit/shader.rs: tests mod is upstream's #[cfg(all(test, windows))]; kept BOTH fork's heap_handles_stay_inside_the_host_limits AND upstream's uavs_outside_pixel_and_compute_programs_are_declared.
- emit/lower.rs: Parts keeps BOTH heap_props (fork) and heap_handles (upstream, via m.written_calls); dropped the FORK's older helpers_read (quad && pixel && !discards.is_empty()) - upstream's 4015a18 (quad && pixel) is the corrected semantics (helpers at edges regardless of discard). Same dedupe trap as helper_reads_own in 42b5c9c.
- draw.rs/list.rs: fork's twin-redirect plumbing (format-patched tuple desc/view) wins over upstream's plain record.desc() line - the conflict sat INSIDE the fork's rewritten set_targets/clear_rtv.
- host.rs: kept by_preference (fork) + process_memory (upstream diagnostics).
- NOTE: CI does not run on non-main branch pushes (workflow triggers: pull_request, push to main only). Get a run by opening a PR. Run 45655729340 = PR #14.
- Local loader test failures (file_name_is_stable_per_build, patches_own_test_binary, keeps_iat_slots_...) are Linux-exe artifacts (tests parse current_exe() as PE, ELF gives "Unknown file magic"); Windows CI tests them. Not merge-related.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ The on/off switches below (`...=1`) are off when unset or set to `0`.
| `VICTORY_D3D12_DRED=1` | on a GPU failure, the allocation hit and the commands in flight |
| `VICTORY_SKIP_PIPELINES=<hash>,...` | omit draws and dispatches, including indirect ones, whose pipeline contains a listed 16-digit shader hash |
| `VICTORY_GPU_TIMING=1` | with the above, each list of a submission run and timed on its own; slow lists logged with their slowest commands; a device removal names the list it happened in and lists all its commands |
| `VICTORY_TRACE_SHADERS=<hash>,...` | with `VICTORY_D3D12_DRED`, every draw and dispatch of a listed shader logged with what it binds (user data, heap slots, root views and their first dwords; the first 500) |
| `VICTORY_TRACE_SHADERS=<hash>,...` | with `VICTORY_D3D12_DRED`, every draw and dispatch of a listed shader logged with what it binds (user data, heap slots, root views and their first dwords; the first 500, and all of them in listed capture frames); the records of its indirect executions are read back and logged in every frame (records with work, the first four, the frame) |
| `VICTORY_D3D12_WARP=1` | host device on the software adapter (slow; cannot reset the driver) |
| `VICTORY_PIPELINE_LOG=<file>` | a line per title pipeline created (key, shaders, state), first used, and made or loaded (library name); `translate --cache --pipelines` writes the last kind too |
| `VICTORY_PREBUILD_KEYS=<file>` | `translate --cache --pipelines` makes nothing and lists each pack record's key, shaders and state (or why it is skipped) |
Expand Down
5 changes: 5 additions & 0 deletions apps/victory/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ enum Console {
SeriesS,
}

/// Diagnostics: the heap bytes Rust code holds, for the statistics.
#[cfg(all(windows, feature = "diagnostics"))]
#[global_allocator]
static ALLOC: victory_gpu::CountingAlloc = victory_gpu::CountingAlloc;

fn main() -> Result<()> {
victory_core::logging::init("info");
// The audio recorder `run` starts for `VICTORY_AUDIO_CAPTURE`.
Expand Down
7 changes: 5 additions & 2 deletions apps/victory/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ pub fn run(
// Before the import registry is first used: it holds the module only
// when the host's FidelityFX serves.
victory_hle::modules::fidelityfx::use_host_dir(cfg.fidelityfx_dir.as_deref());
let original = std::fs::read(exe).with_context(|| format!("reading {}", exe.display()))?;
let prepared = victory_loader::prepare(&original)?;
let prepared = victory_loader::prepare(
&std::fs::read(exe).with_context(|| format!("reading {}", exe.display()))?,
)?;
let hash = prepared.original_hash.to_hex();
let title_dir = exe.parent().unwrap_or(Path::new("."));
match victory_game::identify(&hash) {
Expand All @@ -73,6 +74,8 @@ pub fn run(
let images = cfg.cache_subdir("images")?;
victory_hle::modules::d3d12x::use_shader_cache(cfg.cache_subdir("shaders")?);
let image = victory_loader::load(&prepared, &images)?;
// Mapped: the patched bytes (the exe's size, 114 MB) are not needed.
drop(prepared);
victory_hle::runtime::set_main_image(image.base());
victory_hle::runtime::set_image_path(image.base(), exe);
println!(
Expand Down
Loading