Triforce v0.5.2

The new launcher (Windows and Linux: the game's own look, music and settings, saves and mods pages, smaller updates in parts), benchmark mode (Find my best settings: the game tours four places by itself and writes its results), Quit and Restart in the pause menu under Mods, Squadala! in the Mods menu, battle music above 60 fps, menu text, the controller in the menus with the game in the background, the whole GameBanana list, RX 580 and RX 5000/6000 shader fixes, the pipeline cache kept through an update, async present black flashes, and faster builds.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-19 10:52:50 -06:00
parent a750a21025
commit fb26495475
167 changed files with 21552 additions and 293 deletions

View File

@@ -14,6 +14,19 @@
// is in the driver's compiler at once when the preparation begins). So the workers past half are given only what RAM is
// free when the preparation starts, 1 GB each; with the RAM not known, half. Never fewer than half: what it was.
// RX_VK_PREPARE_THREADS=<n> sets the number outright, 1 to 64.
//
// (Triforce, 11-18) And measured: on AMD's Windows driver for RDNA 1 and 2 (vk_vendor.h amd_older_compiler) the compiles do
// not add up. With an empty driver cache the preparation begins with the compute programs, up to 64 texture variants each,
// every worker in the driver's compiler at once (warm_compute): on an RX 6800 XT (24 processors) each of those compiles
// ran 6-8 times slower with 22 workers than with 6 (the 8x4x4 programs 17-37 s against 2.4-3.8 s, the 128x1x1 ones
// 120-145 s against 22 s), and the translation pass ended at minute 24 against minute 15; 12 workers ended its compute part
// a minute behind 6, 16 between 12 and 22. Neither the shared pipeline cache nor the shader modules were it. But the
// steps after it, the stage libraries and the precompile, mostly graphics pipelines, went slower on 6 (the libraries 2222 s
// against 2074 s on 23; the precompile about 35 min against 27): so the cap is the translation pass's alone (translate,
// vk_draw.cpp prepare_run), kAmdOlderMost at most on that driver; the switch still decides outright. 8 workers on every
// step (11-18) ended the translation at minute 15 as 6 did, the libraries in about 2010 s and the precompile in about
// 27 min as 23 did, title at 4640 s: 8 it is. The libraries kept only about 4 of the 8 busy, the precompile's last
// pipelines all 8: both left on count's
#pragma once
#include <algorithm>
@@ -27,6 +40,9 @@ inline constexpr uint64_t kRamAWorker = 1ull << 30;
/// What it was, and what the preparation behind the game is counted from: half the processors, 1 to 32
inline unsigned half(unsigned cpus) { return std::clamp(cpus / 2, 1u, 32u); }
/// The most workers of the translation pass on AMD's Windows driver for RDNA 1 and 2 (above)
inline constexpr unsigned kAmdOlderMost = 8;
/// cpus: the logical processors; ram_free: the physical memory free now, 0 when it is not known; above_normal: the process
/// was started above normal priority; asked: RX_VK_PREPARE_THREADS, 0 or less when it is not set
inline unsigned count(unsigned cpus, uint64_t ram_free, bool above_normal, int asked) {
@@ -36,4 +52,10 @@ inline unsigned count(unsigned cpus, uint64_t ram_free, bool above_normal, int a
return (unsigned)std::clamp<uint64_t>(ram_free / kRamAWorker, least, most);
}
/// The translation pass's workers (prepare_run): all, count's; on AMD's older driver kAmdOlderMost at most, unless the
/// switch asked for a number
inline unsigned translate(unsigned all, bool amd_older, bool asked) {
return amd_older && !asked ? std::min(all, kAmdOlderMost) : all;
}
} // namespace prepare_threads