mirror of
https://git.triforceproject.com/triforce/source
synced 2026-12-02 05:48:50 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user