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:
ruckus7382sfgsgdf
2026-11-25 10:21:32 -06:00
parent 861702476a
commit 4fa4f9188b
881 changed files with 179428 additions and 15581 deletions

View File

@@ -7,6 +7,7 @@
#include <algorithm>
#include <cstring>
#include <memory>
#include <mutex>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -26,6 +27,7 @@ struct Face {
uint64_t vs = 0, fs = 0; // the vertex (or mesh) and fragment modules, by their SPIR-V (0: no fragment stage)
uint32_t vs_locs = 0, fs_locs = 0; // generic inputs read, colour outputs written
predict_types::Locations vs_in; // ((Triforce, 11-22, PIPE-44) the vertex inputs' base types, RX_VK_PREDICT_TYPES=1)
int64_t at = 0; // ((Triforce, 11-24) its record's place in the programs' file: the later one is kept)
};
/// The locations of a module's Input (storage 1) or Output (3) variables
uint32_t spirv_locations(const std::vector<uint32_t>& w, uint32_t storage) {
@@ -162,6 +164,7 @@ std::vector<std::unique_ptr<PipeNote>> predict_pipelines(const std::vector<std::
static const bool typed = predict_types::typed(predict_types::mode(getenv("RX_VK_PREDICT_TYPES")));
PredictCounts tally;
std::unordered_map<std::pair<uint64_t, uint64_t>, Face, PairHash> faces;
std::mutex faces_mu;
program_cache_each([&](const KeptProgram& k) {
Face f;
for (const auto& [stage, spirv] : k.stages) {
@@ -172,7 +175,12 @@ std::vector<std::unique_ptr<PipeNote>> predict_pipelines(const std::vector<std::
} else if (stage == VK_SHADER_STAGE_TASK_BIT_EXT || stage == VK_SHADER_STAGE_MESH_BIT_EXT) f.vs = h, f.vs_locs = 0;
else if (stage == VK_SHADER_STAGE_FRAGMENT_BIT) f.fs = h, f.fs_locs = spirv_locations(spirv, 3);
}
faces[{k.key, k.variant}] = f;
f.at = k.at;
// ((Triforce, 11-24) program_cache_each calls on several threads, in no order: a variant's later record wins, as it did
// in the file's order)
std::lock_guard lk(faces_mu);
auto [it, fresh] = faces.try_emplace({k.key, k.variant}, f);
if (!fresh && it->second.at < f.at) it->second = f;
});
std::unordered_map<uint64_t, Seen> vh, vsig, fh, fsig;
std::unordered_map<Class, const PipeNote*, ClassHash> vdonor, odonor;