Skip to content
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Axiz-VIctory development

- Preserve the upstream [asset policy](docs/asset-policy.md). Use generated fixtures and keep captures, caches and proprietary files outside the repository.
- Record the baseline, build configuration, workload and actual measurements before claiming a performance change. Keep gameplay, external reports and synthetic measurements distinct.
- Check the target D3D12 adapter and supported capabilities before introducing a hardware-specific path. Keep rendering and synchronization semantics covered by regression tests.
- Record imported code's author, source SHA and license in [the optimization matrix](OPTIMIZATION_MATRIX.md). Prefer small, attributable commits and retain the pinned upstream reference.
- See [build instructions](BUILD_INSTRUCTIONS.md), [benchmarks](BENCHMARKS.md) and [known issues](KNOWN_ISSUES.md) for validation.
44 changes: 44 additions & 0 deletions BENCHMARKS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Benchmarks

The local host is documented in [NVIDIA compatibility](NVIDIA_COMPATIBILITY.md). Baseline is upstream `63bcca43c6a00a758510398fa43096ce7e4f7df0`, compiled with Rust 1.98.1 and the release profile. The candidate comparison uses `e04aea17e40f0ec984a12e2a1881fe906089095d`.

## Synthetic texture copies

```powershell
cargo run --release --locked -p victory-formats --example texture_copy_bench
```

Use the same example source and toolchain in both checkouts. The harness uses one thread, warms each operation, reuses its buffers, and reports the median of seven samples copying at least 64 MiB of active bytes each. GB/s is decimal. Layout construction and allocation are outside the measurement. Tightly packed R8 uses 256 active bytes per row. The padded case adds 16 bytes per linear row. Repeated buffers exercise warm caches and the host memory subsystem.

The table gives the median of three process runs per build, with the build order varied between runs. Each cell lists detile / tile in GB/s. The intermediate build isolates the imported change.

| Workload | Upstream | Imported change | With packed linear copy |
| --- | ---: | ---: | ---: |
| RGBA8 64KB_D | 16.80 / 10.69 | 19.45 / 16.39 | 18.97 / 15.97 |
| RGBA8 4KB_S | 14.35 / 9.06 | 16.82 / 14.23 | 16.84 / 14.26 |
| BC7 mip 5 | 28.86 / 32.12 | 49.88 / 45.57 | 49.29 / 52.94 |
| RGBA8 volume | 10.46 / 6.81 | 15.67 / 13.63 | 15.67 / 13.64 |
| R8 linear tight | 60.82 / 40.74 | 55.77 / 39.37 | 69.64 / 72.79 |
| R8 linear padded | 47.12 / 40.31 | 46.66 / 39.91 | 46.63 / 39.17 |

Volume tiling reached 2.00× baseline throughput. The packed R8 tiling path reached 1.79× baseline and 1.85× the intermediate build. Padded R8 varied by up to about 3% from baseline in this comparison.

In a separate process-memory sample, both copy benchmarks reached 25.13 MiB peak working set, polled every 15 ms. Neither workload initializes a GPU.

## Gameplay capture

Use one interval per frame in milliseconds, with a single `frametime_ms` header and a decimal point. Export a consistent presentation or display interval from the capture tool throughout the comparison. The input may live outside this repository.

```powershell
cargo xtask frame-stats C:\Benchmarks\capture.csv --stutter-ms 50
```

Average FPS is 1000 divided by mean interval. Median FPS is the inverse median interval. The 1% and 0.1% lows invert the mean of the slowest ceiling(1% or 0.1%) intervals and require at least 100 or 1,000 frames respectively. P95, P99 and P99.9 use nearest rank. A frame misses the 30 FPS budget if it exceeds 1000/30 ms. The stutter count applies the supplied threshold independently.

Keep separate, labeled cold-cache and warm-cache captures. Record the exact branch/SHA, driver, adapter, power and display settings, render settings, route and duration. For each configuration, capture at least three repetitions of the same route and enough frames for the tail metrics. Collect CPU and per-thread utilization, GPU utilization, peak process RAM, peak dedicated VRAM and any crash or device-removal codes alongside each capture. The interval analyzer reads only the CSV. Compare aggregate metrics across equivalent runs and inspect graphics output for differences.

