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:
@@ -29,7 +29,7 @@ std::atomic<int> pending{0};
|
||||
bool started = false;
|
||||
|
||||
// (a job that throws: the game ended at once ("approach Malon, crash": an exception escaped a worker, KERNELBASE's RaiseException
|
||||
// with no handler, 2026-11-08). It is logged and let go; what it was making stays not ready and is asked for again)
|
||||
// with no handler, 2026-11-08). Resource jobs publish failure before the exception is logged, so their waiters finish.)
|
||||
void run_guarded(std::function<void()>& fn) {
|
||||
try {
|
||||
fn();
|
||||
@@ -42,6 +42,20 @@ void run_guarded(std::function<void()>& fn) {
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap before queueing: shared workers, the serial worker and jobs_wait's stolen jobs all run the same recovery.
|
||||
// The resource owns its failure representation (failed program, null pipeline, completed compute state).
|
||||
std::function<void()> with_failure(std::function<void()> fn, std::function<void()> on_failure) {
|
||||
if (!on_failure) return fn;
|
||||
return [fn = std::move(fn), on_failure = std::move(on_failure)] {
|
||||
try {
|
||||
fn();
|
||||
} catch (...) {
|
||||
on_failure();
|
||||
throw; // run_guarded still logs the original exception
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void worker() {
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
|
||||
SetThreadDescription(GetCurrentThread(), L"mkw_vk worker");
|
||||
@@ -72,7 +86,8 @@ void start() {
|
||||
|
||||
} // namespace
|
||||
|
||||
void jobs_push(std::function<void()> fn, bool urgent, const std::atomic<bool>* flag) {
|
||||
void jobs_push(std::function<void()> fn, bool urgent, const std::atomic<bool>* flag, std::function<void()> on_failure) {
|
||||
fn = with_failure(std::move(fn), std::move(on_failure));
|
||||
std::lock_guard lk(mu);
|
||||
if (!started) start();
|
||||
pending++;
|
||||
@@ -82,7 +97,8 @@ void jobs_push(std::function<void()> fn, bool urgent, const std::atomic<bool>* f
|
||||
}
|
||||
// (issue 496) Intel A750: four of the game's big compute pipelines built at once by Intel's compiler (up to 58 s each) froze
|
||||
// the whole PC. One thread builds them one at a time there, below normal priority, beside the shared workers
|
||||
void jobs_push_serial(std::function<void()> fn) {
|
||||
void jobs_push_serial(std::function<void()> fn, std::function<void()> on_failure) {
|
||||
fn = with_failure(std::move(fn), std::move(on_failure));
|
||||
static std::mutex smu;
|
||||
static std::condition_variable scv;
|
||||
static std::deque<std::function<void()>> sq;
|
||||
|
||||
Reference in New Issue
Block a user