mirror of
https://git.triforceproject.com/triforce/source
synced 2026-12-01 05:18:50 -04:00
Triforce v0.9.0
Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
@@ -146,6 +146,7 @@ CondNote cond_ring[1 << 15];
|
||||
uint32_t cond_ring_at = 0;
|
||||
void memory_part_submitted(uint64_t seq); // ((Triforce, 11-28) vk_memory.cpp: a part's batch of write-backs by its number
|
||||
uint64_t memory_wb_part_seq(uint64_t guest, uint64_t size, uint64_t value); // (and the part that wrote a range back)
|
||||
bool memory_part_rb_write(); // ((Triforce, 11-29) and whether this part writes back a page the CPU reads back
|
||||
namespace {
|
||||
|
||||
// ---- submissions: a timeline semaphore; value n = the n-th submit done ----
|
||||
@@ -574,11 +575,43 @@ bool vk_timeline_wait_sent(uint64_t v) {
|
||||
}
|
||||
namespace {
|
||||
std::atomic<int64_t> st_lq_waits{0}, st_lq_wait_ns{0}, st_lq_timeouts{0};
|
||||
std::atomic<int64_t> st_lq_part{0}, st_lq_part_ns{0}, st_lq_part_unknown{0};
|
||||
/// ((Triforce, 11-29, the performance session) RX_VK_LATE_PART (the lab knob latepart): the pending fixes' late pages waited for
|
||||
/// at the part that wrote them back last (vk_memory.cpp memory_late_fix_part), on the recordings' timeline, not at their value.
|
||||
/// A recording made in parts signals its value with its last part, and the pages (OoT's exposure meter and its per-frame pool)
|
||||
/// may be written back parts before it: the value's wait was ~0.8 ms a frame at the owner's settings, the queue's lock held.
|
||||
/// Their recording was sent whole (the take puts a fix off only then), so no later part of it writes them again, and a part
|
||||
/// done is everything before it on the queue done. True: that wait made and done; false: the value's, as before (no part
|
||||
/// known, no recordings' timeline, or not done in 1 s)
|
||||
bool late_fix_part_wait() {
|
||||
if (!rec_timeline || !memory_late_part_on()) return false;
|
||||
const uint64_t seq = memory_late_fix_part();
|
||||
if (!seq) {
|
||||
st_lq_part_unknown.fetch_add(1, std::memory_order_relaxed);
|
||||
return false;
|
||||
}
|
||||
const auto t0 = std::chrono::steady_clock::now();
|
||||
bool done = false;
|
||||
for (int i = 0; i < 4 && !done; i++) {
|
||||
VkSemaphoreWaitInfo wi{VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO};
|
||||
wi.semaphoreCount = 1, wi.pSemaphores = &rec_timeline, wi.pValues = &seq;
|
||||
const VkResult res = vkWaitSemaphores(dev.device, &wi, 250000000ull);
|
||||
done = res == VK_SUCCESS;
|
||||
if (res == VK_ERROR_DEVICE_LOST) break;
|
||||
}
|
||||
st_lq_part.fetch_add(1, std::memory_order_relaxed);
|
||||
st_lq_part_ns.fetch_add(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now() - t0).count(),
|
||||
std::memory_order_relaxed);
|
||||
return done;
|
||||
}
|
||||
}
|
||||
void vk_late_part_stats(int64_t* waits, int64_t* wait_ns, int64_t* unknown) {
|
||||
*waits = st_lq_part.exchange(0), *wait_ns = st_lq_part_ns.exchange(0), *unknown = st_lq_part_unknown.exchange(0);
|
||||
}
|
||||
void late_fix_flush_locked() { // (dev.present_mu held)
|
||||
const uint64_t v = memory_late_fix_pending();
|
||||
if (!v) return;
|
||||
if (completed() < v) {
|
||||
if (completed() < v && !late_fix_part_wait()) { // ((Triforce, 11-29) RX_VK_LATE_PART: at the pages' part, above)
|
||||
const auto t0 = std::chrono::steady_clock::now();
|
||||
if (!vk_timeline_wait_sent(v)) {
|
||||
static std::atomic<int> logged{0};
|
||||
@@ -3619,10 +3652,10 @@ int64_t part_draws() {
|
||||
// is set: unset, the knob's own number decides in its phases, and the driver's default nowhere)
|
||||
const char* const not_in_force =
|
||||
!pass_end_parts_on() ? ""
|
||||
: env ? "; not in force outside the knob's phases: a part ends where the game ends its render pass (Threaded rendering, "
|
||||
"RX_VK_PART_PASS_END)"
|
||||
: "; not in force: a part ends where the game ends its render pass (Threaded rendering, RX_VK_PART_PASS_END; the "
|
||||
"knob's phases are counted)";
|
||||
: env ? "; not in force outside the knob's phases: a part ends where the game ends its render pass (Threaded rendering "
|
||||
"or NVIDIA's driver, RX_VK_PART_PASS_END)"
|
||||
: "; not in force: a part ends where the game ends its render pass (Threaded rendering or NVIDIA's driver, "
|
||||
"RX_VK_PART_PASS_END; the knob's phases are counted)";
|
||||
logf("vk: a submission's parts: %lld draws and dispatches each (RX_VK_CHUNK%s%s; 0: whole submissions; this driver's default "
|
||||
"%lld; the lab knob chunk:<n> in its phases when the variable is unset)%s",
|
||||
(long long)barrier_rules::part_draws(env != nullptr, env_value, v), env ? "=" : " unset", env ? env : "", (long long)v,
|
||||
@@ -3643,30 +3676,78 @@ int64_t part_draws() {
|
||||
// +4%, walking +15%, turning +2.5%; walking's 99th percentile 26.8 ms against 36.7, frames over 50 ms 20 against 44), and no
|
||||
// part ended inside a pass but at the ceiling. On with Threaded rendering and RX_VK_CHUNK unset; RX_VK_PART_PASS_END=1 on any
|
||||
// run, =0 off (counted parts of part_draws' size). Not with the lab knob chunk:<n> in its phases (part_draws decides there)
|
||||
// ((Triforce, 11-29, the performance session) and on NVIDIA's driver with Threaded rendering off too (barrier_rules.h
|
||||
// part_pass_end_default: the GPU idled while a burst was recorded up to the 240-draw cut; measured in docs/development.md's
|
||||
// RX_VK_PART_PASS_END row). RX_VK_PART_PASS_END=0 there: counted parts every 240, as before
|
||||
// ((Triforce, 11-29, the performance session) RX_VK_PART_IDLE=<draws> (off unset; the lab's knob partidle:<draws>): a part
|
||||
// after the first ends from <draws> too, not RX_VK_PART_MIN, once the GPU has done everything sent (the recordings' timeline
|
||||
// at rec_seq, looked at every 8th draw past <draws>): the first part's rule wherever the GPU waits for the next cut. part_min_now)
|
||||
struct PassEndParts {
|
||||
bool on = false;
|
||||
int64_t min = 120, max = 512, first = 32;
|
||||
int64_t at_pass_end = 0, ceiling = 0;
|
||||
int64_t min = 120, max = 512, first = 32, idle = 0, rb = 0;
|
||||
int64_t at_pass_end = 0, ceiling = 0, idle_seen = 0, rb_seen = 0;
|
||||
};
|
||||
PassEndParts& pass_end_parts() {
|
||||
static PassEndParts p = [] {
|
||||
PassEndParts v;
|
||||
const char* e = getenv("RX_VK_PART_PASS_END");
|
||||
v.on = e && *e ? atoi(e) != 0 : threaded_on() && !getenv("RX_VK_CHUNK");
|
||||
const bool by_default = threaded_on() || barrier_rules::part_pass_end_default((uint32_t)dev.driver_id);
|
||||
v.on = e && *e ? atoi(e) != 0 : by_default && !getenv("RX_VK_CHUNK");
|
||||
const auto num = [](const char* name, int64_t def) { const char* x = getenv(name); return x && *x ? atoll(x) : def; };
|
||||
v.min = std::max<int64_t>(1, num("RX_VK_PART_MIN", 120));
|
||||
v.max = std::max<int64_t>(v.min, num("RX_VK_PART_MAX", 512));
|
||||
v.first = std::clamp<int64_t>(num("RX_VK_PART_FIRST", 32), 0, v.min);
|
||||
v.idle = std::clamp<int64_t>(num("RX_VK_PART_IDLE", 0), 0, v.min);
|
||||
// ((Triforce, 11-29, the owner's decision) 32 unset where a readback of a range the CPU only reads waits for the part
|
||||
// that copied it (RX_VK_RB_REC_END=3, the default with these parts: rb_rec_end_mode; asked of the switch here, as the
|
||||
// mode's own reader asks these parts), so that its wait is shorter; =0, or another mode set, from RX_VK_PART_MIN
|
||||
const bool range = ::mkwvk::wb_rec_wait::rec_end_mode(getenv("RX_VK_RB_REC_END"), ::mkwvk::wb_rec_wait::kRecEndRange) ==
|
||||
::mkwvk::wb_rec_wait::kRecEndRange;
|
||||
v.rb = std::clamp<int64_t>(num("RX_VK_PART_RB", range ? 32 : 0), 0, v.min);
|
||||
if (v.on && v.rb)
|
||||
logf("vk: a submission's parts end from %lld draws and dispatches where the part writes back a page the CPU reads back "
|
||||
"(RX_VK_PART_RB%s; =0: from RX_VK_PART_MIN)", (long long)v.rb,
|
||||
getenv("RX_VK_PART_RB") && *getenv("RX_VK_PART_RB") ? "" : ", the default with RX_VK_RB_REC_END=3");
|
||||
if (v.on && v.idle)
|
||||
logf("vk: a submission's parts end from %lld draws and dispatches where the GPU has done everything sent "
|
||||
"(RX_VK_PART_IDLE; unset: from RX_VK_PART_MIN)", (long long)v.idle);
|
||||
if (v.on)
|
||||
logf("vk: a submission's parts end where the game has ended its render pass, from %lld draws and dispatches (the first "
|
||||
"part from %lld), at %lld at the latest (Threaded rendering; RX_VK_PART_PASS_END=0: counted parts of RX_VK_CHUNK or "
|
||||
"part from %lld), at %lld at the latest (%s; RX_VK_PART_PASS_END=0: counted parts of RX_VK_CHUNK or "
|
||||
"the driver's default, RX_VK_CHUNK=120 the size before)",
|
||||
(long long)v.min, (long long)v.first, (long long)v.max);
|
||||
(long long)v.min, (long long)v.first, (long long)v.max,
|
||||
e && *e ? "RX_VK_PART_PASS_END=1" : threaded_on() ? "Threaded rendering" : "NVIDIA's driver's default since 11-29");
|
||||
return v;
|
||||
}();
|
||||
return p;
|
||||
}
|
||||
bool pass_end_parts_on() { return pass_end_parts().on; }
|
||||
// ((Triforce, 11-29) RX_VK_PART_IDLE: the draws a part after the first needs before it may end at a pass end: RX_VK_PART_MIN, or
|
||||
// the idle size once the GPU has done everything sent (seen once, kept for the part: the GPU does not get busier until the
|
||||
// replay submits, which ends the part). The replay's thread, as maybe_split. Its branches here, not in maybe_split: the
|
||||
// renderer's play profile matches maybe_split by a hash of its control flow, and a call in place of pe.min keeps it
|
||||
bool part_idle_now = false;
|
||||
int64_t part_min_now(PassEndParts& pe) {
|
||||
const int64_t n = part_work + 1; // (the count maybe_split compares: ++part_work)
|
||||
// ((11-29) RX_VK_PART_RB, the knob partrb: a part that writes back a page the CPU reads back ends from that size, so that
|
||||
// the readback's wait (RX_VK_RB_REC_END=3: for the part that copied its range) is shorter. Seen once a part, as below)
|
||||
const int64_t rb = lab_ab::value_of("partrb", pe.rb);
|
||||
if (rb > 0 && n >= rb && n < pe.min && memory_part_rb_write()) {
|
||||
pe.rb_seen += n == rb;
|
||||
return rb;
|
||||
}
|
||||
const int64_t idle = lab_ab::value_of("partidle", pe.idle);
|
||||
if (idle <= 0 || n < idle) {
|
||||
part_idle_now = false;
|
||||
return pe.min;
|
||||
}
|
||||
if (part_idle_now) return idle;
|
||||
if (n >= pe.min || (n & 7) != 0 || !rec_timeline) return pe.min;
|
||||
uint64_t done = 0;
|
||||
part_idle_now = vkGetSemaphoreCounterValue(dev.device, rec_timeline, &done) == VK_SUCCESS && done >= rec_seq;
|
||||
pe.idle_seen += part_idle_now;
|
||||
return part_idle_now ? idle : pe.min;
|
||||
}
|
||||
|
||||
// ((Triforce, RX_VK_DRY_SHORT) a short command buffer replay_handle records on the replay thread in place of its dry pass and
|
||||
// one segment: one segment's worth, and a segment is not split)
|
||||
@@ -3678,14 +3759,15 @@ void maybe_split(VkCommandBuffer& cmd) {
|
||||
PassEndParts& pe = pass_end_parts();
|
||||
if (pe.on && !part_end_now && lab_ab::value_of("chunk", -1) < 0) { // ((Triforce) Threaded rendering's parts: above)
|
||||
if (part_end_wanted) return; // (waiting for the next plain draw: RX_VK_SPLIT_BEFORE_DRAW)
|
||||
const int64_t need = rec_parts == 0 && pe.first ? pe.first : pe.min;
|
||||
const int64_t need = rec_parts == 0 && pe.first ? pe.first : part_min_now(pe);
|
||||
if (!rec_cur || ++part_work < need || rec_parts + 1 >= kMaxParts || dump_on()) return;
|
||||
const bool ceiling = part_work >= pe.max;
|
||||
if (!ceiling && draw_pass_open()) return; // (the next place the game ends its pass)
|
||||
(ceiling ? pe.ceiling : pe.at_pass_end)++;
|
||||
if ((pe.ceiling + pe.at_pass_end) % 20000 == 0)
|
||||
logf("vk: a submission's parts ended: %lld where the game had ended its render pass, %lld at %lld draws",
|
||||
(long long)pe.at_pass_end, (long long)pe.ceiling, (long long)pe.max);
|
||||
logf("vk: a submission's parts ended: %lld where the game had ended its render pass, %lld at %lld draws; the GPU "
|
||||
"seen idle in %lld parts (RX_VK_PART_IDLE, partidle), %lld parts writing back a read-back page (RX_VK_PART_RB, partrb)",
|
||||
(long long)pe.at_pass_end, (long long)pe.ceiling, (long long)pe.max, (long long)pe.idle_seen, (long long)pe.rb_seen);
|
||||
if (split_before_draw_on()) {
|
||||
part_end_wanted = true;
|
||||
return;
|
||||
@@ -6215,28 +6297,39 @@ bool wait_recorded(uint64_t f, uint64_t timeout_ns, int* ok) {
|
||||
}
|
||||
/// ((Triforce, 11-27) RX_VK_RB_REC_END: a readback's wait for its write-back ends at the LAST part of the recording that writes it
|
||||
/// back, not the first (wb_rec_wait.h readback_wait: the exposure meter read as 0 between a recording's parts, the brightness
|
||||
/// flashes). On unless =0, read once
|
||||
/// flashes). On unless =0, read once. ((Triforce, 11-29, the owner's decision) Unset, 3 where a submission's parts end at the
|
||||
/// game's render passes (pass_end_parts: NVIDIA's driver's default, or Threaded rendering): their first part is ~32 draws, and
|
||||
/// mode 2's wait for it read a later part's result a frame late, the picture's brightness pulsing with the camera moving
|
||||
/// (docs/development.md's RX_VK_RB_REC_END row); else 2
|
||||
int rb_rec_end_mode() {
|
||||
static const int v = [] {
|
||||
namespace wr = ::mkwvk::wb_rec_wait;
|
||||
const int m = wr::rec_end_mode(getenv("RX_VK_RB_REC_END"));
|
||||
logf("vk: a readback waits for %s (RX_VK_RB_REC_END=%d; =0: the first part, as before; =1: the last part, every readback, "
|
||||
"as 0.8.5; =2, the default: the last part where the CPU writes the range after reading it)",
|
||||
const char* e = getenv("RX_VK_RB_REC_END");
|
||||
const bool parts = pass_end_parts_on();
|
||||
const int m = wr::rec_end_mode(e, parts ? wr::kRecEndRange : wr::kRecEndCpuWritten);
|
||||
logf("vk: a readback waits for %s (RX_VK_RB_REC_END=%d%s; =0: the first part, as before; =1: the last part, every readback, "
|
||||
"as 0.8.5; =2, the default with counted parts: the last part where the CPU writes the range after reading it; =3, the "
|
||||
"default where the parts end at the game's render passes: 2, and a range the CPU only reads at the part that copied it "
|
||||
"back)",
|
||||
m == wr::kRecEndAll ? "the last part of the recording that writes it back"
|
||||
: m == wr::kRecEndCpuWritten ? "the last part of the recording that writes it back where the CPU writes the range, else the first part"
|
||||
: m == wr::kRecEndRange ? "the last part of the recording that writes it back where the CPU writes the range, else the part "
|
||||
"that copied the range back"
|
||||
: "the first part of the recording that writes it back, as before",
|
||||
m);
|
||||
m, e && *e ? "" : parts ? ", the default where the parts end at the game's render passes" : ", the default");
|
||||
return m;
|
||||
}();
|
||||
return v;
|
||||
}
|
||||
bool rb_rec_end_on() { return rb_rec_end_mode() != ::mkwvk::wb_rec_wait::kRecEndOff; }
|
||||
std::atomic<int64_t> st_rb_cpu_ranges{0}; // ((Triforce, 11-28) readbacks the last-part rule took, the CPU writing their range)
|
||||
/// ((Triforce, 11-28) whether this readback takes the last-part rule (wb_rec_wait.h rec_end_applies)
|
||||
bool rb_rec_end_for(uint64_t guest, uint64_t size) {
|
||||
/// ((Triforce, 11-28) whether this readback takes the last-part rule (wb_rec_wait.h rec_end_applies); ((11-29)) else *range:
|
||||
/// whether it waits for its range's part (range_applies, RX_VK_RB_REC_END=3), not the first part
|
||||
bool rb_rec_end_for(uint64_t guest, uint64_t size, bool* range) {
|
||||
namespace wr = ::mkwvk::wb_rec_wait;
|
||||
const int m = rb_rec_end_mode();
|
||||
const bool cpu = m == wr::kRecEndCpuWritten && memory_rb_cpu_written(guest, size);
|
||||
const bool cpu = (m == wr::kRecEndCpuWritten || m == wr::kRecEndRange) && memory_rb_cpu_written(guest, size);
|
||||
*range = wr::range_applies(m, cpu);
|
||||
if (cpu) {
|
||||
st_rb_cpu_ranges.fetch_add(1, std::memory_order_relaxed);
|
||||
static std::mutex lm;
|
||||
@@ -6249,9 +6342,13 @@ bool rb_rec_end_for(uint64_t guest, uint64_t size) {
|
||||
return wr::rec_end_applies(m, cpu);
|
||||
}
|
||||
std::atomic<int64_t> st_rb_went_on{0}, st_rb_went_on_ns{0}; // ((Triforce, 11-27) readbacks whose writer's recording went on past a part)
|
||||
// ((Triforce, 11-29) RX_VK_RB_REC_END=3: the read-only readbacks that waited for their range's part, and those whose part came
|
||||
// after the recording's first part (what the first part's wait read a part early: a frame late))
|
||||
std::atomic<int64_t> st_rb_range{0}, st_rb_range_later{0}, st_rb_range_ns{0};
|
||||
/// ((Triforce, 11-27) A readback's wait for write-back value v on the recordings' timeline, by the rule (rb_rec_end_on): true when
|
||||
/// the writer's recording is known (the result in *ok, as wait_recorded), false when it is not (the caller's fallback)
|
||||
bool readback_rec_wait(uint64_t v, uint64_t guest, uint64_t size, int* ok) {
|
||||
/// the writer's recording is known (the result in *ok, as wait_recorded), false when it is not (the caller's fallback).
|
||||
/// ((11-29)) range: a range the CPU only reads, at the part that copied it back (wb_rec_wait.h readback_range_wait, mode 3)
|
||||
bool readback_rec_wait(uint64_t v, uint64_t guest, uint64_t size, int* ok, bool range) {
|
||||
if (!rec_timeline || per_queue_fences_off()) return false;
|
||||
struct Calls {
|
||||
uint64_t v, guest, size;
|
||||
@@ -6299,7 +6396,15 @@ bool readback_rec_wait(uint64_t v, uint64_t guest, uint64_t size, int* ok) {
|
||||
static const bool rb_log = getenv("RX_VK_LOG_RB_RANGE") != nullptr;
|
||||
const ::mkwvk::wb_rec_wait::Parts::Entry e0 = rb_log ? calls.look() : ::mkwvk::wb_rec_wait::Parts::Entry{};
|
||||
const uint64_t rs0 = rb_log ? calls.range_seq() : 0;
|
||||
const ::mkwvk::wb_rec_wait::ReadbackWait r = ::mkwvk::wb_rec_wait::readback_wait(rb_rec_end_on(), calls);
|
||||
const ::mkwvk::wb_rec_wait::ReadbackWait r =
|
||||
range ? ::mkwvk::wb_rec_wait::readback_range_wait(calls) : ::mkwvk::wb_rec_wait::readback_wait(rb_rec_end_on(), calls);
|
||||
if (range && r.known) {
|
||||
const uint64_t first = calls.first_part(), rs = calls.range_seq();
|
||||
st_rb_range.fetch_add(1, std::memory_order_relaxed);
|
||||
if (rs > first) st_rb_range_later.fetch_add(1, std::memory_order_relaxed);
|
||||
st_rb_range_ns.fetch_add(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now() - t0).count(),
|
||||
std::memory_order_relaxed);
|
||||
}
|
||||
if (rb_log && r.went_on) {
|
||||
static std::atomic<int> told{0};
|
||||
if (told.fetch_add(1) < 60) {
|
||||
@@ -6326,7 +6431,9 @@ bool readback_rec_wait(uint64_t v, uint64_t guest, uint64_t size, int* ok) {
|
||||
// note) left both at plain -O2, invalidate's ~460,000 calls a benchmark run among them. A call in place of a call keeps it.
|
||||
/// A readback's wait on the recordings' timeline: by the rule (readback_rec_wait), or the first part as before (wait_recorded)
|
||||
bool readback_recorded_wait(uint64_t v, uint64_t guest, uint64_t size, int* ok) {
|
||||
return rb_rec_end_for(guest, size) ? readback_rec_wait(v, guest, size, ok) : wait_recorded(v, UINT64_MAX, ok);
|
||||
bool range = false;
|
||||
if (rb_rec_end_for(guest, size, &range)) return readback_rec_wait(v, guest, size, ok, false);
|
||||
return range ? readback_rec_wait(v, guest, size, ok, true) : wait_recorded(v, UINT64_MAX, ok);
|
||||
}
|
||||
/// RX_VK_LOG_READBACK_ZERO's line, with the writer's recording now: its first part (the old wait's), its newest part and
|
||||
/// whether that ended it, and the recordings' timeline (a read between the parts waited for the first alone)
|
||||
@@ -6356,6 +6463,12 @@ void readback_went_on_line() {
|
||||
(long long)on, st_rb_went_on_ns.exchange(0) / (double)on / 1e6, (long long)cpu);
|
||||
else if (cpu)
|
||||
logf("vk: readbacks of GPU results: %lld took the last-part rule, the CPU writing their range; none waited past a part", (long long)cpu);
|
||||
// ((Triforce, 11-29) RX_VK_RB_REC_END=3's read-only ranges)
|
||||
if (const int64_t n = st_rb_range.exchange(0))
|
||||
logf("vk: readbacks of GPU results: %lld read-only ranges waited for the part that copied them back, %.3f ms each; %lld of "
|
||||
"those parts came after the recording's first part (the first part's wait read them a frame late; RX_VK_RB_REC_END=2: "
|
||||
"the first part)",
|
||||
(long long)n, st_rb_range_ns.exchange(0) / (double)n / 1e6, (long long)st_rb_range_later.exchange(0));
|
||||
}
|
||||
// ((Triforce, 11-22, the performance audit's SYNC-122, after Source B's) A readback whose write-back is not recorded yet
|
||||
// (wait_recorded said so: its writer is still being recorded, or stopped at an event wait). It waited on the submissions'
|
||||
@@ -9249,7 +9362,7 @@ bool present_thread_on() {
|
||||
static const bool on = [] {
|
||||
// ((Triforce, 11-16) Off by default: the lab's Market runs showed no gain (on 91.9 / 92.1 fps, off 89.4 / 93.6), and
|
||||
// the frame trace left only ~0.09 ms of present work on the game's thread. RX_VK_PRESENT_THREAD=1 on)
|
||||
// ((Triforce) unset: Threaded rendering's present thread (threaded_rendering.h; Off by default, so off as before)
|
||||
// ((Triforce) unset: Threaded rendering's present thread (threaded_rendering.h; Auto by default, Off as before)
|
||||
const char* e = getenv("RX_VK_PRESENT_THREAD");
|
||||
const bool v = e && *e ? atoi(e) == 1 : threaded_on();
|
||||
logf("vk: the game's presents go out %s (RX_VK_PRESENT_THREAD%s)", v ? "from a present thread of their own: the presenting "
|
||||
@@ -10146,8 +10259,8 @@ bool async_on() {
|
||||
// (hookshot: off by default. OoT rewrites double-buffered data right after a submit with no fence, which lands
|
||||
// inside a replay running behind (TotK Recomp's reason to replay on the submitting thread): whole-screen white or
|
||||
// black frames, 28 per 1000 gameplay frames, against 1.3 synchronous, at the same frame rate. RX_VK_ASYNC=1: on)
|
||||
// ((Triforce) unset: Threaded rendering's render thread (threaded_rendering.h, vk_main.cpp threaded_choice: Off by default, so
|
||||
// off as before). The host asks the same answer (HOS_OPT_RENDER_THREAD: host/rx_backend.c rx_async_replay))
|
||||
// ((Triforce) unset: Threaded rendering's render thread (threaded_rendering.h, vk_main.cpp threaded_choice: Auto by default,
|
||||
// on from 4 physical cores; Off as before). The host asks the same answer (HOS_OPT_RENDER_THREAD: host/rx_backend.c rx_async_replay))
|
||||
static const bool on = getenv("RX_VK_ASYNC") ? atoi(getenv("RX_VK_ASYNC")) != 0 : threaded_render_thread();
|
||||
return on;
|
||||
}
|
||||
@@ -10981,6 +11094,8 @@ void fill_replay_table(MkwVkRenderer& t) {
|
||||
if (id == HOS_OPT_AUDIO_OUTPUT) return opts.audio_output; // ((Triforce) the Audio output row now: its Mono, host/nn_audio.c audio_mono)
|
||||
if (id == HOS_OPT_MUTE_BACKGROUND) return opts.mute_background != 0; // ((Triforce) the Mute in background row, host/nn_audio.c)
|
||||
if (id == HOS_OPT_MIC_GAIN) return std::clamp(opts.mic_gain, 25, 400); // ((Triforce) the Microphone gain row, host/nn_audio_in.c)
|
||||
if (id == HOS_OPT_AMIIBO_UNLIMITED) return opts.amiibo_unlimited != 0; // ((Triforce) the Unlimited amiibo uses row, host/oot_amiibo_uses.c)
|
||||
if (id == HOS_OPT_COMPARE_PLAY) return menu_compare_play(); // ((Triforce, 11-30) the ReShade comparison's way to play: host/nn_hid.c
|
||||
if (id == HOS_OPT_STEADY_ROW) return menu_steady_row(); // ((Triforce, 11-26) the Frame pacing row's Steady, now: host/nn_vi.c)
|
||||
// ((Triforce, 11-26) 2 and 3, the Render resolution as applied (vk_menu.h applied_resolution): host/nn_vi.c reads them
|
||||
// each frame, and the game remakes its 3D's targets when the scale changes. The 3D's full size by the applied choice
|
||||
|
||||
Reference in New Issue
Block a user