On a hybrid system, confirm from the process or GPU capture that both builds use the same NVIDIA adapter. For the pinned baseline, Windows per-application graphics preference can be used if it places the process on NVIDIA. The candidate can explicitly request the NVIDIA adapter with `VICTORY_D3D12_NVIDIA=1`.

Gameplay and user-reported captures are pending. The synthetic copy example does not measure rendering or GPU utilization.

For an analyzer smoke test, a generated 1,000-interval CSV with 999 intervals of 20 ms and one of 100 ms yielded 49.801 average FPS, 50.000 median FPS, 35.714 and 10.000 for the two lows, and one budget miss and stutter. This fixture only checks arithmetic.
29 changes: 29 additions & 0 deletions BUILD_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Windows builds

Use the pinned Rust 1.98.1 toolchain for `x86_64-pc-windows-msvc`, the Visual Studio C++ build tools, and a Windows SDK. The verified host uses MSVC tools 14.44.35207 (CL 19.44.35230) and SDK 10.0.26100.0. Cargo resolves the checked-in lockfile.

```powershell
cargo build --release --locked -p victory
cargo build --profile diag --locked -p victory --features diagnostics
cargo test --workspace --locked --no-fail-fast -- --test-threads=1
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo xtask policy
```

See the [architecture](docs/architecture.md) and [asset policy](docs/asset-policy.md) for actual runtime inputs. The CLI smoke checks, self-contained tests and CPU benchmarks use no title files.

| Profile | Local artifact | Source |
| --- | --- | --- |
| Pinned upstream release | `target/baseline/63bcca4/victory.exe` | `63bcca43c6a00a758510398fa43096ce7e4f7df0` |
| Candidate release | `target/release/victory.exe` | `7dd9a868959d6389596a1824e04a199c474ab630` |
| Candidate diagnostics | `target/diag/victory.exe` | `7dd9a868959d6389596a1824e04a199c474ab630` |

The local builds dated 2026-11-26 retain matching PDB files. They depend on Windows D3D12 for GPU operation. The diagnostics profile adds instrumentation and should be used separately from release frame-pacing captures.

SHA-256 values for the local executables:

| Artifact | SHA-256 |
| --- | --- |
| Baseline release | `303520a2e0ef216abb5192e0c9426fec2fbf113e6bcead52235f1ed6f032884e` |
| Candidate release | `9e4abb9b66d9902c939350a061d8b39728bf7fb798ac6c2b3614327fadffc1e8` |
| Candidate diagnostics | `46e45b40ddba98ea0e2ca7677af37e2ef9c91ed44219805a331680c6b74a5cf6` |
11 changes: 11 additions & 0 deletions DEVELOPMENT_LOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Development log

## 2026-11-26

- Pinned upstream `63bcca43c6a00a758510398fa43096ce7e4f7df0` and saved a separately named release artifact. See [build instructions](BUILD_INSTRUCTIONS.md).
- Fetched eight GPL workspace forks and compared their source and divergence. Reused brainbudt's safe-Rust texture copy optimization in `38985da7` with attribution to the original commit. See [optimization matrix](OPTIMIZATION_MATRIX.md).
- Added packed linear plane copies and regression coverage in `3d10a2ee`. Added the synthetic copy harness and frame interval analyzer in `e04aea17`. See [benchmarks](BENCHMARKS.md).
- Identified the default Intel adapter on the hybrid laptop and added opt-in NVIDIA selection in `7dd9a868`. The opt-in test checked the actual device LUID. See [NVIDIA compatibility](NVIDIA_COMPATIBILITY.md).
- Both release variants compiled and passed CLI smoke tests. Clippy passed with default and all features. The baseline and NVIDIA-opt-in candidate workspace runs reported the same five failed tests, with 867 and 872 passes respectively in the Cargo logs, including the nested fixture runner. See [known issues](KNOWN_ISSUES.md).

