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:
@@ -1245,7 +1245,7 @@ struct Out {
|
||||
static Out run_tracked(void (*scenario)(), int mode, bool mutate, bool own_thread = false, bool lock = true) {
|
||||
Out o;
|
||||
const auto body = [&] {
|
||||
rec::Arena& a = rec::t_arena;
|
||||
rec::Arena& a = rec::t_arena();
|
||||
const uint64_t f0 = a.failures, b0 = a.budget_drains, fb0 = a.fallbacks;
|
||||
const long live0 = g_aligned_live.load() - (long)a.nchunks;
|
||||
rec::set_mode(mode);
|
||||
@@ -1348,7 +1348,7 @@ static int bench(int n) {
|
||||
} shapes[] = {{"typical draw (push descriptors x3 writes, push constants 96 B, vertex buffers x16, draw)", draw_typical,
|
||||
draw_typical_direct, 4},
|
||||
{"cold draw (+ pipeline, 9 writes, 9 dynamic states, index buffer)", draw_cold, nullptr, 16}};
|
||||
rec::Arena& a = rec::t_arena;
|
||||
rec::Arena& a = rec::t_arena();
|
||||
for (const Shape& sh : shapes) {
|
||||
// (modes: 0 direct (no wrapper), 1 off (the wrapper's branch), 2 sync, 3 deferred: encode and drain timed apart, 4 thread:
|
||||
// the producer's encode and publish, and its wait at the boundary, timed apart; the recorder's busy time a packet)
|
||||
@@ -1570,13 +1570,13 @@ static void thread_checks(const std::vector<Call>& ref) {
|
||||
}
|
||||
g_delay_ns = 1000; // (the recorder behind the producer: a missed wait shows as a call out of place or on a busy command buffer)
|
||||
const Out lref = run_tracked(lifecycle, rec::OFF, false);
|
||||
const uint64_t fb0 = rec::t_arena.fallbacks;
|
||||
const uint64_t fb0 = rec::t_arena().fallbacks;
|
||||
g_hold_ms = 50; // (and held at each point the producer must wait: hold())
|
||||
const Out lt = run_tracked(lifecycle, rec::THREAD, true);
|
||||
g_hold_ms = 0, g_hold_until_ns = 0;
|
||||
check_run("thread lifecycle (2 command buffers interleaved; reset, begin, end, submit, wait x2; query read; destruction; caller "
|
||||
"memory poisoned; driver 1 us a call)", lref.log, lt);
|
||||
if (rec::t_arena.fallbacks - fb0 != 6) std::printf("FAIL thread lifecycle: %llu fallbacks, 6 expected\n", (unsigned long long)(rec::t_arena.fallbacks - fb0)), failures++;
|
||||
if (rec::t_arena().fallbacks - fb0 != 6) std::printf("FAIL thread lifecycle: %llu fallbacks, 6 expected\n", (unsigned long long)(rec::t_arena().fallbacks - fb0)), failures++;
|
||||
// (each thread run with the recorder held at the points the producer must wait: hold(); the direct references without)
|
||||
const auto held = [](void (*scenario)(), bool lock) {
|
||||
g_hold_ms = 50;
|
||||
@@ -1769,16 +1769,16 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
same("direct, caller memory reused after each call", ref, run(frame, rec::OFF, true));
|
||||
if (env_mode != rec::OFF) same("RX_VK_RECORDER from the environment, caller memory reused", ref, run(frame, env_mode, true));
|
||||
rec::t_arena.packets = 0;
|
||||
rec::t_arena().packets = 0;
|
||||
same("sync (packed, run at once), caller memory reused", ref, run(frame, rec::SYNC, true));
|
||||
if (rec::t_arena.packets != ref.size()) std::printf("FAIL sync: %llu packets for %zu calls\n", (unsigned long long)rec::t_arena.packets, ref.size()), failures++;
|
||||
if (rec::t_arena.ci || rec::t_arena.used) std::printf("FAIL sync: the arena not rewound\n"), failures++;
|
||||
if (rec::t_arena().packets != ref.size()) std::printf("FAIL sync: %llu packets for %zu calls\n", (unsigned long long)rec::t_arena().packets, ref.size()), failures++;
|
||||
if (rec::t_arena().ci || rec::t_arena().used) std::printf("FAIL sync: the arena not rewound\n"), failures++;
|
||||
same("deferred (packed, run at the drain), caller memory poisoned in between", ref, run(frame, rec::DEFER, true));
|
||||
if (rec::t_arena.fallbacks) std::printf("FAIL: %llu calls not packed\n", (unsigned long long)rec::t_arena.fallbacks), failures++;
|
||||
if (rec::t_arena().fallbacks) std::printf("FAIL: %llu calls not packed\n", (unsigned long long)rec::t_arena().fallbacks), failures++;
|
||||
|
||||
const std::vector<Call> fref = run(fallbacks, rec::OFF, false);
|
||||
same("fallback order (pNext chain, inline uniform block, a push template of a size not told), deferred", fref, run(fallbacks, rec::DEFER, false));
|
||||
if (rec::t_arena.fallbacks != 3) std::printf("FAIL: %llu fallbacks, 3 expected\n", (unsigned long long)rec::t_arena.fallbacks), failures++;
|
||||
if (rec::t_arena().fallbacks != 3) std::printf("FAIL: %llu fallbacks, 3 expected\n", (unsigned long long)rec::t_arena().fallbacks), failures++;
|
||||
|
||||
// ---- defer (step 1.5): the lifecycle, the replay lock, the budgets, an allocation failure, a parallel replay
|
||||
const Out lref = run_tracked(lifecycle, rec::OFF, false);
|
||||
@@ -1825,7 +1825,7 @@ int main(int argc, char** argv) {
|
||||
rec::set_mode(rec::DEFER);
|
||||
g_mutate = true, g_log.clear();
|
||||
frame();
|
||||
const bool at_once = g_log.size() == ref.size() && !rec::t_arena.head;
|
||||
const bool at_once = g_log.size() == ref.size() && !rec::t_arena().head;
|
||||
rec::drain();
|
||||
const std::vector<Call> got = g_log;
|
||||
rec::set_mode(rec::OFF);
|
||||
|
||||
Reference in New Issue
Block a user