Merge PR #179: play-proton.sh: on NVIDIA cards of 10 GB or less, plan with at most 55 % of the card

play-proton.sh: on NVIDIA cards of 10 GB or less, plan with at most 55 % of the card
This commit is contained in:
Ghosty
2026-11-30 00:12:14 +01:00
committed by GitHub

View File

@ -153,6 +153,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