GPU: add VICTORY_TEXTURE_MIP_DROP and DXGI auto-default for <= 8 GB GPUs (fixes #737, #1226) #1296

Closed
github-bot wants to merge 8 commits from gh-pr/1296/head into gh-pr/1296/base
Owner

@⁠antikohza on GitHub · 2026-11-24 17:13 UTC · original
antikohza:feat/texture-mip-drop-budget → main · +850 −41 · 6 files · 8 commits · closed without merging

Resolves #737, resolves #1226.

Summary

Introduces a proactive texture mip-drop subsystem and quality switch (VICTORY_TEXTURE_MIP_DROP, clamped 0..=3), plus discrete GPU adapter selection and automatic LUID-matched VRAM detection that defaults drop = 1 on GPUs with \le 8\text{ GiB} dedicated VRAM.

Primary verified result: Eliminates E_OUTOFMEMORY (0x8007000E) host allocation failures and driver commit exhaustion during world loading on 6–8 GB cards (~1.1–1.2 GiB VRAM saved, keeping process commit within budget so world streaming proceeds instead of crashing at 79 packs). Frame pacing in world streaming (~0.5–1.1 FPS on Windows / ~10 s/frame on Proton) remains governed by CPU-side memory copies (#834), not mip-drop.


Root Cause Analysis (Profiled by @⁠Logan-Gaillard)

During world loading on an 8 GB VRAM / 15.4 GB RAM hybrid laptop:

  1. Default iGPU selection trap: D3D12CreateDevice(None, ...) picked the Intel iGPU (128 MiB dedicated), pushing host texture copies into shared system memory and failing on submission 1 (0x887A0004).
  2. Commit quota exhaustion: On the discrete card or default heap, opening 79 packs creates thousands of committed host textures; Windows Private Committed Memory spiked to 15.6 GB on a 15.4 GB machine (38.3 GB commit limit) even while nvidia-smi physical VRAM sat at 501 MiB, causing E_OUTOFMEMORY (0x8007000E) and command list did not close.
  3. Why proactive beats reactive: By halving dimensions upfront across pure sampled POT textures (\ge 1024\text{ px}), allocation pressure drops by ~75% from pack 1, keeping commit under ceiling with 0 no host texture failures.

Key Features & Design Choices

  1. Discrete GPU Selection & LUID-Matched VRAM Detection (host.rs, texture.rs):

    • best_adapter() probes non-software DXGI adapters supporting D3D_FEATURE_LEVEL_12_0 and picks the card with the largest DedicatedVideoMemory (with fallback to D3D12CreateDevice(None, ...)), preventing hybrid laptops from defaulting to the 128 MiB iGPU.
    • adapter_memory() matches device.GetAdapterLuid() against DXGI adapter LUIDs and stores it in DEVICE_MEMORY.
    • texture_mip_drop() reads device_memory() live (no stale OnceLock caching), automatically defaulting to drop = 1 when \text{VRAM} \le 8.5\text{ GiB}. Explicit VICTORY_TEXTURE_MIP_DROP=0..=3 always takes precedence.
  2. NPOT / UI Exemption, Size Floor & BCn Alignment (resource.rs):

    • Explicitly exempts non-power-of-two textures (1920×1080, 1280×720, 2560×1440) so loading artwork and UI surfaces remain at native resolution.
    • Enforces a configurable VICTORY_TEXTURE_MIP_DROP_MIN_SIZE floor (default 1024, e.g. 2048 for conservative mode) and preserves element(pc_format(format)) block alignment (4×4 for BC1–BC7) when MIN_SIZE is lowered.
    • host_texture() returns (ID3D12Resource, u32) so HostTexture.mip_drop is computed once and cannot drift from the actual resource.
  3. SRV Window Re-basing, Clamping & ResourceMinLODClamp (descriptor/host.rs):

    • Shifts MostDetailedMip, clamps MipLevels, and shifts ResourceMinLODClamp ((min_lod - drop as f32).max(0.0)) uniformly across all 7 SRV dimensions (1D, 1DArray, 2D, 2DArray, 3D, Cube, CubeArray), clamping out-of-range views to host_mips - 1.
  4. Command-List Copy, Partial Copy & Resolve Mapping (list.rs, texture.rs):

    • copy_texture_region and resolve: Remap guest subresource indices via host_subresource(), discard copies/resolves into dropped mips, and clip ResolveSubresourceRegion using mip-adjusted dimensions.
    • copy_resource: When source and destination differ in mip_drop (e.g., RT/UAV to sampled texture), safely copies overlapping surviving mips via CopyLocation::subresource(...) without raw pointer transmutes.
    • HostWritten: Tracks partial host writes per subresource via a zero-allocation u128 bitmask (with HashSet<u32> fallback for \ge 128 subresources) so untouched upper mips stay eligible for title-memory upload.

Hardware & Test Verification

  • Windows 11 / RTX 5070 Laptop 8 GB + Intel iGPU (@Logan-Gaillard, #737 / #1226 / #653): Eliminated all 40+ E_OUTOFMEMORY failures and command list did not close; reaches world streaming (726 draws/frame, 0.5–1.1 FPS before separate residual #653 fault; loading/menu screen runs at 30 FPS / 11 draws/frame). Local LUID + best_adapter test confirmed RTX selection (8,273,264,640 bytes) and drop = 1.
  • Linux 7.0 / Proton 11.0 / RTX 3070 Laptop 8 GB (@ghmfreitas, #737): Tested 4dd48bd (auto): peak VRAM 7,843 MiB → 6,664 MiB (~1.18 GiB saved), kernel NV_ERR_NO_MEMORY 13 → 0, ran 15 min world streaming (200+ draws/frame, ~9.8–12.0 s/frame CPU-copy bound).
  • Windows 10 / RTX 4070 SUPER 12 GB (@bittertea0323, #1086): Reduced peak VRAM 11.3 GiB → 10.3 GiB (~1 GiB saved with 2048 floor), fitting the world stage under 12 GB.
  • Windows 11 / RTX 4070 Ti + WARP (@DrDarkDK, #737): MSAA resolve readback verified bit-for-bit across all 262,144 pixels on both hardware and WARP.
  • Windows 11 / AMD RX 9060 XT 16 GB (@geiyiliyabumo, #1296): Verified 4dd48bd (victory-gpu: 54 passed, 0 failed; clippy + xtask policy clean).
**@⁠antikohza** on GitHub · 2026-11-24 17:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296) `antikohza:feat/texture-mip-drop-budget` → `main` · +850 −41 · 6 files · 8 commits · closed without merging Resolves #737, resolves #1226. ### Summary Introduces a proactive texture mip-drop subsystem and quality switch (`VICTORY_TEXTURE_MIP_DROP`, clamped `0..=3`), plus discrete GPU adapter selection and automatic LUID-matched VRAM detection that defaults `drop = 1` on GPUs with $\le 8\text{ GiB}$ dedicated VRAM. **Primary verified result:** Eliminates `E_OUTOFMEMORY (0x8007000E)` host allocation failures and driver commit exhaustion during world loading on 6–8 GB cards (**~1.1–1.2 GiB VRAM saved**, keeping process commit within budget so world streaming proceeds instead of crashing at 79 packs). Frame pacing in world streaming (`~0.5–1.1 FPS` on Windows / `~10 s/frame` on Proton) remains governed by CPU-side memory copies (#834), not mip-drop. --- ### Root Cause Analysis (Profiled by @⁠Logan-Gaillard) During world loading on an 8 GB VRAM / 15.4 GB RAM hybrid laptop: 1. **Default iGPU selection trap:** `D3D12CreateDevice(None, ...)` picked the Intel iGPU (128 MiB dedicated), pushing host texture copies into shared system memory and failing on submission 1 (`0x887A0004`). 2. **Commit quota exhaustion:** On the discrete card or default heap, opening 79 packs creates thousands of committed host textures; Windows Private Committed Memory spiked to **15.6 GB** on a 15.4 GB machine (38.3 GB commit limit) even while `nvidia-smi` physical VRAM sat at **501 MiB**, causing `E_OUTOFMEMORY (0x8007000E)` and `command list did not close`. 3. **Why proactive beats reactive:** By halving dimensions upfront across pure sampled POT textures ($\ge 1024\text{ px}$), allocation pressure drops by **~75%** from pack 1, keeping commit under ceiling with **0** `no host texture` failures. --- ### Key Features & Design Choices 1. **Discrete GPU Selection & LUID-Matched VRAM Detection (`host.rs`, `texture.rs`)**: - `best_adapter()` probes non-software DXGI adapters supporting `D3D_FEATURE_LEVEL_12_0` and picks the card with the largest `DedicatedVideoMemory` (with fallback to `D3D12CreateDevice(None, ...)`), preventing hybrid laptops from defaulting to the 128 MiB iGPU. - `adapter_memory()` matches `device.GetAdapterLuid()` against DXGI adapter LUIDs and stores it in `DEVICE_MEMORY`. - `texture_mip_drop()` reads `device_memory()` live (no stale `OnceLock` caching), automatically defaulting to `drop = 1` when $\text{VRAM} \le 8.5\text{ GiB}$. Explicit `VICTORY_TEXTURE_MIP_DROP=0..=3` always takes precedence. 2. **NPOT / UI Exemption, Size Floor & BCn Alignment (`resource.rs`)**: - Explicitly exempts non-power-of-two textures (`1920×1080`, `1280×720`, `2560×1440`) so loading artwork and UI surfaces remain at native resolution. - Enforces a configurable `VICTORY_TEXTURE_MIP_DROP_MIN_SIZE` floor (default `1024`, e.g. `2048` for conservative mode) and preserves `element(pc_format(format))` block alignment (4×4 for BC1–BC7) when `MIN_SIZE` is lowered. - `host_texture()` returns `(ID3D12Resource, u32)` so `HostTexture.mip_drop` is computed once and cannot drift from the actual resource. 3. **SRV Window Re-basing, Clamping & `ResourceMinLODClamp` (`descriptor/host.rs`)**: - Shifts `MostDetailedMip`, clamps `MipLevels`, and shifts `ResourceMinLODClamp` (`(min_lod - drop as f32).max(0.0)`) uniformly across all 7 SRV dimensions (`1D`, `1DArray`, `2D`, `2DArray`, `3D`, `Cube`, `CubeArray`), clamping out-of-range views to `host_mips - 1`. 4. **Command-List Copy, Partial Copy & Resolve Mapping (`list.rs`, `texture.rs`)**: - `copy_texture_region` and `resolve`: Remap guest subresource indices via `host_subresource()`, discard copies/resolves into dropped mips, and clip `ResolveSubresourceRegion` using mip-adjusted dimensions. - `copy_resource`: When source and destination differ in `mip_drop` (e.g., RT/UAV to sampled texture), safely copies overlapping surviving mips via `CopyLocation::subresource(...)` without raw pointer transmutes. - `HostWritten`: Tracks partial host writes per subresource via a zero-allocation `u128` bitmask (with `HashSet<u32>` fallback for $\ge 128$ subresources) so untouched upper mips stay eligible for title-memory upload. --- ### Hardware & Test Verification - **Windows 11 / RTX 5070 Laptop 8 GB + Intel iGPU (`@Logan-Gaillard`, #737 / #1226 / #653):** Eliminated all 40+ `E_OUTOFMEMORY` failures and `command list did not close`; reaches world streaming (`726 draws/frame`, `0.5–1.1 FPS` before separate residual `#653` fault; loading/menu screen runs at `30 FPS / 11 draws/frame`). Local LUID + `best_adapter` test confirmed RTX selection (`8,273,264,640` bytes) and `drop = 1`. - **Linux 7.0 / Proton 11.0 / RTX 3070 Laptop 8 GB (`@ghmfreitas`, #737):** Tested `4dd48bd` (`auto`): peak VRAM **7,843 MiB → 6,664 MiB (~1.18 GiB saved)**, kernel `NV_ERR_NO_MEMORY` **13 → 0**, ran 15 min world streaming (`200+ draws/frame`, `~9.8–12.0 s/frame` CPU-copy bound). - **Windows 10 / RTX 4070 SUPER 12 GB (`@bittertea0323`, #1086):** Reduced peak VRAM **11.3 GiB → 10.3 GiB** (`~1 GiB` saved with 2048 floor), fitting the world stage under 12 GB. - **Windows 11 / RTX 4070 Ti + WARP (`@DrDarkDK`, #737):** MSAA resolve readback verified bit-for-bit across all **262,144 pixels** on both hardware and WARP. - **Windows 11 / AMD RX 9060 XT 16 GB (`@geiyiliyabumo`, #1296):** Verified `4dd48bd` (`victory-gpu`: 54 passed, 0 failed; clippy + `xtask policy` clean).
When VICTORY_TEXTURE_MIP_DROP is not explicitly configured in the environment,
query DXGI adapter DedicatedVideoMemory across non-software adapters.
If primary discrete VRAM is <= 8.5 GiB (capturing 4 GB, 6 GB, and 8 GB cards
such as RTX 5070 Laptop, RTX 4060, RX 6600), default mip drop to 1 to prevent
host driver committed memory exhaustion (E_OUTOFMEMORY 0x8007000E). Textures on
>= 10 GB GPUs remain at full native resolution (drop = 0). Explicit user
overrides via VICTORY_TEXTURE_MIP_DROP continue to take precedence.
- Select the non-software adapter with the most DedicatedVideoMemory during
  D3D12CreateDevice to prevent hybrid laptops (Intel/NVIDIA) from defaulting
  to the 128 MiB integrated GPU.
- Match device.GetAdapterLuid() against DXGI adapter LUIDs to record the exact
  memory of the active device.
- Read device_memory() live in texture_mip_drop to avoid stale caching during
  early device initialization.
- Clamp most_detailed in adjust_mips to host_mips - 1 to guard out-of-range
  guest SRV descriptors.

Reported-and-tested-by: Logan-Gaillard <[email protected]>
Reviewed-by: geiyiliyabumo <[email protected]>
- Adjust ResourceMinLODClamp across all 7 SRV dimensions and avoid duplicate GetDesc() in descriptor/host.rs
- Return (texture, drop) from host_texture() so HostTexture.mip_drop is computed once, and guard BCn 4x4 block alignment for custom MIN_SIZE
- Replace mip-drop mismatch skip in copy_resource() with safe CopyLocation::subresource overlapping-mip copies
- Track per-subresource HostWritten via zero-alloc u128 bitmask (with HashSet fallback) for partial copies and resolves
- Probe D3D_FEATURE_LEVEL_12_0 in best_adapter() with fallback to default adapter in Host::create()
- Add unit tests for out-of-range SRV clamping, ResourceMinLODClamp, BC7 alignment, VRAM threshold, and HostWritten tracking
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:26:43 +00:00
github-bot closed this pull request 2026-11-26 04:26:43 +00:00
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 17:19 UTC · original

Tested this head (4dd48bd) in-game on the machine the issue came from, in both adapter
configurations. The memory half is solid; the probe reads the wrong card on this class of laptop.

Machine: RTX 5070 Laptop (DedicatedVideoMemory = 8,273,264,640) plus an Intel iGPU,
15.4 GB RAM, 24.8 GB pagefile, retail 1.0.2.1 from SSD, Windows 11, release build.

1. Default adapter — what a user gets without touching anything. The device comes from
D3D12CreateDevice(None, ...), which on this laptop is the Intel iGPU:

host adapter adapter=Intel(R) Graphics
host device memory bytes=134217728      (128 MiB dedicated)

The probe takes the maximum DedicatedVideoMemory across adapters (the RTX), so it auto-enables
drop = 1 for a device that is not on that card. The run still dies at world load:

ERROR host GPU device removed after a submission of 1 lists (0x887A0004)
ERROR a host command list did not close (0x887A0005, device paused)

2. Device forced onto the RTX (per-app Windows GPU preference for the exe): auto drop = 1,
and the load gets much further — world streaming at 0.5-1.1 fps, 165-289 MB of copies and
93-136 MB of textures per frame, 245-1219 ms on the GPU — then:

ERROR host GPU device removed after a submission of 11 lists (0x887A0004)

Request. Measure the adapter the device was created on, not the best one:

let luid = device.GetAdapterLuid();               // the device's own card
// match it against IDXGIAdapter1::GetDesc1().AdapterLuid while enumerating

Otherwise a laptop whose default is its iGPU computes its texture budget from a card it never
uses, and a 12 GB laptop with an iGPU default stays at drop = 0 while its host copies live in
shared system memory — the exact case this switch is for. Creating the device on the adapter with
the most dedicated memory would also do it, and would help the frame rate on this class of
machine independently of the mip drop.

For the record, even on the right adapter world streaming still removes the device here with no
allocation failure in the log: that residual fault is #653 and is independent of texture size, so
this PR resolves the memory failure (#1226) but not world entry on this hardware.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 17:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7139034106) Tested this head (`4dd48bd`) in-game on the machine the issue came from, in both adapter configurations. The memory half is solid; the probe reads the wrong card on this class of laptop. **Machine**: RTX 5070 Laptop (`DedicatedVideoMemory` = 8,273,264,640) plus an Intel iGPU, 15.4 GB RAM, 24.8 GB pagefile, retail 1.0.2.1 from SSD, Windows 11, release build. **1. Default adapter — what a user gets without touching anything.** The device comes from `D3D12CreateDevice(None, ...)`, which on this laptop is the **Intel iGPU**: ``` host adapter adapter=Intel(R) Graphics host device memory bytes=134217728 (128 MiB dedicated) ``` The probe takes the maximum `DedicatedVideoMemory` across adapters (the RTX), so it auto-enables `drop = 1` for a device that is not on that card. The run still dies at world load: ``` ERROR host GPU device removed after a submission of 1 lists (0x887A0004) ERROR a host command list did not close (0x887A0005, device paused) ``` **2. Device forced onto the RTX** (per-app Windows GPU preference for the exe): auto `drop = 1`, and the load gets much further — world streaming at 0.5-1.1 fps, 165-289 MB of copies and 93-136 MB of textures per frame, 245-1219 ms on the GPU — then: ``` ERROR host GPU device removed after a submission of 11 lists (0x887A0004) ``` **Request.** Measure the adapter the device was created on, not the best one: ```rust let luid = device.GetAdapterLuid(); // the device's own card // match it against IDXGIAdapter1::GetDesc1().AdapterLuid while enumerating ``` Otherwise a laptop whose default is its iGPU computes its texture budget from a card it never uses, and a 12 GB laptop with an iGPU default stays at `drop = 0` while its host copies live in shared system memory — the exact case this switch is for. Creating the device on the adapter with the most dedicated memory would also do it, and would help the frame rate on this class of machine independently of the mip drop. For the record, even on the right adapter world streaming still removes the device here with no allocation failure in the log: that residual fault is #653 and is independent of texture size, so this PR resolves the memory failure (#1226) but not world entry on this hardware.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 17:24 UTC · original

Since the probe is the one open point, here is the concrete patch I ran here (from my local
fix/auto-mip-drop-on-oom branch, built and tested on the same laptop). It replaces "the best
adapter's memory" with "the memory of the adapter the device was actually created on", and
optionally creates the device on the best adapter in the first place.

crates/victory-gpu/src/host.rs — remember the device's own card:

static DEVICE_MEMORY: AtomicU64 = AtomicU64::new(0);

/// The memory of the adapter `device` runs on (`0` when DXGI does not name it).
pub(crate) fn device_memory() -> u64 {
    DEVICE_MEMORY.load(Ordering::Relaxed)
}

fn adapter_memory(device: &ID3D12Device) -> Option<u64> {
    unsafe {
        let factory: IDXGIFactory4 = CreateDXGIFactory2(DXGI_CREATE_FACTORY_FLAGS(0)).ok()?;
        let luid = device.GetAdapterLuid();
        let mut i = 0;
        while let Ok(adapter) = factory.EnumAdapters1(i) {
            if let Ok(desc) = adapter.GetDesc1() && desc.AdapterLuid == luid {
                return Some(desc.DedicatedVideoMemory as u64);
            }
            i += 1;
        }
        None
    }
}

called right after let device = device.ok_or_else(...)?;:

DEVICE_MEMORY.store(adapter_memory(&device).unwrap_or(0), Ordering::Relaxed);
tracing::info!(bytes = device_memory(), "host device memory");

crates/victory-gpu/src/texture.rs — read that live instead of enumerating:

let own = crate::host::device_memory();            // 0 before the device exists
let automatic = u32::from(own != 0 && own <= (8 << 30));

Read it live rather than caching it in a OnceLock: the first call can happen while the device is
still being created, and a cached 0 then keeps the drop off for the whole run (that is exactly
how my first attempt silently did nothing).

Optional, and worth it on this class of machine — create the device on the biggest card
instead of DXGI's default, which is the iGPU on most laptops:

} else if let Some(adapter) = best_adapter() {
    D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_12_0, &mut device)?;
} else {
    D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, &mut device)?;
}

with best_adapter() returning the non-software IDXGIAdapter1 with the largest
DedicatedVideoMemory.

Measured here with both parts in place: host adapter adapter=NVIDIA GeForce RTX 5070 Laptop GPU,
host device memory bytes=8273264640, texture mip drop drop=1 asked=0, world streaming with
zero no host texture, before the residual #653 fault. Without the LUID part, the same build on
the same machine logs host adapter adapter=Intel(R) Graphics, drops detail based on a card it is
not using, and still dies at the first submission.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 17:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7139154162) Since the probe is the one open point, here is the concrete patch I ran here (from my local `fix/auto-mip-drop-on-oom` branch, built and tested on the same laptop). It replaces "the best adapter's memory" with "the memory of the adapter the device was actually created on", and optionally creates the device on the best adapter in the first place. **`crates/victory-gpu/src/host.rs`** — remember the device's own card: ```rust static DEVICE_MEMORY: AtomicU64 = AtomicU64::new(0); /// The memory of the adapter `device` runs on (`0` when DXGI does not name it). pub(crate) fn device_memory() -> u64 { DEVICE_MEMORY.load(Ordering::Relaxed) } fn adapter_memory(device: &ID3D12Device) -> Option<u64> { unsafe { let factory: IDXGIFactory4 = CreateDXGIFactory2(DXGI_CREATE_FACTORY_FLAGS(0)).ok()?; let luid = device.GetAdapterLuid(); let mut i = 0; while let Ok(adapter) = factory.EnumAdapters1(i) { if let Ok(desc) = adapter.GetDesc1() && desc.AdapterLuid == luid { return Some(desc.DedicatedVideoMemory as u64); } i += 1; } None } } ``` called right after `let device = device.ok_or_else(...)?;`: ```rust DEVICE_MEMORY.store(adapter_memory(&device).unwrap_or(0), Ordering::Relaxed); tracing::info!(bytes = device_memory(), "host device memory"); ``` **`crates/victory-gpu/src/texture.rs`** — read that live instead of enumerating: ```rust let own = crate::host::device_memory(); // 0 before the device exists let automatic = u32::from(own != 0 && own <= (8 << 30)); ``` Read it live rather than caching it in a `OnceLock`: the first call can happen while the device is still being created, and a cached `0` then keeps the drop off for the whole run (that is exactly how my first attempt silently did nothing). **Optional, and worth it on this class of machine** — create the device on the biggest card instead of DXGI's default, which is the iGPU on most laptops: ```rust } else if let Some(adapter) = best_adapter() { D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_12_0, &mut device)?; } else { D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, &mut device)?; } ``` with `best_adapter()` returning the non-software `IDXGIAdapter1` with the largest `DedicatedVideoMemory`. Measured here with both parts in place: `host adapter adapter=NVIDIA GeForce RTX 5070 Laptop GPU`, `host device memory bytes=8273264640`, `texture mip drop drop=1 asked=0`, world streaming with zero `no host texture`, before the residual #653 fault. Without the LUID part, the same build on the same machine logs `host adapter adapter=Intel(R) Graphics`, drops detail based on a card it is not using, and still dies at the first submission.
Author
Owner

@⁠antikohza on GitHub · 2026-11-24 17:29 UTC · original

@⁠Logan-Gaillard That would be awesome. The goal is to make sure everyone with a low-VRAM or hybrid laptop can just boot up and run the game without hitting roadblocks.

Please share your diff or commit patch (paste it here or link a gist/branch) and I will merge it directly into this PR so hybrid laptop users get discrete GPU selection and LUID-matched auto-drop out of the box!

**@⁠antikohza** on GitHub · 2026-11-24 17:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7139267113) @⁠Logan-Gaillard That would be awesome. The goal is to make sure everyone with a low-VRAM or hybrid laptop can just boot up and run the game without hitting roadblocks. Please share your diff or commit patch (paste it here or link a gist/branch) and I will merge it directly into this PR so hybrid laptop users get discrete GPU selection and LUID-matched auto-drop out of the box!
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 17:35 UTC · original

Independent verification of \4dd48bd\ on Windows 11 / AMD Radeon RX 9060 XT (RDNA4, \gfx1200, 16 GB VRAM) / Rust 1.98.1 MSVC:

  • Merge check vs \main\ (\ fe310e): clean
  • \cargo test -p victory-gpu --lib: 54 passed, 0 failed, 1 ignored (including \srv_mips_adjustment_handles_straddled_and_dropped_views\ and the new \mip_drop\ unit tests)
  • \cargo clippy -p victory-gpu --all-targets -- -D warnings\ (default and --all-features): clean
  • \cargo xtask policy: 154 files ok

Minor edge-case note in \djust_mips\ (\descriptor/host.rs:646): if a guest view has *most_detailed >= drop + host_mips, clamping *most_detailed = (*most_detailed).min(host_mips.saturating_sub(1))\ before computing \max_mips\ avoids passing an out-of-range \MostDetailedMip\ with \MipLevels = 1\ to \CreateShaderResourceView. (Live <= 8 GB VRAM auto-default path not triggered on this 16 GB GPU.)

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 17:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7139416632) Independent verification of \4dd48bd\ on **Windows 11 / AMD Radeon RX 9060 XT (RDNA4, \gfx1200\, 16 GB VRAM) / Rust 1.98.1 MSVC**: - Merge check vs \main\ (\ fe310e\): clean - \cargo test -p victory-gpu --lib\: **54 passed, 0 failed, 1 ignored** (including \srv_mips_adjustment_handles_straddled_and_dropped_views\ and the new \mip_drop\ unit tests) - \cargo clippy -p victory-gpu --all-targets -- -D warnings\ (default and \--all-features\): clean - \cargo xtask policy\: 154 files ok Minor edge-case note in \djust_mips\ (\descriptor/host.rs:646\): if a guest view has \*most_detailed >= drop + host_mips\, clamping \*most_detailed = (*most_detailed).min(host_mips.saturating_sub(1))\ before computing \max_mips\ avoids passing an out-of-range \MostDetailedMip\ with \MipLevels = 1\ to \CreateShaderResourceView\. (Live <= 8 GB VRAM auto-default path not triggered on this 16 GB GPU.) *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠antikohza on GitHub · 2026-11-24 18:44 UTC · original

@⁠Logan-Gaillard @⁠geiyiliyabumo Head updated to 814c580 with all checks green:

  1. Discrete GPU Selection & LUID Matching:

    • Host::create now selects the non-software adapter with the most DedicatedVideoMemory via best_adapter(), completely bypassing the 128 MiB Intel iGPU trap on hybrid laptops.
    • adapter_memory matches device.GetAdapterLuid() against DXGI adapter LUIDs to ensure the exact device memory is recorded.
    • texture_mip_drop() reads device_memory() live, avoiding stale early caching.
  2. Descriptor Clamping:

    • Clamped *most_detailed in adjust_mips (descriptor/host.rs) to host_mips.saturating_sub(1) as suggested by @⁠geiyiliyabumo to guard out-of-range guest SRV descriptors.

All workspace unit tests and clippy checks pass clean.

**@⁠antikohza** on GitHub · 2026-11-24 18:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7141088027) @⁠Logan-Gaillard @⁠geiyiliyabumo Head updated to `814c580` with all checks green: 1. **Discrete GPU Selection & LUID Matching**: - `Host::create` now selects the non-software adapter with the most `DedicatedVideoMemory` via `best_adapter()`, completely bypassing the 128 MiB Intel iGPU trap on hybrid laptops. - `adapter_memory` matches `device.GetAdapterLuid()` against DXGI adapter LUIDs to ensure the exact device memory is recorded. - `texture_mip_drop()` reads `device_memory()` live, avoiding stale early caching. 2. **Descriptor Clamping**: - Clamped `*most_detailed` in `adjust_mips` (`descriptor/host.rs`) to `host_mips.saturating_sub(1)` as suggested by @⁠geiyiliyabumo to guard out-of-range guest SRV descriptors. All workspace unit tests and clippy checks pass clean.
Author
Owner

