mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
In-game mods (GameBanana browser, search and installs, with the Mask Salesman), code-patch and cheat mods, the devs' test18 to test45 work (full performance overlay, frame pacing on, steady frame rate, save export and import, bug capture, new options rows, Setup's Mods page and Add to Steam), occlusion queries and new defaults, Auto resolution that scales, replay helper threads and robust buffers off by default, the options in sections.
51 lines
2.8 KiB
C++
51 lines
2.8 KiB
C++
// (Triforce) Who holds a frame of the game to the Game frame rate cap (vk_pace.cpp): RivaTuner Statistics Server,
|
|
// NVIDIA Reflex or the game's own wait. The host asks where the frame starts (host/nn_vi.c hos_vi_native_acquire:
|
|
// HOS_OPT_PACE_PERIOD, HOS_OPT_PACE_MOVIE, then HOS_OPT_PACE_START); its own wait is the answer unless another limiter
|
|
// is seen to hold the frame.
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
namespace mkwvk::pace {
|
|
|
|
enum Owner { GAME = 0, REFLEX = 1, RTSS = 2 }; // (pace_rule.h's PACE_*)
|
|
|
|
/// HOS_OPT_PACE_PERIOD: the period the host paces the game's frames by, in nanoseconds (the cap in effect: Monitor's
|
|
/// rate, a cap under 60 and the game's own interval counted in), told before each frame_start.
|
|
void set_period_ns(int ns);
|
|
/// HOS_OPT_PACE_MOVIE: 1 while a movie plays (the game's own wait holds a movie), told before each frame_start.
|
|
void set_movie(int playing);
|
|
/// (Triforce) HOS_OPT_PACE_STEADY, option_set: 1 while the period told is the Steady frame rate row's (host/pace_steady.h).
|
|
void set_steady(int on);
|
|
/// HOS_OPT_PACE_STEADY, option (on the game's presenting thread, once a frame): the microseconds steady_held counted since
|
|
/// the last ask.
|
|
int steady_held_us();
|
|
/// The period the present holds the game's pictures to (present_smooth.h present_smooth_paced_at): the steady frame rate's
|
|
/// while the game's own wait paces the frames, else 0.
|
|
int64_t steady_floor_ns();
|
|
/// A picture waited ns for steady_floor_ns (vk_replay.cpp smooth_present): counted where that held the game's presenting
|
|
/// thread, not on the present thread.
|
|
void steady_held(int64_t ns);
|
|
/// HOS_OPT_PACE_START, on the game's presenting thread where its frame starts: 1 when another limiter holds this
|
|
/// frame and the host's own wait steps aside (RivaTuner Statistics Server, which holds the frame's presents:
|
|
/// rtss_limit.cpp; or NVIDIA Reflex with DLSS frame generation, whose sleep is taken inside this call: vk_dlssg.cpp
|
|
/// pace); 0, the host's own wait, in every other case.
|
|
int frame_start();
|
|
/// After a present of the window went out (vk_replay.cpp present_image): RivaTuner's limiter holds nothing while none
|
|
/// does.
|
|
void presented();
|
|
/// The host's clock after the newest present, 0 before the first.
|
|
uint64_t presented_ns();
|
|
/// The process is about to exit in order (HOS_OPT_EXITING): RivaTuner's profile gets back what it held.
|
|
void exiting();
|
|
/// Who held the newest frame: an Owner.
|
|
int owner();
|
|
/// The frame generation's display thread leaves its own pacing of made frames out: RivaTuner holds the frames it
|
|
/// presents (pace_rule.h pace_display_yields; vk_framegen.cpp).
|
|
bool display_yields();
|
|
/// Who holds the frames, and with the game's own wait why, in a line for the performance overlay.
|
|
void limiter_text(char* out, size_t n);
|
|
|
|
} // namespace mkwvk::pace
|