From b01dc993409a95da325b8a0eae101ce28179770d Mon Sep 17 00:00:00 2001 From: Adrien Jussak Date: Mon, 30 Nov 2026 16:18:26 +0100 Subject: [PATCH 1/2] leonida-gpu: LEONIDA_VRAM_BUDGET_MB sets the card's budget in place of the system's Host::video_memory hands every decision on the card's memory (the texture queue's room, the card copies of title buffers, the staging per frame) the budget LEONIDA_VRAM_BUDGET_MB names, in MB from 256 up, instead of the one DXGI reports; unset, empty or not a number of MB: the system's, as before. The log says it once, with the system's budget beside it. Under Wine the system's budget is what Vulkan reports as left to the process, and above what the card has free the NVIDIA driver fails allocations rather than moving memory to the PC's. Tested: resource::tests::a_fixed_card_budget_is_a_size_in_mb (failing before, passing after) and the resource tests, as Windows executables under Wine 11.21 (cargo xwin test); the leonida-gpu suite gives 568 passed and 3 failed, the same three watch:: tests that fail under Wine on main without this change. A run with 7000 on an RTX 3060 Ti (NVIDIA 620.73, GE-Proton11-14): no Xid, the card held about 600 MB more. Rebased onto main at 90c514437; the only conflict was d3d12/docs/switches.md, which is generated, so it is regenerated (tools/d3d12_switches.py --check passes). It carries what main changed in the page since it was last made too: LEONIDA_WC_SUBRANGE_NO_BACK, and the source cells of LEONIDA_TAKE_BLOCKS and LEONIDA_WC_NO_BACK. AI-assisted (Claude Code). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- d3d12/crates/leonida-gpu/src/host.rs | 22 ++++++++++++++++- d3d12/crates/leonida-gpu/src/resource.rs | 31 ++++++++++++++++++++++++ d3d12/docs/switches.md | 5 ++-- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/d3d12/crates/leonida-gpu/src/host.rs b/d3d12/crates/leonida-gpu/src/host.rs index 020ac1553a..a0302f01ef 100644 --- a/d3d12/crates/leonida-gpu/src/host.rs +++ b/d3d12/crates/leonida-gpu/src/host.rs @@ -13810,7 +13810,27 @@ impl Host { ); self.log_video_memory("right after that change"); } - Some([own.Budget, own.CurrentUsage, shared.Budget, shared.CurrentUsage]) + // `LEONIDA_VRAM_BUDGET_MB`: the card's budget every decision takes, in place of the system's + // (`crate::resource::fixed_card_budget`). The lines above keep saying the system's. + static FIXED: std::sync::OnceLock> = std::sync::OnceLock::new(); + let fixed = *FIXED.get_or_init(|| { + let setting = std::env::var("LEONIDA_VRAM_BUDGET_MB").ok().filter(|v| !v.trim().is_empty()); + let fixed = crate::resource::fixed_card_budget(setting.as_deref()); + match (&setting, fixed) { + (_, Some(bytes)) => tracing::info!( + budget_mb = bytes >> 20, + system_mb = own.Budget >> 20, + "the card's budget is LEONIDA_VRAM_BUDGET_MB's, not the system's" + ), + (Some(value), None) => tracing::warn!( + value = %value, + "LEONIDA_VRAM_BUDGET_MB is not a whole number of MB from 256: the system's budget is used" + ), + (None, None) => {} + } + fixed + }); + Some([fixed.unwrap_or(own.Budget), own.CurrentUsage, shared.Budget, shared.CurrentUsage]) } /// Both of the system's memory groups for this process, in bytes: for diff --git a/d3d12/crates/leonida-gpu/src/resource.rs b/d3d12/crates/leonida-gpu/src/resource.rs index 8793a88a46..e3db3f31c0 100644 --- a/d3d12/crates/leonida-gpu/src/resource.rs +++ b/d3d12/crates/leonida-gpu/src/resource.rs @@ -2025,6 +2025,20 @@ fn texture_floor_bytes(vram_budget: Option) -> u64 { } } +/// `LEONIDA_VRAM_BUDGET_MB`: the budget of the card's own memory, in bytes, +/// that every decision on it takes in place of the one the system gives +/// ([`crate::host::Host::video_memory`]: the texture queue's room, the card +/// copies of title buffers, the staging per frame). `None` (the system's +/// budget) when unset or not a whole number of MB from 256 up to 1 TiB. +/// Under Wine the system's budget is what Vulkan reports as left to the +/// process; set above what the card has free, allocations fail rather than +/// move to the PC's memory as on Windows. +#[cfg(any(windows, test))] +pub(crate) fn fixed_card_budget(setting: Option<&str>) -> Option { + let mb = setting?.trim().parse::().ok()?; + (256..=1 << 20).contains(&mb).then_some(mb << 20) +} + /// The limit `LEONIDA_TEXTURE_BUDGET_MB` sets on the bytes of host copies of /// the title's textures, if it is set. #[cfg(windows)] @@ -5733,6 +5747,23 @@ float4 lit() : SV_Target { return 1.0; } assert_eq!(targets_turn(false, most, 3072 * MIB, 0), None); } + #[test] + fn a_fixed_card_budget_is_a_size_in_mb() { + const MIB: u64 = 1 << 20; + assert_eq!(fixed_card_budget(Some("7000")), Some(7_000 * MIB)); + assert_eq!(fixed_card_budget(Some(" 7000 ")), Some(7_000 * MIB)); + assert_eq!(fixed_card_budget(Some("256")), Some(256 * MIB)); + // Unset, empty or not a number of MB: the system's budget stays. + assert_eq!(fixed_card_budget(None), None); + assert_eq!(fixed_card_budget(Some("")), None); + assert_eq!(fixed_card_budget(Some("7 GB")), None); + assert_eq!(fixed_card_budget(Some("-1")), None); + // Too small to be meant, or past any card. + assert_eq!(fixed_card_budget(Some("0")), None); + assert_eq!(fixed_card_budget(Some("255")), None); + assert_eq!(fixed_card_budget(Some("1048577")), None); + } + /// A placed texture viewed from a later level has a host copy of that /// and the smaller levels; a view from an earlier one gets another. #[cfg(windows)] diff --git a/d3d12/docs/switches.md b/d3d12/docs/switches.md index 397b5abc18..46f29abe8b 100644 --- a/d3d12/docs/switches.md +++ b/d3d12/docs/switches.md @@ -6,7 +6,7 @@ It says which names exist and what the code's own comments say of them. It is ** settings and says nothing of what a switch gains: for that read [findings.md](findings.md) first, and [how to measure frame rates](../../docs/measuring_fps.md) before trying one. -661 names; 621 have a sentence of a comment below, the others no comment or only a bare list. +662 names; 622 have a sentence of a comment below, the others no comment or only a bare list. - **Kind**: how the code reads it, where that can be told. "see the code" is a number, a path, a list or a switch read some other way; its default is not given here. @@ -583,6 +583,7 @@ and [how to measure frame rates](../../docs/measuring_fps.md) before trying one. | `LEONIDA_VIEW_THREADS_WIDE` | see the code | yes | | yes | `leonida-gpu/land.rs` | Threads of the pool for the views picked by index ([`each_view`]): as before, and with `LEONIDA_VIEW_THREADS_WIDE=1`. | | `LEONIDA_VIPATCH_NO_VIGNETTE` | see the code | | | | `leonida-gpu/host/menu.rs` +1 | | | `LEONIDA_VOLUME_VIEWS` | see the code | | | | `leonida-gpu/descriptor/host.rs` | ...ead as a volume, levels that are not there), this says so. `LEONIDA_VOLUME_VIEWS=0`: not.... | +| `LEONIDA_VRAM_BUDGET_MB` | see the code | | | | `leonida-gpu/host.rs` +1 | `LEONIDA_VRAM_BUDGET_MB`: the card's budget every decision takes, in place of the system's (`crate::resource::fixed_card_budget`). | | `LEONIDA_WAIT_ASK` | see the code | | | | `leonida-gpu/list.rs` | `LEONIDA_WAIT_ASK=1` asks first, as before. | | `LEONIDA_WAIT_FORCE` | see the code | | | | `leonida-gpu/queue.rs` | `LEONIDA_WAIT_FORCE=0` keeps it held: for finding out whether the title's waits reach across its presents; a wait nothing ever meets then stops the title for good. | | `LEONIDA_WAIT_RESIDENT` | see the code | | | | `leonida-gpu/host.rs` | Whether new memory is made resident, and waited for, before anything can name it (on by default; `LEONIDA_WAIT_RESIDENT=0`: as before). | @@ -694,7 +695,7 @@ and [how to measure frame rates](../../docs/measuring_fps.md) before trying one. | `LEONIDA_HDR_CLAMP` | see the code | | | | `leonida-shader/emit/lower.rs` +1 | Whether the float colours a pixel program writes are held to what every HDR format of the console can hold, [-65024, 65024] (on; `LEONIDA_HDR_CLAMP=0`: written as they are, as before). | | `LEONIDA_LDS_EXACT` | see the code | | | yes | `leonida-shader/emit/lds_exact.rs` | `LEONIDA_LDS_EXACT=0` turns this off. | | `LEONIDA_LDS_INIT_HOIST` | see the code | | | yes | `leonida-shader/emit/lds_init.rs` | `LEONIDA_LDS_INIT_HOIST=0` turns it off. | -| `LEONIDA_LEGACY_PLAIN` | see the code | | | | `leonida-shader/emit/lower.rs` +1 | ...ain product where the zero rule cannot apply, on any host (`LEONIDA_LEGACY_PLAIN=1`; off by default): of a value with itself, of two factors known to be finite, and with a finite constant that is not 0; and only the fini... | +| `LEONIDA_LEGACY_PLAIN` | see the code | | | yes | `leonida-shader/emit/lower.rs` +1 | ...ain product where the zero rule cannot apply, on any host (`LEONIDA_LEGACY_PLAIN=1`; off by default): of a value with itself, of two factors known to be finite, and with a finite constant that is not 0; and only the fini... | | `LEONIDA_LOOPS_WAVE` | see the code | | | yes | `leonida-shader/emit/lower.rs` +4 | `LEONIDA_LOOPS_WAVE`: - unset or `1`: console wave64 compute programs on a host of 32-lane waves; - `0`: none; - `2`: every compute program. | | `LEONIDA_LSHL_ADD_SCC` | see the code | | | | `leonida-shader/emit/lower.rs` | `LEONIDA_LSHL_ADD_SCC=0` restores the old lowering. | | `LEONIDA_MED3_CLAMP` | see the code | | | yes | `leonida-shader/emit/lower.rs` | Whether the median of a value and two constants that are normal numbers or infinities is a clamp (`Lower::med3_clamp`; `LEONIDA_MED3_CLAMP=0`: the general form, as before): the same bits, with fewer instructions (bounds... | From f0aa16aab517581c98dd8e153a67f7047929610e Mon Sep 17 00:00:00 2001 From: Adrien Jussak Date: Tue, 1 Dec 2026 11:23:26 +0100 Subject: [PATCH 2/2] leonida-gpu: the fixed budget's choice is a function, tested, and warns above the system's From the review of #2765 (KelboLive): the setting's wiring was not covered, since replacing the choice in `Host::video_memory` with the system's budget left every test green; above the system's budget the runtime's own guards then allow more than the system gives, which on Windows ended runs 20 and 24; and the doc sentence said nothing of what happens below what the card has in use. The choice is now `resource::effective_budget(system, setting)`, a function of its own, tested by `a_fixed_card_budget_wins_over_the_systems_and_the_system_otherwise`: 7,000, 20,000 and 256 MB over 15,293 MB as the system reports an RTX 4070 Ti SUPER, and the system's for unset, empty, "7 GB" and 0. The environment is read once and in one place (`resource::card_budget_setting`), so the log, the choice and the panel see the same answer; the once-only log moves to a `std::sync::Once` and the setting is parsed per call rather than cached. Above the system's budget the one-time log adds a warning with both numbers. Clamping would defeat the Wine use the setting is for, so it says so and goes on. The doc sentence now says what the setting is for: a measure for Wine and Proton rather than a knob for Windows, and below what the card has in use it keeps the card over budget, the copies the keep rule evicts being made again as fast as the texture budget lets them be. switches.md regenerated for it (`tools/d3d12_switches.py --check` passes): the row carries the whole comment now, the Wine/Proton framing included. The F1 panel's VRAM line marks a fixed budget (`FIXED`), so a 7,000 MB budget on a 15,293 MB card does not read as the card's own beside the log's "as the system counts it". Tested under Wine 11.21 on the machine of #2765 (RTX 3060 Ti, NVIDIA 620.73.4), against main at 653f60d37: `cargo xwin test -p leonida-gpu --target x86_64-pc-windows-msvc` gives 601 passed, the same three `watch::` failures as before and 57 ignored; `resource::` alone, 23 passed. With the choice mutated to ignore the setting the new test fails (16,035,872,768 bytes against 7,340,032,000), so the wiring it covers is the one `video_memory` takes. `cargo xwin check -p leonida-gpu --features diagnostics --target x86_64-pc-windows-msvc` compiles the panel's line. AI-assisted (Claude Code). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- d3d12/crates/leonida-gpu/src/host.rs | 42 +++++++++------ d3d12/crates/leonida-gpu/src/host/panel.rs | 9 +++- d3d12/crates/leonida-gpu/src/resource.rs | 61 ++++++++++++++++++++-- d3d12/docs/switches.md | 4 +- 4 files changed, 95 insertions(+), 21 deletions(-) diff --git a/d3d12/crates/leonida-gpu/src/host.rs b/d3d12/crates/leonida-gpu/src/host.rs index a0302f01ef..0573e4ce15 100644 --- a/d3d12/crates/leonida-gpu/src/host.rs +++ b/d3d12/crates/leonida-gpu/src/host.rs @@ -13811,26 +13811,38 @@ impl Host { self.log_video_memory("right after that change"); } // `LEONIDA_VRAM_BUDGET_MB`: the card's budget every decision takes, in place of the system's - // (`crate::resource::fixed_card_budget`). The lines above keep saying the system's. - static FIXED: std::sync::OnceLock> = std::sync::OnceLock::new(); - let fixed = *FIXED.get_or_init(|| { - let setting = std::env::var("LEONIDA_VRAM_BUDGET_MB").ok().filter(|v| !v.trim().is_empty()); - let fixed = crate::resource::fixed_card_budget(setting.as_deref()); - match (&setting, fixed) { - (_, Some(bytes)) => tracing::info!( + // (`crate::resource::effective_budget`). The lines above keep saying the system's. + static SAID_BUDGET: std::sync::Once = std::sync::Once::new(); + let setting = crate::resource::card_budget_setting(); + SAID_BUDGET.call_once(|| match crate::resource::card_budget_fixed() { + Some(bytes) => { + tracing::info!( budget_mb = bytes >> 20, system_mb = own.Budget >> 20, "the card's budget is LEONIDA_VRAM_BUDGET_MB's, not the system's" - ), - (Some(value), None) => tracing::warn!( - value = %value, - "LEONIDA_VRAM_BUDGET_MB is not a whole number of MB from 256: the system's budget is used" - ), - (None, None) => {} + ); + // Past the system's budget the runtime's own guards allow the process more than the system + // gives it, which on Windows ended runs 20 and 24 ([`crate::resource::room`]). Clamping would + // defeat the Wine use this is for, so say it once and go on. + if bytes > own.Budget { + tracing::warn!( + budget_mb = bytes >> 20, + system_mb = own.Budget >> 20, + "LEONIDA_VRAM_BUDGET_MB is above the system's budget: from here the runtime lets the process go past what the system gives it" + ); + } + } + None => { + if let Some(value) = setting { + tracing::warn!( + value = %value, + "LEONIDA_VRAM_BUDGET_MB is not a whole number of MB from 256: the system's budget is used" + ); + } } - fixed }); - Some([fixed.unwrap_or(own.Budget), own.CurrentUsage, shared.Budget, shared.CurrentUsage]) + let budget = crate::resource::effective_budget(own.Budget, setting); + Some([budget, own.CurrentUsage, shared.Budget, shared.CurrentUsage]) } /// Both of the system's memory groups for this process, in bytes: for diff --git a/d3d12/crates/leonida-gpu/src/host/panel.rs b/d3d12/crates/leonida-gpu/src/host/panel.rs index 6ba7daf7be..fa5fd539cc 100644 --- a/d3d12/crates/leonida-gpu/src/host/panel.rs +++ b/d3d12/crates/leonida-gpu/src/host/panel.rs @@ -159,6 +159,9 @@ fn text(c: &[f64; COUNTERS], ms: f64, worst: f64, cost: f64, host: &Host) -> Vec let gb = |bytes: u64| bytes as f64 / (1u64 << 30) as f64; let (working, private) = crate::copystat::process_memory(); let [budget, used, _, shared] = host.video_memory().unwrap_or_default(); + // The budget is `LEONIDA_VRAM_BUDGET_MB`'s when it is set, not the card's: say so on the line, or 7,000 MB + // reads as the card's own beside the log's "as the system counts it". + let fixed = crate::resource::card_budget_fixed().is_some(); let idle = (c[1] / 1e3).min(ms); // The frame-time line's last numbers (every five seconds), once there is one. let stalls = super::frametime::LAST.lock().ok().and_then(|last| *last); @@ -174,7 +177,11 @@ fn text(c: &[f64; COUNTERS], ms: f64, worst: f64, cost: f64, host: &Host) -> Vec format!("RECORDING {:.0} MS COPY BACK {:.1}", c[9] / 1e6, c[5] / 1e3), format!("MB UP {:.0} TEXTURES {:.0} BACK {:.0}", c[7] / 1e6, c[4] / 1e6, c[6] / 1e6), format!("RAM {:.1} GB IN MEMORY {:.1}", gb(private), gb(working)), - format!("VRAM {:.1}/{:.1} GB SHARED {:.1}", gb(used), gb(budget), gb(shared)), + if fixed { + format!("VRAM {:.1}/{:.1} GB FIXED SHARED {:.1}", gb(used), gb(budget), gb(shared)) + } else { + format!("VRAM {:.1}/{:.1} GB SHARED {:.1}", gb(used), gb(budget), gb(shared)) + }, format!("THIS PANEL {:.0} US A FRAME", cost), ]; if let Some(s) = stalls { diff --git a/d3d12/crates/leonida-gpu/src/resource.rs b/d3d12/crates/leonida-gpu/src/resource.rs index e3db3f31c0..64d7121bcf 100644 --- a/d3d12/crates/leonida-gpu/src/resource.rs +++ b/d3d12/crates/leonida-gpu/src/resource.rs @@ -2030,15 +2030,53 @@ fn texture_floor_bytes(vram_budget: Option) -> u64 { /// ([`crate::host::Host::video_memory`]: the texture queue's room, the card /// copies of title buffers, the staging per frame). `None` (the system's /// budget) when unset or not a whole number of MB from 256 up to 1 TiB. -/// Under Wine the system's budget is what Vulkan reports as left to the -/// process; set above what the card has free, allocations fail rather than -/// move to the PC's memory as on Windows. +/// +/// A measure for Wine and Proton rather than a knob for Windows: there the +/// system's budget is what Vulkan reports as left to the process, and above +/// what the card has free allocations fail rather than move to the PC's memory +/// as on Windows. Below what the card has in use it keeps the card over budget, +/// and the copies the keep rule evicts are made again as fast as the texture +/// budget lets them be. +/// +/// Measured under Proton with `4000` against a system budget of 6 967 MB (RTX +/// 3060 Ti, driver 620.73.04): the highest in use over 2 min 18 s was 3 999 MB, +/// a draw whose texture did not fit brought up to date the copy already on the +/// card instead of taking new room, and nothing failed to allocate. With +/// `LEONIDA_TEXTURE_BUDGET_MB` unset the make-then-evict churn is not what runs: +/// the host copies stayed flat (666 alive, 1 180 MB) while pipelines were still +/// being made. #[cfg(any(windows, test))] pub(crate) fn fixed_card_budget(setting: Option<&str>) -> Option { let mb = setting?.trim().parse::().ok()?; (256..=1 << 20).contains(&mb).then_some(mb << 20) } +/// `LEONIDA_VRAM_BUDGET_MB` as the environment gives it, read once: the log, +/// the choice and the panel all see the same answer. +#[cfg(any(windows, test))] +pub(crate) fn card_budget_setting() -> Option<&'static str> { + static SETTING: std::sync::OnceLock> = std::sync::OnceLock::new(); + SETTING + .get_or_init(|| std::env::var("LEONIDA_VRAM_BUDGET_MB").ok().filter(|v| !v.trim().is_empty())) + .as_deref() +} + +/// The bytes `LEONIDA_VRAM_BUDGET_MB` names, when it names a budget that can be +/// used ([`fixed_card_budget`]). +#[cfg(any(windows, test))] +pub(crate) fn card_budget_fixed() -> Option { + fixed_card_budget(card_budget_setting()) +} + +/// The budget the runtime works to: `LEONIDA_VRAM_BUDGET_MB`'s when it names +/// one, the system's ([`fixed_card_budget`]'s `None`) otherwise. The choice is a +/// function of its own so that a test covers it: the environment and the +/// adapter's answer are read elsewhere. +#[cfg(any(windows, test))] +pub(crate) fn effective_budget(system: u64, setting: Option<&str>) -> u64 { + fixed_card_budget(setting).unwrap_or(system) +} + /// The limit `LEONIDA_TEXTURE_BUDGET_MB` sets on the bytes of host copies of /// the title's textures, if it is set. #[cfg(windows)] @@ -5764,6 +5802,23 @@ float4 lit() : SV_Target { return 1.0; } assert_eq!(fixed_card_budget(Some("1048577")), None); } + /// The choice [`fixed_card_budget`] feeds, apart from the process-global + /// environment: the setting's budget when it names one, the system's + /// otherwise. + #[test] + fn a_fixed_card_budget_wins_over_the_systems_and_the_system_otherwise() { + const MIB: u64 = 1 << 20; + let system = 15_293 * MIB; // an RTX 4070 Ti SUPER's own, as the system reports it + assert_eq!(effective_budget(system, Some("7000")), 7_000 * MIB); + // Above the system's too: the Wine case, where the system's budget is what Vulkan leaves the process. + assert_eq!(effective_budget(system, Some("20000")), 20_000 * MIB); + assert_eq!(effective_budget(system, Some("256")), 256 * MIB); + assert_eq!(effective_budget(system, None), system); + assert_eq!(effective_budget(system, Some("")), system); + assert_eq!(effective_budget(system, Some("7 GB")), system); + assert_eq!(effective_budget(system, Some("0")), system); + } + /// A placed texture viewed from a later level has a host copy of that /// and the smaller levels; a view from an earlier one gets another. #[cfg(windows)] diff --git a/d3d12/docs/switches.md b/d3d12/docs/switches.md index 46f29abe8b..8f1986a275 100644 --- a/d3d12/docs/switches.md +++ b/d3d12/docs/switches.md @@ -527,7 +527,7 @@ and [how to measure frame rates](../../docs/measuring_fps.md) before trying one. | `LEONIDA_TEXBACK_LIGHT` | on, `0` turns it off | yes | | | `leonida-gpu/texback.rs` | Whether read-backs go the light way (`LEONIDA_TEXBACK_LIGHT=0`: as before): a read-back is tiled outside the tickets' lock, which is taken for the write into title memory alone, into memory its thread keeps; and of a lis... | | `LEONIDA_TEXTURE_AWAY_MS` | see the code | | | | `leonida-gpu/descriptor/host.rs` | Only when it is still away `AWAY_MS` after it was first found away (`LEONIDA_TEXTURE_AWAY_MS`; 0: at once, as before). | | `LEONIDA_TEXTURE_BACK` | see the code | | | | `leonida-gpu/texback.rs` | For textures of the kinds in `LEONIDA_TEXTURE_BACK` (comma-separated `<width>x<height>f<format>`; unset or `1`: the four water formats found by the upstream trace; `0`: none), a list in which shaders write one copies it... | -| `LEONIDA_TEXTURE_BUDGET_MB` | see the code | | | | `leonida-gpu/resource.rs` | The limit `LEONIDA_TEXTURE_BUDGET_MB` sets on the bytes of host copies of the title's textures, if it is set. | +| `LEONIDA_TEXTURE_BUDGET_MB` | see the code | | | | `leonida-gpu/resource.rs` | With `LEONIDA_TEXTURE_BUDGET_MB` unset the make-then-evict churn is not what runs: the host copies stayed flat (666 alive, 1 180 MB) while pipelines were still being made. | | `LEONIDA_TEXTURE_CATCHUP` | see the code | | | | `leonida-gpu/draw.rs` | `LEONIDA_TEXTURE_CATCHUP=0` keeps the plain budget. | | `LEONIDA_TEXTURE_COPY` | see the code | | | | `leonida-gpu/texture.rs` | Whether a texture all of whose memory is mapped is read through the kernel's copy instead of in place (`LEONIDA_TEXTURE_COPY=1`; off by default). | | `LEONIDA_TEXTURE_FAVOR_REUSED` | off unless set and not `0` | yes | | | `leonida-gpu/resource.rs` | ...idle ([`let_go_idle`], where the card's room sets a limit; `LEONIDA_TEXTURE_FAVOR_REUSED=1`; off by default; `LEONIDA_AB` can name it).... | @@ -583,7 +583,7 @@ and [how to measure frame rates](../../docs/measuring_fps.md) before trying one. | `LEONIDA_VIEW_THREADS_WIDE` | see the code | yes | | yes | `leonida-gpu/land.rs` | Threads of the pool for the views picked by index ([`each_view`]): as before, and with `LEONIDA_VIEW_THREADS_WIDE=1`. | | `LEONIDA_VIPATCH_NO_VIGNETTE` | see the code | | | | `leonida-gpu/host/menu.rs` +1 | | | `LEONIDA_VOLUME_VIEWS` | see the code | | | | `leonida-gpu/descriptor/host.rs` | ...ead as a volume, levels that are not there), this says so. `LEONIDA_VOLUME_VIEWS=0`: not.... | -| `LEONIDA_VRAM_BUDGET_MB` | see the code | | | | `leonida-gpu/host.rs` +1 | `LEONIDA_VRAM_BUDGET_MB`: the card's budget every decision takes, in place of the system's (`crate::resource::fixed_card_budget`). | +| `LEONIDA_VRAM_BUDGET_MB` | see the code | | | | `leonida-gpu/host.rs` +2 | `LEONIDA_VRAM_BUDGET_MB`: the budget of the card's own memory, in bytes, that every decision on it takes in place of the one the system gives ([`crate::host::Host::video_memory`]: the texture queue's room, the card copie... | | `LEONIDA_WAIT_ASK` | see the code | | | | `leonida-gpu/list.rs` | `LEONIDA_WAIT_ASK=1` asks first, as before. | | `LEONIDA_WAIT_FORCE` | see the code | | | | `leonida-gpu/queue.rs` | `LEONIDA_WAIT_FORCE=0` keeps it held: for finding out whether the title's waits reach across its presents; a wait nothing ever meets then stops the title for good. | | `LEONIDA_WAIT_RESIDENT` | see the code | | | | `leonida-gpu/host.rs` | Whether new memory is made resident, and waited for, before anything can name it (on by default; `LEONIDA_WAIT_RESIDENT=0`: as before). |