Work branch is `codex/texture-copy`. The compiled source commit is `7dd9a868`. The following documentation commit records the baseline and validation. The next engineering milestone is to isolate descriptor heap sizing and shader test failures on the target GPU.
7 changes: 7 additions & 0 deletions KNOWN_ISSUES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Known issues

- Upstream CPU texture and descriptor behavior can be tested with generated fixtures. Representative gameplay timing, image fidelity, the dominant frame bottleneck and sustained stability remain unmeasured on the target system.
- Upstream `dynamic_slots_are_held_until_released` asserts that the actual host heap reaches `HEAP_VIEWS`. `lists_share_a_table_and_copies_keep_their_views` asserts that allocated pairs are past a hard-coded dynamic slot boundary. Both failed on the pinned machine before the texture change. Investigate the host-dependent heap sizing and where the shader gets its index bound together. [Upstream NVIDIA descriptor-limit report](https://github.com/Marvisak/VIctory/issues/1835)
- Three other upstream hardware tests failed before the texture change. The null-buffer dispatch and 64-bit image atomic tests returned an invalid parameter error. The hardware fused dot-product test returned a different result bit pattern. These paths need independent adapter and capability checks.
- The repository's [asset policy](docs/asset-policy.md) identifies the inherited BCPack table as outside the upstream GPL license. The candidate adds source and synthetic measurement tooling. The local executable retains the upstream dependency and is kept local.
- External reports include GPU device removal entering the world on other NVIDIA setups. A synthetic texture throughput result cannot resolve that issue. [Upstream RTX 5070 Ti report](https://github.com/Marvisak/VIctory/issues/1216)
15 changes: 15 additions & 0 deletions NVIDIA_COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NVIDIA compatibility

Local discovery on 2026-11-26 found an NVIDIA GeForce RTX 5070 Ti Laptop GPU with driver 621.14 and 12,227 MiB reported by NVIDIA SMI. NVIDIA documents the laptop SKU as Blackwell with 12 GB GDDR7. DXDiag reported D3D12 DDI 12, feature level up to 12_2 and WDDM 3.2 for the NVIDIA adapter. Vulkaninfo reported Vulkan 1.4.357 for that adapter. The host also exposes Intel integrated graphics, so capture metadata should identify the adapter used.

A local D3D12 API probe opened the RTX explicitly. It returned Shader Model 6.8 (probe ceiling), resource binding tier 3, 32-lane waves, native 16-bit shader operations, raytracing tier 1.2, mesh shader tier 1, and a point-in-time DXGI local-memory budget of 11,176 MiB. NVIDIA SMI reported compute capability 12.0.

The default D3D12 adapter resolved to Intel Graphics in the probe. Set `VICTORY_D3D12_NVIDIA=1` for Axiz-VIctory to try compatible NVIDIA adapters in DXGI order. Mode selection is once per process. The log names the NVIDIA adapter when selected and reports fallback to the system default when none can be used. The diagnostics WARP switch takes precedence. Shader crate hardware tests use their own adapter selection.

The CPU is an x86-64 Intel Core Ultra 9 275HX with 24 cores and 24 logical processors. Windows 11 Pro is build 26300. The OS reports 33,752,997,888 bytes of physical memory. Drive C had about 300 GiB free. The automatically managed pagefile showed a 2 GiB allocation and zero reported use at inspection.

Git 2.56.1 and GitHub CLI 2.105.0 were available, and authenticated GitHub API and HTTPS fetch succeeded. Cargo, rustc, MSVC, the Windows SDK, DXDiag, Vulkaninfo, NVIDIA SMI and Windows Performance Recorder were available. Nsight Graphics and Nsight Systems were not found on PATH or in the standard NVIDIA installation directory checked.

The texture-copy path changes host CPU work. Shader execution, occupancy, register pressure, queues, VRAM residency and pipeline behavior require adapter-specific captures before choosing an NVIDIA profile. The upstream runtime queries D3D12 capabilities in `crates/victory-gpu/src/host.rs`.

[NVIDIA RTX 50 Series Laptop specifications](https://www.nvidia.com/en-gb/geforce/laptops/50-series/)
Loading