From d7a84aebc3e50734e676cd341dea06f6e1acd2f9 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 29 Nov 2026 21:14:28 +0100 Subject: [PATCH] play-proton.sh: on NVIDIA cards of 10 GB or less, plan with at most 55 % of the card The system's budget while the world loads depends on what the desktop holds then, and falls by 1-2 GB later as the driver keeps memory for each pipeline made (#140). After a fresh boot it said 5.1-5.6 GB on an 8 GB RTX 5060 (3.8-4.6 GB after hours of desktop use): the texture queue filled the card before the render targets, buffer copies and pipelines came, the card went over, and the run stayed at 260-280 ms a frame (the card 50-100 ms of it), with 1.3-1.6 GB stranded in the texture blocks; 4 runs of 4. With VICTORY_CARD_BUDGET_MB=4500 on the same freshly booted machine and build: 94 ms a frame (the card 5-12 ms), 0.77 GB in the blocks. Co-Authored-By: Claude Opus 5.5 --- scripts/play-proton.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/play-proton.sh b/scripts/play-proton.sh index 28b4250..0fa8f04 100755 --- a/scripts/play-proton.sh +++ b/scripts/play-proton.sh @@ -142,6 +142,16 @@ if [[ -e /proc/driver/nvidia/version ]]; then if [[ ${card_mb:-0} -gt 0 && $card_mb -le 10240 ]]; then : "${VICTORY_TEXTURE_DROP_MIPS:=1}" export VICTORY_TEXTURE_DROP_MIPS + # The budget the runtime plans with, at most 55 % of the card (VICTORY_CARD_BUDGET_MB). The + # system's budget while the world loads depends on what the desktop holds then, and falls by + # 1-2 GB later as the driver keeps memory for each pipeline made (#140). After a fresh boot + # it said 5.1-5.6 GB on an 8 GB RTX 5060 (3.8-4.6 GB after hours of desktop use): the + # texture queue filled the card before the render targets, buffer copies and pipelines + # came, the card went over, and the run stayed at 260-280 ms a frame (the card 50-100 ms of + # it), with 1.3-1.6 GB stranded in the texture blocks; 4 runs of 4. With 4,500 MB, on the + # same freshly booted machine and build: 94 ms (the card 5-12 ms), 0.77 GB in the blocks. + : "${VICTORY_CARD_BUDGET_MB:=$((card_mb * 55 / 100))}" + export VICTORY_CARD_BUDGET_MB fi fi