mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-25 18:48:51 -04:00
Triforce v0.8.0
Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
@@ -91,6 +91,10 @@ static int map_floor(uint64_t va) {
|
||||
static volatile LONG maps_changed = 1; /* the mappings changed since hos_gpu_guest_ranges last merged them */
|
||||
volatile LONG maps_generation = 1; /* bumped by every change (hos_gpu_ptr's per-thread cache, the renderer's gpu_read) */
|
||||
static void map_add(uint64_t va, uint64_t size, uint64_t guest) {
|
||||
/* ((Triforce) mark_bitmap.c, a build with RX_MARK_BITMAP=1: the pages' bits set before the mapping counts. Every mapping's
|
||||
guest range, whatever its GPU address: hos_gpu_guest_ranges hands the renderer's collection every one of them) */
|
||||
void hos_gpu_pages_set(uint64_t guest, uint64_t size);
|
||||
hos_gpu_pages_set(guest, size);
|
||||
maps_changed = 1;
|
||||
InterlockedIncrement(&maps_generation);
|
||||
MAP_LOG("nvdrv: map GPU %#llx..%#llx -> %#llx", (unsigned long long)va, (unsigned long long)(va + size),
|
||||
@@ -132,7 +136,8 @@ int hos_gpu_pools(uint64_t (*out)[2], int max) {
|
||||
UNLOCK();
|
||||
return n;
|
||||
}
|
||||
uint32_t hos_gpu_maps_generation(void) { return (uint32_t)maps_generation; }
|
||||
/* ((Triforce) an acquire load: what a change published before its bump is seen by a reader of the new value, on any CPU) */
|
||||
uint32_t hos_gpu_maps_generation(void) { return (uint32_t)__atomic_load_n(&maps_generation, __ATOMIC_ACQUIRE); }
|
||||
|
||||
/* The native NVN layer's memory pools (GPU address = guest address): mapped here only for the renderer's change
|
||||
tracking (hos_gpu_ptr resolves native addresses itself) */
|
||||
@@ -249,7 +254,7 @@ uint8_t *hos_gpu_ptr(uint64_t va, uint64_t *avail) {
|
||||
/* direct-mapped by 64 KB page (a draw touches more mappings than a short list holds: constant buffers in several
|
||||
pools, the header pools, vertex data; a miss is a locked search over ~4000 mappings) */
|
||||
static _Thread_local struct { uint64_t lo, hi, guest; LONG generation; } recent[1024];
|
||||
const LONG generation = maps_generation;
|
||||
const LONG generation = (LONG)hos_gpu_maps_generation();
|
||||
const unsigned k = (unsigned)(va >> 16) & 1023;
|
||||
if (recent[k].generation == generation && va >= recent[k].lo && va < recent[k].hi) { /* (most calls) */
|
||||
*avail = recent[k].hi - va;
|
||||
|
||||
Reference in New Issue
Block a user