@⁠crashbashash on GitHub · 2026-11-24 18:50 UTC · original

The test line in the description ("loading into the open world at 29–30 FPS (34.4 ms/frame, 11 draws/frame)") and the "Open World: 29–30 FPS / 34.4 ms" row look out of date. 11 draws per frame is a loading or menu screen: the title sits at exactly that pacing in the menus on my machine too (30.0 fps / 33.3 ms, RX 6800 XT, Proton).

@⁠Logan-Gaillard's later runs on this PR have world streaming at 0.5–1.1 fps, and in one run 726 draws per frame at about 1.4 s per frame before the device was removed. His summary: the PR fixes the memory failure (#1226) but not world entry on that laptop. @⁠ghmfreitas's A/B in #737 shows world pacing doesn't change with the drop (9.8 s per frame off, 10.5–12.0 s on, most of it CPU-side copies, #834).

So the result to state is the memory one (about 1.1 GB less VRAM, no allocation failures, commit kept under ~5 GB), not a frame rate.

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

**@⁠crashbashash** on GitHub · 2026-11-24 18:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7141237791) The test line in the description ("loading into the open world at 29–30 FPS (34.4 ms/frame, 11 draws/frame)") and the "Open World: 29–30 FPS / 34.4 ms" row look out of date. 11 draws per frame is a loading or menu screen: the title sits at exactly that pacing in the menus on my machine too (30.0 fps / 33.3 ms, RX 6800 XT, Proton). @⁠Logan-Gaillard's later runs on this PR have world streaming at 0.5–1.1 fps, and in one run 726 draws per frame at about 1.4 s per frame before the device was removed. His summary: the PR fixes the memory failure (#1226) but not world entry on that laptop. @⁠ghmfreitas's A/B in #737 shows world pacing doesn't change with the drop (9.8 s per frame off, 10.5–12.0 s on, most of it CPU-side copies, #834). So the result to state is the memory one (about 1.1 GB less VRAM, no allocation failures, commit kept under ~5 GB), not a frame rate. No game data used. AI-assisted (Claude Code).
Author
Owner

