mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-29 04:18:49 -04:00
Triforce v0.8.5
A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
host/hos_main.c and their names; HOS_BENCH_SECONDS each, default 15) a teleport, its arrival (the map loaded and no event
|
||||
playing), 1.5 s settling (not counted), then every present's interval is measured while the camera turns steadily
|
||||
(the right stick at 35%, Link standing). The next teleport follows the moment a scene ends.
|
||||
((Triforce) 11-26) HOS_BENCH_PAN=<percent>: the right stick's push instead of 35 (0: the camera holds still, so an in-run
|
||||
A/B, RX_VK_LAB_AB, compares its phases on one view per scene instead of on views the turn changed; a phase that holds a
|
||||
teleport still spans two scenes; measurement only). Unset: 35. When it is set, the push in force is logged once (a value
|
||||
that is not a percent from 0 to 100 too) and written to the results as "pan".
|
||||
3. The results (version 1): average fps, 1% and 0.1% lows (nearest rank, as gpu/vk/perf_stats.h), frames, seconds and the
|
||||
frame times in ~120 points per scene, the GPU and the options that shape the frame rate, written atomically (.new, then
|
||||
renamed); then the game quits as its window's close does (host/hos_relaunch.c: a save being committed finished, the
|
||||
@@ -110,6 +114,8 @@ static struct {
|
||||
the scene's half being measured (0, 1), the way it holds (0 off, 1 on), and the halves measured so far */
|
||||
int helpers, helper_threads, half, way, way_set;
|
||||
Half halves[2];
|
||||
int pan; /* (the right stick's push: PAN, or HOS_BENCH_PAN's) */
|
||||
int pan_set, pan_rejected; /* ((Triforce) 11-26) HOS_BENCH_PAN set (not empty), and its value not a percent from 0 to 100 */
|
||||
} B = {SRWLOCK_INIT};
|
||||
|
||||
int hos_bench_on(void) { return B.on; }
|
||||
@@ -143,6 +149,21 @@ static void parse_scenes(const char *s) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ((Triforce) 11-26) HOS_BENCH_PAN: the stick's push in percent, 0 to 100 (the leading number: 35% is 35), rounded up as PAN
|
||||
is, so 35 gives PAN; unset or empty: PAN (35%); not a number (nan too) or outside 0-100: PAN, with *rejected set. The range
|
||||
test is written so that a NaN, which every comparison fails, is rejected too: converting it to int is undefined */
|
||||
static int bench_pan(const char *e, int *rejected) {
|
||||
*rejected = 0;
|
||||
if (!e || !*e) return PAN;
|
||||
char *end;
|
||||
const double v = strtod(e, &end);
|
||||
if (end == e || !(v >= 0 && v <= 100)) {
|
||||
*rejected = 1;
|
||||
return PAN;
|
||||
}
|
||||
return (int)ceil(v * 32767.0 / 100.0);
|
||||
}
|
||||
|
||||
void hos_bench_init(void) {
|
||||
const char *p = getenv("HOS_BENCHMARK");
|
||||
if (!p || !*p) return;
|
||||
@@ -155,6 +176,9 @@ void hos_bench_init(void) {
|
||||
B.slot = B.newest = -1;
|
||||
const char *helpers = getenv("HOS_BENCH_HELPERS");
|
||||
B.helpers = helpers && atoi(helpers) != 0;
|
||||
const char *pan = getenv("HOS_BENCH_PAN");
|
||||
B.pan = bench_pan(pan, &B.pan_rejected);
|
||||
B.pan_set = pan && *pan;
|
||||
B.helper_threads = -1;
|
||||
B.t_start = hos_now_ns();
|
||||
B.phase = MKWVK_BENCH_BOOT;
|
||||
@@ -421,6 +445,7 @@ static void write_results(int stopped) { /* (under the lock; once) */
|
||||
for (int i = 0; i < B.nskipped; i++) fprintf(f, "%s", i ? "," : ""), json_text(f, B.scenes[B.skipped[i]].name);
|
||||
fprintf(f, "]");
|
||||
if (B.helpers) fprintf(f, ",\"helper_test\":{\"threads\":%d}", B.helper_threads > 0 ? B.helper_threads : 0);
|
||||
if (B.pan_set) fprintf(f, ",\"pan\":%.2f", B.pan * 100.0 / 32767.0); /* ((Triforce) 11-26) HOS_BENCH_PAN's push, percent */
|
||||
fprintf(f, ",\"settings\":");
|
||||
json_settings(f);
|
||||
fprintf(f, "}\n");
|
||||
@@ -615,6 +640,15 @@ void hos_bench_present(int64_t now) {
|
||||
if (!told) {
|
||||
told = 1;
|
||||
hos_log("benchmark: on: %d scenes of %.1f s, results to %s", B.nscenes, B.seconds, B.path);
|
||||
if (B.pan_set) { /* ((Triforce) 11-26) the camera turn in force, once; unset logs nothing, as before */
|
||||
const char *pan = getenv("HOS_BENCH_PAN");
|
||||
if (B.pan_rejected)
|
||||
hos_log("benchmark: HOS_BENCH_PAN=%.40s is not a percent from 0 to 100: the right stick at 35%%, as unset",
|
||||
pan ? pan : "");
|
||||
else
|
||||
hos_log("benchmark: HOS_BENCH_PAN=%.40s: the right stick at %.2f%% (%d of 32767)", pan ? pan : "",
|
||||
B.pan * 100.0 / 32767.0, B.pan);
|
||||
}
|
||||
}
|
||||
switch (B.phase) {
|
||||
case MKWVK_BENCH_BOOT: {
|
||||
@@ -631,7 +665,7 @@ void hos_bench_present(int64_t now) {
|
||||
}
|
||||
break;
|
||||
case MKWVK_BENCH_SETTLE:
|
||||
hos_hid_stick(0, 0, PAN, 0, 250);
|
||||
hos_hid_stick(0, 0, B.pan, 0, 250);
|
||||
if (B.helpers && B.helper_threads < 0) { /* ((Triforce) 11-22) the helper-thread test: what it can use, asked once */
|
||||
B.helper_threads = rx_option(HOS_OPT_HELPERS_FORCE, 0);
|
||||
if (helper_test())
|
||||
@@ -650,7 +684,7 @@ void hos_bench_present(int64_t now) {
|
||||
}
|
||||
break;
|
||||
case MKWVK_BENCH_MEASURE:
|
||||
hos_hid_stick(0, 0, PAN, 0, 250);
|
||||
hos_hid_stick(0, 0, B.pan, 0, 250);
|
||||
if (B.measure_t0 != now && d > 0) {
|
||||
if (B.n == B.cap) {
|
||||
const int cap = B.cap ? B.cap * 2 : 16384;
|
||||
|
||||
Reference in New Issue
Block a user