Triforce v0.9.1

The 16 GB update: idle memory unlocked and handed back to Windows while playing, empty pages under freed locks returned, and a page-file check at launch that warns before a too-small page file can crash the game.
This commit is contained in:
ruckus7382sfgsgdf
2026-12-01 17:47:00 -06:00
parent 822ee913bc
commit dad28e2d4b
11 changed files with 802 additions and 7 deletions

View File

@@ -48,6 +48,7 @@
#include <filesystem>#include <vector>
#include "vk_texture.h"
#include "ram_census.h" // ((Triforce, 12-01) RX_VK_RAM_CENSUS)
#include "vk_menu.h"
#include "vk_draw.h"
#include "vk_programs.h" // ((Triforce) the programs' life log: programs_slow_upload
@@ -3560,6 +3561,14 @@ Texture* create(const Key& key, const nvn_tex* t, VkFormat vf, bool astc, int bw
x.gpu = t->gpu, x.d = t->d, x.L = t->L, x.nvn_format = t->d.format;
x.guest = host->gpu_guest(t->gpu);
x.guest_size = t->L.size;
if (ram_census::on()) { // ((Triforce, 12-01) the RAM census: this texture's storage, ram_census.h)
const ram_census::Kind k = as_target ? ram_census::kTexTarget : ram_census::kTexSampled;
if (t->gpu < (1ull << 40)) ram_census::mark(k, t->gpu, t->L.size);
else
for (uint64_t off = 0; off < t->L.size; off += 1ull << ram_census::kPageShift)
if (const uint64_t g = host->gpu_guest(t->gpu + off))
ram_census::mark(k, g, std::min<uint64_t>(t->L.size - off, 1ull << ram_census::kPageShift));
}
x.astc = astc, x.block_w = bw, x.block_h = bh, x.bpb = bpb;
int from = 0;
vf = widened(vf, &from);