@⁠antikohza on GitHub · 2026-11-24 19:46 UTC · original

Updated to a6f3ccb (CI green: run 45470890213):

  1. PR Description (@crashbashash): Replaced the 29–30 FPS / 11 draws world-load wording with the verified VRAM/commit savings (~1.1–1.2 GiB saved, 0 E_OUTOFMEMORY / kernel NV_ERR_NO_MEMORY errors), clearly distinguishing loading/menu pacing (30 FPS / 11 draws) from CPU-copy-bound world streaming (#834).
  2. Code Hardening (a6f3ccb):
    • descriptor/host.rs: shifted ResourceMinLODClamp uniformly across all 7 SRV dimensions and added tests for most_detailed >= drop + host_mips and ResourceMinLODClamp.
    • resource.rs: host_texture() returns (ID3D12Resource, u32) once (no duplicate compute_mip_drop call) and guards element(pc_format(format)) BCn 4×4 block alignment when VICTORY_TEXTURE_MIP_DROP_MIN_SIZE is lowered.
    • list.rs & texture.rs: replaced the mip_drop mismatch skip in copy_resource with safe CopyLocation::subresource overlapping-mip copies and a zero-alloc u128 bitmask (HostWritten) for partial copies/resolves.
    • host.rs: added supports_fl12 probe inside best_adapter() and default-adapter fallback in Host::create().
  3. Compatibility with #1542 (#431 + #967 + #1418/#1426/#1439): Maintained a clean rebased branch at antikohza:feat/texture-mip-drop-on-1542 (0d79788, Windows MSVC CI green: run 45473319819) in case #1542 lands before this PR.
**@⁠antikohza** on GitHub · 2026-11-24 19:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7142570773) Updated to `a6f3ccb` (CI green: [run 45470890213](https://github.com/antikohza/VIctory/actions/runs/45470890213)): 1. **PR Description (`@crashbashash`):** Replaced the `29–30 FPS / 11 draws` world-load wording with the verified VRAM/commit savings (~1.1–1.2 GiB saved, 0 `E_OUTOFMEMORY` / kernel `NV_ERR_NO_MEMORY` errors), clearly distinguishing loading/menu pacing (`30 FPS / 11 draws`) from CPU-copy-bound world streaming (#834). 2. **Code Hardening (`a6f3ccb`):** - `descriptor/host.rs`: shifted `ResourceMinLODClamp` uniformly across all 7 SRV dimensions and added tests for `most_detailed >= drop + host_mips` and `ResourceMinLODClamp`. - `resource.rs`: `host_texture()` returns `(ID3D12Resource, u32)` once (no duplicate `compute_mip_drop` call) and guards `element(pc_format(format))` BCn 4×4 block alignment when `VICTORY_TEXTURE_MIP_DROP_MIN_SIZE` is lowered. - `list.rs` & `texture.rs`: replaced the `mip_drop` mismatch skip in `copy_resource` with safe `CopyLocation::subresource` overlapping-mip copies and a zero-alloc `u128` bitmask (`HostWritten`) for partial copies/resolves. - `host.rs`: added `supports_fl12` probe inside `best_adapter()` and default-adapter fallback in `Host::create()`. 3. **Compatibility with `#1542` (`#431` + `#967` + `#1418`/`#1426`/`#1439`):** Maintained a clean rebased branch at [`antikohza:feat/texture-mip-drop-on-1542`](https://github.com/antikohza/VIctory/tree/feat/texture-mip-drop-on-1542) (`0d79788`, Windows MSVC CI green: [run 45473319819](https://github.com/antikohza/VIctory/actions/runs/45473319819)) in case `#1542` lands before this PR.
Author
Owner

@⁠pfhandler on GitHub · 2026-11-24 20:50 UTC · original

Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB):

  • VICTORY_NO_HOST_PAD=1 — a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad lets VICTORY_KEYS drive the title again.
  • VICTORY_MODE=1920x1080 — the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here).

Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above.

diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs
index c7f7c45..2535b68 100644
--- a/crates/victory-gpu/src/dxgi.rs
+++ b/crates/victory-gpu/src/dxgi.rs
@@ -219,6 +219,19 @@ struct Mode {
 }
 const _: () = assert!(size_of::<Mode>() == 32);
 
+/// The console's fixed output mode, overridable for hosts smaller than the
+/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead.
+fn mode_size() -> (u32, u32) {
+    const DEFAULT: (u32, u32) = (3840, 2160);
+    let Some(text) = std::env::var_os("VICTORY_MODE") else {
+        return DEFAULT;
+    };
+    let text = text.to_string_lossy();
+    text.split_once('x')
+        .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?)))
+        .unwrap_or(DEFAULT)
+}
+
 /// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks
 /// for a 120 Hz one to allow 120 Hz frame intervals).
 /// shortcut: fixed mode, not the host display's; report the host's rates if
@@ -242,9 +255,10 @@ extern "system" fn modes(
         return MORE_DATA;
     }
     *count = 1;
+    let (width, height) = mode_size();
     let mode = Mode {
-        width: 3840,
-        height: 2160,
+        width,
+        height,
         refresh: [60, 1],
         format: 0,
         scanlines: 1, // progressive
diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs
index a411bd0..da8d66c 100644
--- a/crates/victory-hle/src/modules/gameinput.rs
+++ b/crates/victory-hle/src/modules/gameinput.rs
@@ -1134,6 +1134,11 @@ mod host {
 
     impl Source for Host {
         fn pad(&mut self, slot: usize) -> Option<PadState> {
+            // The keyboard stand-in pad only exists while no host pad is
+            // connected; this hides a host pad the title mis-handles.
+            if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() {
+                return None;
+            }
             if self.empty_until[slot].is_some_and(|until| Instant::now() < until) {
                 return None;
             }
**@⁠pfhandler** on GitHub · 2026-11-24 20:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7144131888) Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB): - `VICTORY_NO_HOST_PAD=1` — a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad lets `VICTORY_KEYS` drive the title again. - `VICTORY_MODE=1920x1080` — the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here). Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above. ```diff diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs index c7f7c45..2535b68 100644 --- a/crates/victory-gpu/src/dxgi.rs +++ b/crates/victory-gpu/src/dxgi.rs @@ -219,6 +219,19 @@ struct Mode { } const _: () = assert!(size_of::<Mode>() == 32); +/// The console's fixed output mode, overridable for hosts smaller than the +/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead. +fn mode_size() -> (u32, u32) { + const DEFAULT: (u32, u32) = (3840, 2160); + let Some(text) = std::env::var_os("VICTORY_MODE") else { + return DEFAULT; + }; + let text = text.to_string_lossy(); + text.split_once('x') + .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?))) + .unwrap_or(DEFAULT) +} + /// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks /// for a 120 Hz one to allow 120 Hz frame intervals). /// shortcut: fixed mode, not the host display's; report the host's rates if @@ -242,9 +255,10 @@ extern "system" fn modes( return MORE_DATA; } *count = 1; + let (width, height) = mode_size(); let mode = Mode { - width: 3840, - height: 2160, + width, + height, refresh: [60, 1], format: 0, scanlines: 1, // progressive diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs index a411bd0..da8d66c 100644 --- a/crates/victory-hle/src/modules/gameinput.rs +++ b/crates/victory-hle/src/modules/gameinput.rs @@ -1134,6 +1134,11 @@ mod host { impl Source for Host { fn pad(&mut self, slot: usize) -> Option<PadState> { + // The keyboard stand-in pad only exists while no host pad is + // connected; this hides a host pad the title mis-handles. + if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() { + return None; + } if self.empty_until[slot].is_some_and(|until| Instant::now() < until) { return None; } ```
Author
Owner

@⁠cyudev on GitHub · 2026-11-24 21:57 UTC · original

RTX 3060 Ti (8 GB): #578 + #1296 + #1666 on main holds 16+ minutes in the world, under the video memory budget

Machine: RTX 3060 Ti 8 GB (driver 621.24, 32-lane waves), i5-12600KF, 16 GB RAM, Windows 11 26200, game files on SATA SSD. Series X profile.
Tree: main ffe310e + #578 (pr-578 head) + #1296 (a6f3ccb) + #1666 (a672556). All three merge cleanly. Diagnostics build, fresh shader cache, only VICTORY_LOG=info set.

Result: world entered at ~21:42 UTC and still running at 21:58 with no device removal, no ERROR, no no upload buffer, no crashes.log. The 3D scene is black, as on every card, with sound and subtitles.

earlier runs on this card (integration/testers u10, ± #1666) this tree
time in the world 2.5-6 min, then upload-heap E_OUTOFMEMORY and device removal 16+ min, still running
video memory in use / budget ~9,200 / 7,256 MB (over budget from world entry) ~6,000 / 7,085 MB
system memory in use / budget 4,300-5,600 / 7,437 MB, climbing ~2,000 / 7,437 MB, flat
list scratch 1,500 MB (130-170 with #1666) 104 MB, flat
frame rate in the world 0.2-0.3 fps 3.2 fps (308 ms/frame)

Memory figures come from #1666's host memory: line (QueryVideoMemoryInfo), every 5 s.

What each did, by the log:

  • #1296: auto-enabling VICTORY_TEXTURE_MIP_DROP=1 for <= 8 GB GPU (vram_mb=8024). Video memory stayed ~3 GB lower than without it, which brings this card under budget.
  • #578: host wave lanes min=32 max=32, then one log line each for refused wave64 programs: compute (052a2316a03b9ba1), mesh, and compute with PSV0 [64, 64]. No hang; that matches #1508's RTX 4060 Laptop run (579 s with #578).
  • #1666: list scratch flat at ~104 MB.

Still there: 512 shader does not translate lines; ~4,250 draws dropped per frame without a host pipeline and ~4,900 indirect. no host texture comes up for formats 86 and 115, the packed 16-bit targets #89 handles; #89 is not in this tree.

The two runs are not the same tree: u10 carries far more translated shaders and therefore more GPU work. So the time comparison says this set is stable on 8 GB. It does not isolate which PR buys the stability.

Counts and messages only; no game data.

**@⁠cyudev** on GitHub · 2026-11-24 21:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7145620815) ## RTX 3060 Ti (8 GB): #578 + #1296 + #1666 on `main` holds 16+ minutes in the world, under the video memory budget **Machine:** RTX 3060 Ti 8 GB (driver 621.24, 32-lane waves), i5-12600KF, 16 GB RAM, Windows 11 26200, game files on SATA SSD. Series X profile. **Tree:** `main` `ffe310e` + #578 (`pr-578` head) + #1296 (`a6f3ccb`) + #1666 (`a672556`). All three merge cleanly. Diagnostics build, fresh shader cache, only `VICTORY_LOG=info` set. **Result:** world entered at ~21:42 UTC and still running at 21:58 with no device removal, no `ERROR`, no `no upload buffer`, no `crashes.log`. The 3D scene is black, as on every card, with sound and subtitles. | | earlier runs on this card (`integration/testers` u10, ± #1666) | this tree | |---|---|---| | time in the world | 2.5-6 min, then upload-heap `E_OUTOFMEMORY` and device removal | **16+ min, still running** | | video memory in use / budget | ~9,200 / 7,256 MB (over budget from world entry) | **~6,000 / 7,085 MB** | | system memory in use / budget | 4,300-5,600 / 7,437 MB, climbing | **~2,000 / 7,437 MB, flat** | | list scratch | 1,500 MB (130-170 with #1666) | **104 MB, flat** | | frame rate in the world | 0.2-0.3 fps | **3.2 fps** (308 ms/frame) | Memory figures come from #1666's `host memory:` line (`QueryVideoMemoryInfo`), every 5 s. **What each did, by the log:** - **#1296:** `auto-enabling VICTORY_TEXTURE_MIP_DROP=1 for <= 8 GB GPU (vram_mb=8024)`. Video memory stayed ~3 GB lower than without it, which brings this card under budget. - **#578:** `host wave lanes min=32 max=32`, then one log line each for refused wave64 programs: compute (`052a2316a03b9ba1`), mesh, and compute with PSV0 `[64, 64]`. No hang; that matches #1508's RTX 4060 Laptop run (579 s with #578). - **#1666:** list scratch flat at ~104 MB. **Still there:** 512 `shader does not translate` lines; ~4,250 draws dropped per frame without a host pipeline and ~4,900 indirect. `no host texture` comes up for formats 86 and 115, the packed 16-bit targets #89 handles; #89 is not in this tree. The two runs are not the same tree: u10 carries far more translated shaders and therefore more GPU work. So the time comparison says this set is stable on 8 GB. It does not isolate which PR buys the stability. Counts and messages only; no game data.
Author
Owner

@⁠ericomeehan on GitHub · 2026-11-24 23:34 UTC · original

The memory numbers and Logan-Gaillard's hybrid-laptop runs make a good case, and picking the discrete GPU fixes a real trap (the 128 MiB iGPU and 0x887A0004 on the first submission).

Two small suggestions on best_adapter, from reading the diff:

  • IDXGIFactory6::EnumAdapterByGpuPreference(0, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE) is the standard way to get the discrete GPU, and unlike "most dedicated VRAM" it respects the per-app GPU choice the user set in Windows' graphics settings (useful on machines with two discrete cards or an eGPU).
  • supports_fl12 creates a full device on every adapter. D3D12CreateDevice with a null device out-pointer only checks that the adapter supports the feature level, without creating a device.

Separately, the adapter choice is small and useful on its own, and might be easier to take as its own PR than together with the mip drop; and because the automatic mip drop on 8 GB cards changes image quality for every such user, an opt-in switch that only logs "would drop 1" by default might be easier to accept.

Written with an AI assistant (Claude).

**@⁠ericomeehan** on GitHub · 2026-11-24 23:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7147552547) The memory numbers and Logan-Gaillard's hybrid-laptop runs make a good case, and picking the discrete GPU fixes a real trap (the 128 MiB iGPU and 0x887A0004 on the first submission). Two small suggestions on `best_adapter`, from reading the diff: - `IDXGIFactory6::EnumAdapterByGpuPreference(0, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE)` is the standard way to get the discrete GPU, and unlike "most dedicated VRAM" it respects the per-app GPU choice the user set in Windows' graphics settings (useful on machines with two discrete cards or an eGPU). - `supports_fl12` creates a full device on every adapter. `D3D12CreateDevice` with a null device out-pointer only checks that the adapter supports the feature level, without creating a device. Separately, the adapter choice is small and useful on its own, and might be easier to take as its own PR than together with the mip drop; and because the automatic mip drop on 8 GB cards changes image quality for every such user, an opt-in switch that only logs "would drop 1" by default might be easier to accept. Written with an AI assistant (Claude).
Author
Owner

@⁠Witredd on GitHub · 2026-11-24 23:54 UTC · original

A data point from a 6 GB card, in case it helps scope the 6–8 GB claim.

RX 5600 XT 6 GB (RDNA1, no mesh shaders), Ryzen 7 5700X, 16 GB RAM, Windows 11. The card has no mesh shaders, so the world needs #961: this is #961 (31568ce) with this PR merged on top (clean merge, both on ffe310e), release build. Memory is the process's GPU counters, sampled every 2 s.

Run Reached Dedicated peak Shared peak
#961 alone failed on the loading screen 5.8 GB (full) 7.5 GB
+ VICTORY_TEXTURE_MIP_DROP=2 the opening title card, then failed 5.8 GB (full) 6.8 GB
+ =3 and --console series-s a few seconds of the opening's audio, then failed 5.9 GB (full) 7.5 GB

The mip drop gets the run further, but on 6 GB it is not enough: in every run the card fills as soon as the world loads. What fails is not textures but no shader-writable buffer (1–32 MiB, about 1,400 of the 32 MiB ones), no upload buffer (4 MiB) and no shared buffer, ending in a host command list did not close (0x8007000E). On this card the remaining pressure looks like the title-memory copies (#880 / #407) rather than texture memory.

**@⁠Witredd** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7147934026) A data point from a 6 GB card, in case it helps scope the 6–8 GB claim. RX 5600 XT 6 GB (RDNA1, no mesh shaders), Ryzen 7 5700X, 16 GB RAM, Windows 11. The card has no mesh shaders, so the world needs #961: this is #961 (`31568ce`) with this PR merged on top (clean merge, both on `ffe310e`), release build. Memory is the process's GPU counters, sampled every 2 s. | Run | Reached | Dedicated peak | Shared peak | |---|---|---|---| | #961 alone | failed on the loading screen | 5.8 GB (full) | 7.5 GB | | + `VICTORY_TEXTURE_MIP_DROP=2` | the opening title card, then failed | 5.8 GB (full) | 6.8 GB | | + `=3` and `--console series-s` | a few seconds of the opening's audio, then failed | 5.9 GB (full) | 7.5 GB | The mip drop gets the run further, but on 6 GB it is not enough: in every run the card fills as soon as the world loads. What fails is not textures but `no shader-writable buffer` (1–32 MiB, about 1,400 of the 32 MiB ones), `no upload buffer` (4 MiB) and `no shared buffer`, ending in `a host command list did not close (0x8007000E)`. On this card the remaining pressure looks like the title-memory copies (#880 / #407) rather than texture memory.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:36 UTC · original

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1272. Same mip-drop feature as #1272, but on by default for cards up to 8 GB and with a change of adapter selection on the side.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7148697766) Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1272. Same mip-drop feature as #1272, but on by default for cards up to 8 GB and with a change of adapter selection on the side. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Author
Owner

@⁠antikohza on GitHub · 2026-11-25 06:04 UTC · original

@⁠ericomeehan @⁠cyudev @⁠Witredd @⁠Logan-Gaillard — thank you for the review and hardware data. Since #1296 and #1617 were closed before merge and main moved to 940d32f, I opened a clean rebased PR at #2146 (including @ericomeehan's EnumAdapterByGpuPreference(HIGH_PERFORMANCE) and null-device FL12 probe suggestions, plus reconciliation with shared HostTexture).

**@⁠antikohza** on GitHub · 2026-11-25 06:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/1296#issuecomment-7154411614) @⁠ericomeehan @⁠cyudev @⁠Witredd @⁠Logan-Gaillard — thank you for the review and hardware data. Since #1296 and #1617 were closed before merge and `main` moved to `940d32f`, I opened a clean rebased PR at https://git.gtahub.st/github/Marvisak--VIctory/pulls/2146 (including `@ericomeehan`'s `EnumAdapterByGpuPreference(HIGH_PERFORMANCE)` and null-device FL12 probe suggestions, plus reconciliation with shared `HostTexture`).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1296
No description provided.