mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 22:15:57 +00:00
Merge branch 'dev' into task/plugself
This commit is contained in:
commit
d4794238d4
43 files changed
+722
-159
No files matched your search
+24
-9
@@ -57,7 +57,7 @@ static const char *const known[] = {
|
||||
"MEM_RESERVE_MIB", "MENU_CURSOR", "MENU_CURSOR_LOG", "MENU_TEST_DIR", "MENU_TEST_SET", "MINIMAL_LAYOUT", "MIRROR_GAP", "MODS_DIR", "MODS_DISABLED", "MODS_NO_CODE", "MODS_ORDER", "MODS_REBUILD", "MODS_WITHOUT_CODE", "MOTION", "MOUSE_AIM_SCALE", "MOUSE_MODE", "MOUSE_DIRECT_PATCH", "MOUSE_SENS", "MOVIE_ASPECT", "MOVIE_HOST", "MOVIE_PACE",
|
||||
"MVOBJ_ALL", "MVOBJ_BANKS", "MVOBJ_EQUAL", "MVOBJ_EXACT", "MVOBJ_EXEC", "MVOBJ_NOC4", "MVOBJ_ONLY", "MVOBJ_TIMES", "MVPREV_CHECK", "MVPREV_GROW", "MVPREV_SKIP", "MVPREV_TRUST", "MV_CHECK",
|
||||
"MV_SURVEY", "NULL_ATTACH",
|
||||
"ONE_PER_CORE", "OPERATION_MODE", "OPTREF_GUARD", "OUTPUT_RES", "PAD_LAYOUT", "PASS_CRUMBS", "PATCH_OUTPUT", "PATCH_SCENE", "PCORE", "PCSS", "PCSS_K", "PERF_CENSUS", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "PLUGIN_TICK_OFFSET", "PLUGIN_TRACE", "POINTER_IMAGE",
|
||||
"ONE_PER_CORE", "OPERATION_MODE", "OPTREF_GUARD", "OUTPUT_RES", "PAD_BACKGROUND", "PAD_LAYOUT", "PASS_CRUMBS", "PATCH_OUTPUT", "PATCH_SCENE", "PCORE", "PCSS", "PCSS_K", "PERF_CENSUS", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "PLUGIN_TICK_OFFSET", "PLUGIN_TRACE", "POINTER_IMAGE",
|
||||
"PREWARM_XLATE", "PROBE_MOVIE", "PROBE_MOVIE_BENCH", "PROBE_MOVIE_SHOT", "PROFILE", "PROFILE_CHAINS", "PROFILE_DIR", "PROFILE_FRAMES",
|
||||
"PROFILE_MAIN", "PROFILE_RENDER", "PROMPTS", "PUSH_SKIP", "PUSH_STAGE", "QUICKLOAD_KEY", "QUICKSAVE", "QUICKSAVE_KEY", "RDOC", "RDOC_DIR", "RDOC_DLL", "REALTIME", "REC_ASYNC", "REC_END", "REC_SPIN_US", "REEXEC", "REFLEX",
|
||||
"RENDER_SCALE", "REPLAY_ASYNC", "REPLAY_CHUNKS", "REPLAY_CHUNK_DRAWS", "REPLAY_SKEW_US", "REPLAY_STATE_CHECK", "REPLAY_WORKERS",
|
||||
@@ -66,7 +66,7 @@ static const char *const known[] = {
|
||||
"SHADER_MEMO", "SHADOW", "SHADOW_DEFER", "SHADOW_RANGE", "SHADOW_RES", "SHADOW_SCALE", "SHADOW_SNAP", "SHARED_FONTS", "SHARPNESS", "SHOTS", "SHOTS_DIR", "SHUTTER_FIX",
|
||||
"SHOTS_FULL", "SKIP_CS", "SPEED_PROBE", "SPIN", "SPIN_HANDOFF_US", "SPLIT_DRAWS", "SPLIT_US", "STICK_DEADZONE", "STICK_SENS",
|
||||
"SWKBD_ANSWER", "SYNC_AHEAD",
|
||||
"SWKBD_TEST", "TEST_OOM", "TEST_PAD", "TEST_PAD_RUMBLE_MS", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_BLOCK_MIB", "TEX_HEAP_EXTRA_MB", "TEX_MEMO", "TEX_RELEASED_MIB", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "TXD_TRANSPOSE", "UBO_SNAPSHOT", "UB_OVERLAY", "UB_OVERLAY_OUT", "UPSCALER", "VB_USED", "VK_DYN_A2C", "VK_DYN_VERTEX", "VK_NO_FLOAT64", "VK_NO_HOST_IMPORT",
|
||||
"SWKBD_TEST", "TEST_OOM", "TEST_PAD", "TEST_PAD_RUMBLE_MS", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_BLOCK_MIB", "TEX_HEAP_EXTRA_MB", "TEX_MEMO", "TEX_RELEASED_MIB", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "TXD_TRANSPOSE", "UBO_SNAPSHOT", "UB_OVERLAY", "UB_OVERLAY_OUT", "UPSCALER", "VB_USED", "VERT_PLUS", "VK_DYN_A2C", "VK_DYN_VERTEX", "VK_NO_FLOAT64", "VK_NO_HOST_IMPORT",
|
||||
"VK_PRESENT", "VK_RECORDER", "VK_SSBO_ALIGN", "VK_SUBGROUP", "VK_SUBGROUP_PIN", "VK_VALIDATION", "VMA_BLOCK_MIB", "VOLUME", "VOLUME_MASK_BIAS", "VOLUME_MUSIC", "VOLUME_SFX", "VOLUME_VOICE", "VRAM_HEADROOM", "VRAM_LIMIT_MIB", "VS_OUTS",
|
||||
"WALK_KEY", "WALK_SCALE", "WB_EAGER", "WB_EXACT", "WB_FENCE_LIMIT", "WB_MERGE", "WINDOW_SIZE", "XLATE", "XLATE_ID", "XLATE_KEEP", "XLATE_PROCS",
|
||||
"ZSTD_CHECK", "ZSTD_NATIVE",
|
||||
@@ -81,7 +81,7 @@ static const struct { const char *key, *section; } sections[] = {
|
||||
{"FULLSCREEN", "display"}, {"WINDOW_SIZE", "display"}, {"PERF_OVERLAY", "display"}, {"VK_PRESENT", "display"},
|
||||
{"GPU_INDEX", "display"}, {"OUTPUT_RES", "display"}, {"RENDER_SCALE", "display"}, {"UPSCALER", "display"},
|
||||
{"HUD_WIDTH", "display"},
|
||||
{"SHARPNESS", "display"}, {"DYNAMIC_RES", "display"}, {"ASPECT", "display"}, {"MOVIE_ASPECT", "display"}, {"FOV", "display"}, {"ANISO", "display"},
|
||||
{"SHARPNESS", "display"}, {"DYNAMIC_RES", "display"}, {"ASPECT", "display"}, {"MOVIE_ASPECT", "display"}, {"FOV", "display"}, {"VERT_PLUS", "display"}, {"ANISO", "display"},
|
||||
{"LOD_STEADY", "display"}, {"COLOR_PRESET", "display"},
|
||||
{"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"},
|
||||
{"COLOR_GAMMA", "display"}, {"HDR", "display"}, {"HDR_PEAK_NITS", "display"}, {"HDR_GAME_NITS", "display"},
|
||||
@@ -98,7 +98,7 @@ static const struct { const char *key, *section; } sections[] = {
|
||||
{"AUDIO_DEVICE", "audio"},
|
||||
{"MOTION", "input"}, {"GYRO_CALIBRATION", "input"}, {"GYRO_AUTO_BIAS", "input"}, {"RUMBLE_STRENGTH", "input"}, {"RUMBLE_CURVE", "input"}, {"RUMBLE_TRIGGERS", "input"},
|
||||
{"GYRO_BIAS_X", "input"}, {"GYRO_BIAS_Y", "input"}, {"GYRO_BIAS_Z", "input"}, {"GYRO_BIAS_PAD", "input"},
|
||||
{"PAD_LAYOUT", "input"}, {"PROMPTS", "input"}, {"STICK_DEADZONE", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"},
|
||||
{"PAD_BACKGROUND", "input"}, {"PAD_LAYOUT", "input"}, {"PROMPTS", "input"}, {"STICK_DEADZONE", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"},
|
||||
{"STICK_SENS", "input"},
|
||||
{"MENU_CURSOR", "input"}, {"MAP_CLICK", "input"}, {"DIALOGUE_CLICK", "input"}, {"POINTER_IMAGE", "input"}, {"QUICKSAVE", "input"}, {"QUICKSAVE_KEY", "input"}, {"QUICKLOAD_KEY", "input"}, {"MOUSE_MODE", "input"}, {"MOUSE_SENS", "input"}, {"MOUSE_AIM_SCALE", "input"}, {"WALK_KEY", "input"}, {"WALK_SCALE", "input"}, {"FREECAM_PATCH", "input"}, {"FREECAM_PAD", "input"}, {"FREECAM_KEY", "input"}, {"INPUT_RECORD", "input"},
|
||||
{"BIND_A", "input"}, {"BIND_B", "input"}, {"BIND_X", "input"}, {"BIND_Y", "input"}, {"BIND_LCLICK", "input"},
|
||||
@@ -149,6 +149,7 @@ static const CfgMeta metas[] = {
|
||||
{"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"REFLEX", "off", "off|auto|on|boost", RESTART}, {"FXAA", "1", "0|1", LIVE},
|
||||
{"LOD_STEADY", "0", "0|1", RESTART}, // sets steady
|
||||
{"ASPECT", "fit", "fit|stretch", LIVE}, {"MOVIE_ASPECT", "keep", "keep|stretch", LIVE}, {"FOV", "100", "70..140", LIVE},
|
||||
{"VERT_PLUS", "0", "0|1", LIVE}, // resolution.c res_fov_live
|
||||
{"ANISO", "game", "game|2|4|8|16", RESTART}, // vk_texture.c sampler_features
|
||||
// colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses
|
||||
{"COLOR_PRESET", "default", "default|vivid|clarity|custom", LIVE}, {"COLOR_BRIGHTNESS", "0", "-30..30", LIVE},
|
||||
@@ -183,6 +184,7 @@ static const CfgMeta metas[] = {
|
||||
{"GYRO_BIAS_X", "", NULL, RESTART}, {"GYRO_BIAS_Y", "", NULL, RESTART}, {"GYRO_BIAS_Z", "", NULL, RESTART},
|
||||
{"GYRO_BIAS_PAD", "", NULL, RESTART},
|
||||
{"RUMBLE_TRIGGERS", "0", "0|1", LIVE}, {"PAD_LAYOUT", "auto", "auto|nintendo|xbox", LIVE},
|
||||
{"PAD_BACKGROUND", "auto", "auto|0|1", RESTART}, // input.c start: SDL's background joystick events (#971, #1462)
|
||||
{"PROMPTS", "nintendo", "nintendo|xbox|playstation|pc", RESTART},
|
||||
{"STICK_DEADZONE", "8", "0..50", LIVE}, {"STICK_SENS", "1", "0.1..3", RESTART},
|
||||
{"LSTICK_DEADZONE", "", "0..50", LIVE}, {"RSTICK_DEADZONE", "", "0..50", LIVE},
|
||||
@@ -218,7 +220,7 @@ static const CfgMeta metas[] = {
|
||||
{"REPLAY_WORKERS", "0", "0..16", RESTART}, {"REPLAY_CHUNKS", "0", "0..64", RESTART},
|
||||
{"REPLAY_CHUNK_DRAWS", "128", "1..100000", RESTART}, {"REPLAY_STATE_CHECK", "0", "0|1", RESTART},
|
||||
{"REPLAY_SKEW_US", "0", "0..100000", RESTART},
|
||||
{"SYNC_AHEAD", "0", "0|1|check", RESTART}, {"SHADOW_DEFER", "1", "0|1", RESTART},
|
||||
{"SYNC_AHEAD", "1", "0|1|check", RESTART}, {"SHADOW_DEFER", "1", "0|1", RESTART},
|
||||
{"FREE_CORES", "0", "0|1", RESTART}, {"TIMER_1MS", "1", "0|1", RESTART},
|
||||
// shaders and pipelines
|
||||
{"PIPE_WAIT", "default", "default|draw", RESTART}, {"PIPE_SKIP", "fullscreen", "strict|any|fullscreen", RESTART},
|
||||
@@ -407,15 +409,24 @@ static const char *raw_get(const char *name) {
|
||||
// the Switch ones.
|
||||
static const unsigned SHAPED[][2] = {
|
||||
{2560, 1080}, {3440, 1440}, {3840, 1600}, {5120, 2160}, // 21:9
|
||||
{3840, 1080}, {5120, 1440}, // 32:9
|
||||
{3840, 1080}, {5120, 1440}, {7680, 2160}, // 32:9
|
||||
{1280, 800}, {1680, 1050}, {1920, 1200}, {2560, 1600}, // 16:10
|
||||
{1920, 1280}, {2160, 1440}, {2256, 1504}, {2880, 1920}, {3000, 2000}, // 3:2
|
||||
{1440, 1080}, {1600, 1200}, {2048, 1536}, {2732, 2048}, // 4:3 (CRT monitors, iPads)
|
||||
{2340, 1080}, {3120, 1440}, {2400, 1080}, {3200, 1440}, // 19.5:9 and 20:9 (phones, streamed)
|
||||
};
|
||||
|
||||
// The shapes a UI layout can be made for (tools/ultrawide_layout.py works on any aspect ratio between these): from 4:3
|
||||
// to 32:9, 1% either side. A shape between them that SHAPED does not list takes a folder of its own exact size.
|
||||
#define SHAPE_MIN (4.0 / 3.0 * 0.99)
|
||||
#define SHAPE_MAX (32.0 / 9.0 * 1.01)
|
||||
|
||||
// The folder size of w x h's shape: of SHAPED within 1% of its aspect ratio, the closest, the first of equal ones
|
||||
// (5120x2160 takes 2560x1080). The UI layout depends on the aspect ratio alone (tools/ultrawide_layout.py apply), so
|
||||
// the setup writes one romfs-patches-<w>x<h> per shape, named after this size (installer/screens.py shape_size, the
|
||||
// same rule), and romfs.c overlay_init looks for it. 0 for 16:9 and for a shape without a layout.
|
||||
// same rule), and romfs.c overlay_init looks for it. A shape SHAPED does not list but within SHAPE_MIN..SHAPE_MAX (a
|
||||
// phone's 13:6 screen streamed to, say) is its own folder, w x h itself, which the setup and the game's background
|
||||
// generator make as they make the listed ones. 0 for 16:9 and outside that range (portrait screens).
|
||||
int cfg_shape_size(unsigned w, unsigned h, unsigned out[2]) {
|
||||
if (!w || !h) return 0;
|
||||
double r = (double)w / h, err = 0;
|
||||
@@ -425,8 +436,12 @@ int cfg_shape_size(unsigned w, unsigned h, unsigned out[2]) {
|
||||
double e = fabs((double)SHAPED[i][0] / SHAPED[i][1] / r - 1);
|
||||
if (e <= 0.01 && (best < 0 || e < err)) best = i, err = e;
|
||||
}
|
||||
if (best < 0) return 0;
|
||||
out[0] = SHAPED[best][0], out[1] = SHAPED[best][1];
|
||||
if (best >= 0) {
|
||||
out[0] = SHAPED[best][0], out[1] = SHAPED[best][1];
|
||||
return 1;
|
||||
}
|
||||
if (r < SHAPE_MIN || r > SHAPE_MAX) return 0;
|
||||
out[0] = w, out[1] = h;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -23,8 +23,9 @@ unsigned cfg_version(void);
|
||||
int cfg_from_env(const char *name);
|
||||
// 1 when the player set name (the environment or totk.ini), 0 when cfg_get gives a device profile's default or NULL.
|
||||
int cfg_is_set(const char *name);
|
||||
// The folder size of w x h's shape (cfg.c SHAPED: the closest aspect ratio within 1%, the first of equal ones), the
|
||||
// one romfs-patches-<w>x<h> the setup writes for it. 0 for 16:9 and for a shape without a UI layout.
|
||||
// The folder size of w x h's shape (cfg.c SHAPED: the closest aspect ratio within 1%, the first of equal ones; an
|
||||
// unlisted shape from 4:3 to 32:9 keeps w x h), the one romfs-patches-<w>x<h> the setup writes for it. 0 for 16:9 and
|
||||
// for a shape without a UI layout (portrait, narrower than 4:3, wider than 32:9).
|
||||
int cfg_shape_size(unsigned w, unsigned h, unsigned out[2]);
|
||||
// The size output_res defaults to on this display (its shape, cfg.c screen_default) while the player set no
|
||||
// output_res, also when the default stays 1920x1080 because that shape lacks the prompts' folder. The generator the game
|
||||
|
||||
+21
-4
@@ -146,6 +146,8 @@ int probe_cfg(void) {
|
||||
CHECK(m && EQ(m->def, "130") && EQ(m->values, "0..300"), "meta: rumble strength 130 in 0..300");
|
||||
m = cfg_meta("PERF_OVERLAY");
|
||||
CHECK(m && EQ(m->def, "off") && EQ(m->values, "off|fps|full") && m->live, "meta: perf_overlay is live, off by default");
|
||||
m = cfg_meta("VERT_PLUS");
|
||||
CHECK(m && EQ(m->def, "0") && m->live, "meta: vert_plus is live, off by default");
|
||||
CHECK(cfg_meta("BIND_A") == NULL && cfg_meta("FPS_COUNTER") == NULL && cfg_meta("NO_SUCH") == NULL,
|
||||
"meta: keys the menu does not show are NULL");
|
||||
|
||||
@@ -315,6 +317,12 @@ int probe_cfg(void) {
|
||||
CHECK(input_pad_layout_pick("xbox_prompts", 0) == PAD_LAYOUT_NINTENDO &&
|
||||
input_pad_layout_pick("Xbox_Prompts", 1) == PAD_LAYOUT_NINTENDO,
|
||||
"pad layout: 0.1.9's xbox_prompts keeps the Nintendo positions (only the prompts change, romfs.c overlay_init)");
|
||||
// Gamepad events behind other windows (input_map.c, input.c start)
|
||||
CHECK(input_pad_background_pick("auto", 0) && !input_pad_background_pick("auto", 1) &&
|
||||
input_pad_background_pick(NULL, 0) && !input_pad_background_pick(NULL, 1),
|
||||
"pad background: automatic is on, off when Steam started the game (its overlay takes the gamepad, #1462)");
|
||||
CHECK(input_pad_background_pick("1", 1) && !input_pad_background_pick("0", 0),
|
||||
"pad background: 1 and 0 win over the Steam check");
|
||||
// Button prompts (input_map.c)
|
||||
CHECK(input_prompts_pick(NULL, "auto") == PROMPTS_NINTENDO && input_prompts_pick("", "xbox") == PROMPTS_NINTENDO &&
|
||||
input_prompts_pick("Xbox", "nintendo") == PROMPTS_XBOX && input_prompts_pick("nintendo", "xbox") == PROMPTS_NINTENDO,
|
||||
@@ -357,16 +365,25 @@ int probe_cfg(void) {
|
||||
"prompts: the PlayStation folder puts A on the circle exactly when the layout puts A on the east button");
|
||||
}
|
||||
// One folder per screen shape (cfg.c cfg_shape_size, installer/screens.py shape_size): the closest aspect ratio of
|
||||
// SHAPED within 1%, the first of equal ones; 16:9 and unlisted shapes have none.
|
||||
// SHAPED within 1%, the first of equal ones; an unlisted shape from 4:3 to 32:9 its own size; 16:9, portrait and
|
||||
// shapes narrower than 4:3 none.
|
||||
unsigned sz[2] = {0, 0};
|
||||
CHECK(cfg_shape_size(5120, 2160, sz) && sz[0] == 2560 && sz[1] == 1080, "shape: 5120x2160 takes 2560x1080's folder");
|
||||
CHECK(cfg_shape_size(3440, 1440, sz) && sz[0] == 3440 && sz[1] == 1440, "shape: 3440x1440 keeps its own (0.8% off 2560x1080)");
|
||||
CHECK(cfg_shape_size(1920, 800, sz) && sz[0] == 3840 && sz[1] == 1600, "shape: 1920x800 takes 3840x1600's folder");
|
||||
CHECK(cfg_shape_size(2560, 1600, sz) && sz[0] == 1280 && sz[1] == 800 && cfg_shape_size(3000, 2000, sz) &&
|
||||
sz[0] == 1920 && sz[1] == 1280 && cfg_shape_size(5120, 1440, sz) && sz[0] == 3840 && sz[1] == 1080,
|
||||
sz[0] == 1920 && sz[1] == 1280 && cfg_shape_size(5120, 1440, sz) && sz[0] == 3840 && sz[1] == 1080 &&
|
||||
cfg_shape_size(7680, 2160, sz) && sz[0] == 3840 && sz[1] == 1080,
|
||||
"shape: 16:10, 3:2 and 32:9 take their first size");
|
||||
CHECK(!cfg_shape_size(1920, 1080, sz) && !cfg_shape_size(2560, 1440, sz) && !cfg_shape_size(1024, 768, sz),
|
||||
"shape: none for 16:9 and 4:3");
|
||||
CHECK(cfg_shape_size(1024, 768, sz) && sz[0] == 1440 && sz[1] == 1080 && cfg_shape_size(2048, 1536, sz) &&
|
||||
sz[0] == 1440 && sz[1] == 1080 && cfg_shape_size(3120, 1440, sz) && sz[0] == 2340 && sz[1] == 1080,
|
||||
"shape: 4:3 and 19.5:9 take their first size");
|
||||
CHECK(cfg_shape_size(2560, 1200, sz) && sz[0] == 2560 && sz[1] == 1200 && cfg_shape_size(2000, 1080, sz) &&
|
||||
sz[0] == 2000 && sz[1] == 1080,
|
||||
"shape: an unlisted shape between 4:3 and 32:9 keeps its own size");
|
||||
CHECK(!cfg_shape_size(1920, 1080, sz) && !cfg_shape_size(2560, 1440, sz) && !cfg_shape_size(1280, 1024, sz) &&
|
||||
!cfg_shape_size(1080, 1920, sz) && !cfg_shape_size(7680, 1440, sz),
|
||||
"shape: none for 16:9, narrower than 4:3, portrait and wider than 32:9");
|
||||
// romfs.c shaped_name: the exact size's folder (an older setup wrote every size) wins, else the shape's
|
||||
{
|
||||
char dir[1100], f[1200];
|
||||
|
||||
+17
-3
@@ -671,9 +671,23 @@ static void start(void) {
|
||||
// window lacks keyboard focus (SDL_PrivateJoystickShouldIgnoreEvent in SDL_joystick.c; centring and releases
|
||||
// pass). That applies where the window is SDL's (Linux); the Win32 window on Windows is not an SDL window. The
|
||||
// game keeps running out of focus by default (TOTK_ASSUME_FOCUS, ov_system.c oe_set_focus), so the gamepad has to
|
||||
// keep working there. With the setting off the game's main thread waits while unfocused and reads no input, so
|
||||
// the hint can stay on for the whole run.
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
// keep working there (#971). With the setting off the game's main thread waits while unfocused and reads no input,
|
||||
// so the hint can stay on for the whole run. A game Steam started is the exception (input_pad_background_pick):
|
||||
// Steam's overlay and menus take the focus while they are open, and the presses meant for them reached the game
|
||||
// too (#1462). Steam sets SteamGameId for its own games and for non-Steam shortcuts, SteamOverlayGameId with the
|
||||
// overlay. TOTK_PAD_BACKGROUND = 1 or 0 decides it either way. On Windows the game window is not SDL's, so SDL never
|
||||
// drops events for focus there and the Steam check is left out: the hint stays as it was.
|
||||
#ifdef _WIN32
|
||||
int under_steam = 0;
|
||||
#else
|
||||
const char *gid = getenv("SteamGameId"), *ogid = getenv("SteamOverlayGameId");
|
||||
int under_steam = (gid && *gid) || (ogid && *ogid);
|
||||
#endif
|
||||
const char *bg = cfg_value("TOTK_PAD_BACKGROUND");
|
||||
if (input_pad_background_pick(bg, under_steam)) SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
else
|
||||
rt_log("input: the gamepad pauses while the window has no focus (%s)",
|
||||
strcmp(bg, "0") ? "Steam started the game; pad_background = 1 keeps it" : "pad_background = 0");
|
||||
if (!SDL_Init(SDL_INIT_GAMEPAD)) { state = -1; rt_log("input: SDL gamepad init failed (%s), keyboard only", SDL_GetError()); }
|
||||
else state = 1;
|
||||
if (state == 1) test_pad_attach();
|
||||
|
||||
@@ -305,6 +305,12 @@ int input_pad_layout_pick(const char *setting, int east_labelled_a) {
|
||||
return east_labelled_a ? PAD_LAYOUT_NINTENDO : PAD_LAYOUT_XBOX;
|
||||
}
|
||||
|
||||
int input_pad_background_pick(const char *setting, int under_steam) {
|
||||
if (setting && !strcmp(setting, "1")) return 1;
|
||||
if (setting && !strcmp(setting, "0")) return 0;
|
||||
return !under_steam;
|
||||
}
|
||||
|
||||
int input_prompts_pick(const char *prompts, const char *pad_layout) {
|
||||
if (prompts && *prompts)
|
||||
return !strcasecmp(prompts, "xbox") ? PROMPTS_XBOX
|
||||
|
||||
@@ -91,6 +91,12 @@ void input_map_configure(void);
|
||||
// pad's east button is labelled A (a Switch Pro Controller, a GuliKit) and Xbox otherwise.
|
||||
int input_pad_layout_pick(const char *setting, int east_labelled_a);
|
||||
|
||||
// Whether SDL passes gamepad presses and stick movements to the game while its window has no focus (TOTK_PAD_BACKGROUND,
|
||||
// input.c start): "1" on, "0" off. Anything else ("auto", NULL) is on unless Steam started the game: then the focus
|
||||
// goes to Steam's overlay and menus (the Quick Access menu in SteamOS's Game Mode), whose gamepad it is while they are
|
||||
// open (#1462); elsewhere the gamepad keeps playing while another window has the focus (#971).
|
||||
int input_pad_background_pick(const char *setting, int under_steam);
|
||||
|
||||
// Button prompts (TOTK_PROMPTS): the controller whose buttons the game's prompts show. Nintendo: the game's own. Xbox:
|
||||
// LB RB LT RT, Menu, View and a d-pad cross for the other buttons, and the face buttons named by the label of the
|
||||
// button the pad layout presses (runtime/romfs.c overlay_init, tools/make_romfs_patches.py --prompts). PlayStation: the
|
||||
|
||||
+14
-4
@@ -22,7 +22,8 @@
|
||||
// TOTK_MENU_CURSOR (live, default 1): 0 leaves the menus to the keys and the pad.
|
||||
//
|
||||
// With TOTK_MAP_CLICK=1 (live, default 0: one key per controller button) input.c makes the left mouse button A on the
|
||||
// map (menu_cursor_map), so a click acts at the map's cursor. The map is found only while TOTK_MENU_CURSOR is on.
|
||||
// map (menu_cursor_map), so a click acts at the map's cursor. The map is found while TOTK_MENU_CURSOR is on, and with
|
||||
// it off while the gameplay tweaks' map zoom is on (TOTK_GAMEPLAY_MAP_ZOOM), which acts only on the map found here.
|
||||
//
|
||||
// The same read of the open screens tells input.c when a dialogue box is on screen (menu_cursor_dialogue), where the
|
||||
// left mouse button presses B (it advances the text and skips its scroll) and the right one A, instead of their
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "cfg.h"
|
||||
#include "gameplay_tweaks.h"
|
||||
#include "gfx.h"
|
||||
#include "host.h"
|
||||
#include "input.h"
|
||||
@@ -377,8 +379,11 @@ void menu_cursor_poll(uint64_t *buttons) {
|
||||
main_lo = MOD_MAIN_BASE, main_hi = MOD_MAIN_BASE + MAIN_SIZE;
|
||||
if (RT_V143) rt_log("menu_cursor: on for 1.4.3 (TOTK_MENU_CURSOR=0 turns it off)");
|
||||
}
|
||||
int cursor = enabled(), talk = dialogue_enabled();
|
||||
if (!cursor && !talk) {
|
||||
// The map zoom of the gameplay tweaks (gameplay_tweaks.c map_zoom_allowed) acts only on the map found here, so with
|
||||
// the menu cursor off and that zoom on, the map is still looked for, as the dialogue is for dialogue_click; the
|
||||
// pointer and the menus stay off (#1376).
|
||||
int cursor = enabled(), talk = dialogue_enabled(), zoom = !cursor && RT_V143 && gameplay_tweaks_map_zoom();
|
||||
if (!cursor && !talk && !zoom) {
|
||||
set_pointer(0);
|
||||
__atomic_store_n(&g_map, 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_dialogue, 0, __ATOMIC_RELAXED);
|
||||
@@ -414,7 +419,12 @@ void menu_cursor_poll(uint64_t *buttons) {
|
||||
__atomic_store_n(&g_dialogue, dialogue, __ATOMIC_RELAXED);
|
||||
if (!cursor) {
|
||||
set_pointer(0);
|
||||
__atomic_store_n(&g_map, 0, __ATOMIC_RELAXED);
|
||||
if (zoom && map && !map_logged) {
|
||||
map_logged = 1;
|
||||
rt_log("menu_cursor: the map is open: the mouse moves its cursor and the scroll wheel zooms "
|
||||
"(gameplay_map_zoom; menu_cursor = 0 leaves the menus alone)");
|
||||
}
|
||||
__atomic_store_n(&g_map, zoom ? map : 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_menu, 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_strip, 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_camera, 0, __ATOMIC_RELAXED);
|
||||
|
||||
@@ -50,6 +50,11 @@ uint64_t nvn_new_serial(void); // next tex_t / prog_
|
||||
void nvn_sync_ahead_present(void);
|
||||
uint64_t nvn_sync_ahead_guard(void);
|
||||
int nvn_sync_ahead_on(void); // 1 when the frame-ahead wait is in effect: TOTK_SYNC_AHEAD=1 and a wait site known for this version
|
||||
// vk_exec_xfer.c, TOTK_SYNC_AHEAD: at the game's frame wait the newest timestamp written becomes the bound; the value
|
||||
// the game reads for the timestamp t of the report at addr (t, or the bound for a report its frame wait did not cover)
|
||||
void vk_counter_frame(void);
|
||||
uint64_t vk_counter_timestamp(uint64_t addr, uint64_t t);
|
||||
void vk_counter_log(void); // the run total, once (gfx_exit_log)
|
||||
int vk_mem_shadow_on(void); // vk_memory.c: 1 with shadow storage on (valid once the Vulkan back end is up)
|
||||
int vk_mem_mirror_on(void); // vk_memory.c: 1 when pools used as buffers get VRAM mirrors (memory = mirror or auto on a discrete GPU)
|
||||
void vk_mem_shadow_fence(void); // vk_memory.c: returns once every shadow sync that read the old guard is done
|
||||
|
||||
@@ -581,6 +581,7 @@ NVN_API(nvnSyncWait) {
|
||||
if (det) vk_ahead_frame_lag(s->fence, lag, behind);
|
||||
b->cpu_synced(want == s->fence ? s->fence : b->fence_done());
|
||||
if (det) vk_ahead_frame_done(1);
|
||||
if (mode == 1) vk_counter_frame();
|
||||
ret_x(c, NVN_SYNC_WAIT_RESULT_ALREADY_SIGNALED);
|
||||
return;
|
||||
}
|
||||
@@ -592,6 +593,7 @@ NVN_API(nvnSyncWait) {
|
||||
if (det) vk_ahead_frame_lag(s->fence, lag, behind);
|
||||
if (ok) b->cpu_synced(want == s->fence ? s->fence : b->fence_done());
|
||||
if (det) vk_ahead_frame_done(ok);
|
||||
if (mode == 1) vk_counter_frame();
|
||||
ret_x(c, ok ? NVN_SYNC_WAIT_RESULT_CONDITION_SATISFIED : NVN_SYNC_WAIT_RESULT_TIMEOUT_EXPIRED);
|
||||
}
|
||||
// void nvnEventBuilderSetDefaults(NVNeventBuilder *b)
|
||||
|
||||
+6
-2
@@ -60,8 +60,12 @@ NVN_API(nvnDeviceSetAutomaticCheckpointsMask) { (void)c; }
|
||||
static uint64_t ticks_to_ns(uint64_t t) { return t / 12 * 625 + t % 12 * 625 / 12; }
|
||||
// uint64_t nvnDeviceGetCurrentTimestampInNanoseconds(const NVNdevice *d)
|
||||
NVN_API(nvnDeviceGetCurrentTimestampInNanoseconds) { ret_x(c, ticks_to_ns(rt_ticks())); }
|
||||
// uint64_t nvnDeviceGetTimestampInNanoseconds(const NVNdevice *d, const NVNcounterData *counter)
|
||||
NVN_API(nvnDeviceGetTimestampInNanoseconds) { ret_x(c, ticks_to_ns(((const NVNcounterData *)arg_p(c, 1))->timestamp)); }
|
||||
// uint64_t nvnDeviceGetTimestampInNanoseconds(const NVNdevice *d, const NVNcounterData *counter): with the frame wait
|
||||
// one frame late, a report that wait did not cover reads as the newest one written by then (vk_exec_xfer.c)
|
||||
NVN_API(nvnDeviceGetTimestampInNanoseconds) {
|
||||
const NVNcounterData *d = arg_p(c, 1);
|
||||
ret_x(c, ticks_to_ns(vk_counter_timestamp((uintptr_t)d, d->timestamp)));
|
||||
}
|
||||
|
||||
// ---------- memory pools and buffers
|
||||
// size_t nvnMemoryPoolGetSize(const NVNmemoryPool *p)
|
||||
|
||||
+34
-9
@@ -44,6 +44,8 @@
|
||||
#include "ov.h"
|
||||
#include "platform/platform.h"
|
||||
|
||||
static void vert_plus_init(double ratio_over_16x9);
|
||||
|
||||
#define BASE_W 1920
|
||||
#define BASE_H 1080
|
||||
#define SCENE_W 1600
|
||||
@@ -643,6 +645,7 @@ void res_init(void) {
|
||||
memcpy(page + 56, &r, sizeof r);
|
||||
rt_patch_switch(aspect, 1);
|
||||
rt_log("resolution: camera aspect ratio %.4f (16:9 is %.4f)", ratio, game);
|
||||
if (ratio < game) vert_plus_init(ratio / game);
|
||||
}
|
||||
} else {
|
||||
rt_patch_switch(aspect, 0); // the page holds no ratio
|
||||
@@ -673,25 +676,47 @@ int res_wants_wide_overlay(const unsigned out[2]) {
|
||||
|
||||
// Field of view (TOTK_FOV, percent of the game's own, 70..140, live): the camera's vertical view angle times the factor
|
||||
// on page +60 (recomp/patches-v110.txt, patches-v121.txt and patches-v143.txt, set fov). The horizontal angle follows
|
||||
// through the aspect ratio. 100 switches the set off, so the camera code is the game's own. Runs on a settings change
|
||||
// (gfx_present.c window_settings_live), the first time at the first present.
|
||||
// through the aspect ratio. A factor of 1 switches the set off, so the camera code is the game's own. Runs on a settings
|
||||
// change (gfx_present.c window_settings_live), the first time at the first present.
|
||||
//
|
||||
// Vert+ (TOTK_VERT_PLUS, off by default; the Display tab's row under the field of view): the camera keeps the game's vertical view angle at every shape, so a shape
|
||||
// narrower than 16:9 (16:10, 3:2, 4:3) showed less of the world at the sides than 16:9 does. The factor is then also
|
||||
// multiplied by the one that gives the game's default view the horizontal angle it has at 16:9: tan(v'/2) = tan(v/2)
|
||||
// * (16/9) / aspect, so v' / v = 2 atan(tan(v/2) k) / v with k = 16:9 over the aspect. v is the game's default
|
||||
// vertical angle, 51.2 degrees, measured on 1.4.3 at Lookout Landing: a 4:3 frame at TOTK_FOV=130 is a 16:9 frame of
|
||||
// the same moment scaled by 0.730 about its middle (tan(v/2) / tan(1.3 v/2) = 0.730 gives v = 51.2). The patch scales
|
||||
// the angle linearly, so a zoomed view (the bow, the scope) gets the same factor, a few percent short of the exact one.
|
||||
#define FOV_MIN 70
|
||||
#define FOV_MAX 140
|
||||
#define VERT_PLUS_V (51.2 * 3.14159265358979 / 180)
|
||||
static float vert_plus_k = 1; // set by res_init (vert_plus_init) for a camera narrower than 16:9
|
||||
|
||||
static void vert_plus_init(double ratio_over_16x9) {
|
||||
double k = 1 / ratio_over_16x9, v = VERT_PLUS_V;
|
||||
vert_plus_k = (float)(2 * atan(tan(v / 2) * k) / v);
|
||||
}
|
||||
|
||||
void res_fov_live(void) {
|
||||
static int set = -2, shown = 100;
|
||||
static int set = -2, shown = 100, shown_vp = 0; // the game's own view: nothing to write until one changes
|
||||
if (set == -2) set = rt_patch_set("fov");
|
||||
int pct = cfg_int("TOTK_FOV");
|
||||
pct = pct < FOV_MIN ? FOV_MIN : pct > FOV_MAX ? FOV_MAX : pct;
|
||||
if (pct == shown) return;
|
||||
shown = pct;
|
||||
int vp = vert_plus_k != 1 && cfg_bool("TOTK_VERT_PLUS");
|
||||
if (pct == shown && vp == shown_vp) return;
|
||||
shown = pct, shown_vp = vp;
|
||||
if (set < 0) {
|
||||
rt_log("resolution: this game version has no field-of-view patch; TOTK_FOV=%d does nothing", pct);
|
||||
if (pct != 100 || vp)
|
||||
rt_log("resolution: this game version has no field-of-view patch; TOTK_FOV=%d and Vert+ do nothing", pct);
|
||||
return;
|
||||
}
|
||||
float k = pct / 100.0f;
|
||||
float k = pct / 100.0f * (vp ? vert_plus_k : 1);
|
||||
memcpy((uint8_t *)rt_patch_page() + 60, &k, sizeof k); // before the switch: a site that sees it on reads k
|
||||
rt_patch_switch(set, pct != 100);
|
||||
rt_log("resolution: field of view %d%% of the game's", pct);
|
||||
rt_patch_switch(set, k != 1);
|
||||
if (vp)
|
||||
rt_log("resolution: field of view %d%% of the game's, times %.4f for Vert+ (the 16:9 width at this narrower "
|
||||
"shape)", pct, vert_plus_k);
|
||||
else
|
||||
rt_log("resolution: field of view %d%% of the game's", pct);
|
||||
}
|
||||
|
||||
// TOTK_DYNAMIC_RES = 0 holds the game's dynamic resolution at 100 % (patches-v110.txt, patches-v121.txt and patches-v143.txt,
|
||||
|
||||
+10
-6
@@ -571,15 +571,18 @@ static void folders_retry(const char *id, int need) {
|
||||
}
|
||||
|
||||
// The game resolution (resolution.c): 16:9 sizes from its smallest, 1280x720 (for weak GPUs), up, the common 21:9 and
|
||||
// 32:9 monitor sizes, the 16:10 screens of the Steam Deck, handhelds and laptops and the 3:2 screens of laptops and
|
||||
// tablets (Surface, Framework; the camera and the HUD follow
|
||||
// another shape, resolution.c res_init; the installer lays the HUD out for each, installer/steps.py ASPECT_SIZES), and
|
||||
// the current value when it is another size.
|
||||
// 32:9 monitor sizes (7680x2160: the 57-inch dual-4K ones), the 16:10 screens of the Steam Deck, handhelds and laptops, the 3:2 screens of laptops and
|
||||
// tablets (Surface, Framework), the 4:3 screens of CRT monitors and iPads and the 19.5:9 and 20:9 screens of phones a
|
||||
// game is streamed to (the camera and the HUD follow another shape, resolution.c res_init; the installer lays the HUD
|
||||
// out for each, installer/screens.py ASPECT_SIZES), and the current value when it is another size: any shape from 4:3
|
||||
// to 32:9 gets a layout of its own (cfg.c cfg_shape_size).
|
||||
static void row_output_res(void) {
|
||||
static const char *const vals[] = {"1280x720", "1600x900", "1920x1080", "2560x1440", "3200x1800", "3840x2160",
|
||||
"2560x1080", "3440x1440", "3840x1600", "5120x2160", "3840x1080", "5120x1440",
|
||||
"2560x1080", "3440x1440", "3840x1600", "5120x2160", "3840x1080", "5120x1440", "7680x2160",
|
||||
"1280x800", "1680x1050", "1920x1200", "2560x1600",
|
||||
"1920x1280", "2160x1440", "2256x1504", "2880x1920", "3000x2000"};
|
||||
"1920x1280", "2160x1440", "2256x1504", "2880x1920", "3000x2000",
|
||||
"1440x1080", "1600x1200", "2048x1536", "2732x2048",
|
||||
"2340x1080", "3120x1440", "2400x1080", "3200x1440"};
|
||||
enum { N = sizeof vals / sizeof *vals };
|
||||
char shown[N][32];
|
||||
const char *names[N];
|
||||
@@ -822,6 +825,7 @@ static void tab_screen(float scale) {
|
||||
static const UiTextId movie_aspect[] = {UI_MENU_MOVIE_ASPECT_KEEP, UI_MENU_MOVIE_ASPECT_STRETCH};
|
||||
opt_choice("TOTK_MOVIE_ASPECT", UI_MENU_MOVIE_ASPECT, movie_aspect, 2, UI_MENU_MOVIE_ASPECT_DESC);
|
||||
opt_slider("TOTK_FOV", UI_MENU_FOV, 70, 140, UI_MENU_FOV_DESC, 5, "%.0f %%");
|
||||
opt_toggle("TOTK_VERT_PLUS", UI_MENU_VERT_PLUS, UI_MENU_VERT_PLUS_DESC);
|
||||
static const char *const aniso[] = {"game", "2", "4", "8", "16"};
|
||||
const char *aniso_names[] = {menu_text(UI_MENU_ANISO_GAME), "2x", "4x", "8x", "16x"};
|
||||
opt_choice_list("TOTK_ANISO", UI_MENU_ANISO, aniso, aniso_names, 5, UI_MENU_ANISO_DESC);
|
||||
|
||||
+103
-64
@@ -101,6 +101,8 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_KEEP] = "Black bars", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Stretch",
|
||||
[UI_MENU_FOV] = "Field of view",
|
||||
[UI_MENU_FOV_DESC] = "How much of the world the camera shows, in percent of the game's own. Game versions 1.1.0, 1.2.1 and 1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "Keep the 16:9 width",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "On screens narrower than 16:9 (Steam Deck, 16:10, 4:3) the camera shows the same width of the world as at 16:9, and more above and below. No effect at 16:9 or wider.",
|
||||
[UI_MENU_SHADOW_RES] = "Shadow map size",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Size of the sun's shadow map. The game's own size changes with the view, down to about 400 "
|
||||
"near the ground, so leaf shadows look blocky and jump; a fixed size keeps them still and "
|
||||
@@ -563,12 +565,13 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_C0_DESC] = "Fills the driver-reserved constant bank c0 (storage sizes, dispatch size, point size, base instance) instead of reading zeros.",
|
||||
[UI_MENU_FIX_ZERO] = "Zero new GPU memory",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "New GPU memory pools start zero-filled, as Switch memory does.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Fog and particles after DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "With DLAA, fog, dust and other particles are drawn over the picture DLSS has"
|
||||
" already smoothed, as the game draws them without DLSS: small particles in "
|
||||
"fog (shrines) no longer vanish or leave trails. Off: DLSS also processes "
|
||||
"these effects, as before. DLAA mode only; the upscaling DLSS modes always "
|
||||
"process them. Applies at once.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Particles after DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "With DLAA, dust and other particles are drawn over the picture DLSS has "
|
||||
"already smoothed, as the game draws them without DLSS: small particles in "
|
||||
"fog (shrines) no longer vanish or leave trails. The fog and the clouds still "
|
||||
"go through DLSS, so distant edges against the sky stay clean. Off: DLSS also "
|
||||
"processes the particles, as before. DLAA mode only; the upscaling DLSS modes "
|
||||
"always process them. Applies at once.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Fixed DLSS exposure",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS takes the brightness of the game's picture as it is instead of "
|
||||
"estimating the exposure from each frame: in dark scenes (the Depths) large "
|
||||
@@ -749,6 +752,8 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_KEEP] = "Чёрные полосы", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Растянуть",
|
||||
[UI_MENU_FOV] = "Поле зрения",
|
||||
[UI_MENU_FOV_DESC] = "Сколько мира показывает камера, в процентах от игрового. Для версий игры 1.1.0, 1.2.1 и 1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "Ширина обзора как в 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "На экранах уже 16:9 (Steam Deck, 16:10, 4:3) камера показывает мир той же ширины, что и в 16:9, и больше сверху и снизу. На 16:9 и шире ничего не меняет.",
|
||||
[UI_MENU_SHADOW_RES] = "Размер карты теней",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Размер карты теней от солнца. Собственный размер игры меняется вместе с видом, у земли до "
|
||||
"примерно 400, поэтому тени листвы выглядят квадратными и дёргаются; постоянный размер делает "
|
||||
@@ -1216,12 +1221,13 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_C0_DESC] = "Заполняет зарезервированный драйвером банк констант c0 (размеры хранилищ, размер запуска, размер точки, базовый экземпляр) вместо чтения нулей.",
|
||||
[UI_MENU_FIX_ZERO] = "Обнулять новую память GPU",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Новые пулы памяти GPU заполняются нулями, как память Switch.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Туман и частицы после DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "С DLAA туман, пыль и другие частицы рисуются поверх картинки, уже сглаженной"
|
||||
" DLSS, как игра рисует их без DLSS: мелкие частицы в тумане (святилища) "
|
||||
"больше не пропадают и не оставляют шлейфов. Выкл.: DLSS обрабатывает и эти "
|
||||
"эффекты, как раньше. Только в режиме DLAA; режимы DLSS с повышением "
|
||||
"разрешения обрабатывают их всегда. Применяется сразу.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Частицы после DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "С DLAA пыль и другие частицы рисуются поверх картинки, уже сглаженной DLSS, "
|
||||
"как игра рисует их без DLSS: мелкие частицы в тумане (святилища) больше не "
|
||||
"пропадают и не оставляют шлейфов. Туман и облака по-прежнему проходят через "
|
||||
"DLSS, поэтому далёкие края на фоне неба остаются чистыми. Выкл.: DLSS "
|
||||
"обрабатывает и частицы, как раньше. Только в режиме DLAA; режимы DLSS с "
|
||||
"повышением разрешения обрабатывают их всегда. Применяется сразу.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Фиксированная экспозиция DLSS",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS берёт яркость картинки игры как есть, а не оценивает экспозицию по "
|
||||
"каждому кадру: в тёмных сценах (Глубины) большие участки в тумане больше не "
|
||||
@@ -1671,12 +1677,14 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_C0_DESC] = "Preenche o banco de constantes c0 reservado ao driver (tamanhos de armazenamento, tamanho do dispatch, tamanho do ponto, instância base) em vez de ler zeros.",
|
||||
[UI_MENU_FIX_ZERO] = "Zerar memória nova da GPU",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Novos pools de memória da GPU começam zerados, como a memória do Switch.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Névoa e partículas após o DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Com DLAA, a névoa, a poeira e outras partículas são desenhadas sobre a "
|
||||
"imagem já suavizada pelo DLSS, como o jogo as desenha sem DLSS: partículas "
|
||||
"pequenas na névoa (santuários) não somem mais nem deixam rastros. Desligado:"
|
||||
" o DLSS também processa esses efeitos, como antes. Só no modo DLAA; os modos"
|
||||
" de DLSS que aumentam a resolução sempre os processam. Aplica-se na hora.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Partículas após o DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Com DLAA, a poeira e outras partículas são desenhadas sobre a imagem já "
|
||||
"suavizada pelo DLSS, como o jogo as desenha sem DLSS: partículas pequenas na "
|
||||
"névoa (santuários) não somem mais nem deixam rastros. A névoa e as nuvens "
|
||||
"continuam passando pelo DLSS, então as bordas distantes contra o céu ficam "
|
||||
"limpas. Desligado: o DLSS também processa as partículas, como antes. Só no "
|
||||
"modo DLAA; os modos de DLSS que aumentam a resolução sempre as processam. "
|
||||
"Aplica-se na hora.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposição fixa do DLSS",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "O DLSS usa o brilho da imagem do jogo como ele é, em vez de estimar a "
|
||||
"exposição a cada quadro: em cenas escuras (as Profundezas), grandes áreas com "
|
||||
@@ -1745,6 +1753,8 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "Campo de visão",
|
||||
[UI_MENU_FOV_DESC] = "Quanto do mundo a câmera mostra, em porcentagem do original do jogo. Nas versões 1.1.0, 1.2.1 e 1.4.3 "
|
||||
"do jogo.",
|
||||
[UI_MENU_VERT_PLUS] = "Manter a largura de 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Em telas mais estreitas que 16:9 (Steam Deck, 16:10, 4:3), a câmera mostra a mesma largura do mundo que em 16:9, e mais acima e abaixo. Sem efeito em 16:9 ou mais largo.",
|
||||
[UI_MENU_SHADOW_RES] = "Tamanho do mapa de sombras",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Tamanho do mapa de sombras do sol. O tamanho do jogo muda com a vista, até cerca de "
|
||||
"400 perto do chão, então as sombras das folhas ficam quadriculadas e pulam; um "
|
||||
@@ -2145,6 +2155,8 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "视野",
|
||||
[UI_MENU_FOV_DESC] = "镜头能看到多大范围,以游戏自身视野的百分比表示。"
|
||||
"支持游戏版本 1.1.0、1.2.1 和 1.4.3。",
|
||||
[UI_MENU_VERT_PLUS] = "保持 16:9 宽度",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "在比 16:9 更窄的屏幕上(Steam Deck、16:10、4:3),镜头显示与 16:9 相同宽度的世界,上下显示更多。16:9 或更宽的屏幕没有变化。",
|
||||
[UI_MENU_SHARPNESS] = "FSR 锐度",
|
||||
[UI_MENU_SHARPNESS_DESC] = "FSR 缩放后的锐化强度;0 为关闭。",
|
||||
[UI_MENU_COLOR] = "色彩",
|
||||
@@ -2472,10 +2484,10 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
|
||||
"基础实例),而不是读取零值。",
|
||||
[UI_MENU_FIX_ZERO] = "清零新的 GPU 内存",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "新的 GPU 内存池初始内容为零,与 Switch 内存一致。",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA 之后绘制雾和粒子",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "开启 DLAA 时,雾、灰尘和其他粒子绘制在 DLSS 已平滑的画面之上,与游戏不用 DLSS 时的"
|
||||
"绘制方式相同:雾中的细小粒子(神庙中)不再消失,也不再留下拖影。关闭:DLSS 也处理这些效果,与以"
|
||||
"前相同。仅用于 DLAA 模式;提升分辨率的 DLSS 模式始终处理它们。立即生效。",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA 之后绘制粒子",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "开启 DLAA 时,灰尘和其他粒子绘制在 DLSS 已平滑的画面之上,与游戏不用 DLSS "
|
||||
"时的绘制方式相同:雾中的细小粒子(神庙中)不再消失,也不再留下拖影。雾和云仍由 DLSS 处理,因此远处与天空相接的边缘保持干净。关闭:DLSS "
|
||||
"也处理这些粒子,与以前相同。仅用于 DLAA 模式;提升分辨率的 DLSS 模式始终处理它们。立即生效。",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "固定 DLSS 曝光",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS 直接使用游戏画面的亮度,而不是逐帧自行估算曝光:在暗场景(地底)中,"
|
||||
"镜头移动时大片雾中区域不再忽暗忽亮一帧。关闭:DLSS 自行估算曝光,与以前相同。立即生效。",
|
||||
@@ -2857,6 +2869,8 @@ static const char *const text_de[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_STRETCH] = "Strecken",
|
||||
[UI_MENU_FOV] = "Sichtfeld",
|
||||
[UI_MENU_FOV_DESC] = "Wie viel von der Welt die Kamera zeigt, in Prozent des Spielwerts. Nur Spielversion 1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "16:9-Breite behalten",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Auf Bildschirmen, die schmaler als 16:9 sind (Steam Deck, 16:10, 4:3), zeigt die Kamera dieselbe Breite der Welt wie bei 16:9 und mehr darüber und darunter. Bei 16:9 oder breiter ohne Wirkung.",
|
||||
[UI_MENU_SHADOW_RES] = "Größe der Schattenkarte",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Größe der Schattenkarte der Sonne. Die Größe des Spiels ändert sich mit der Ansicht, "
|
||||
"bis etwa 400 nahe am Boden, daher wirken Blätterschatten klotzig und springen; eine "
|
||||
@@ -3508,13 +3522,14 @@ static const char *const text_de[UI_TEXT_COUNT] = {
|
||||
"Punktgröße, Basisinstanz), statt Nullen zu lesen.",
|
||||
[UI_MENU_FIX_ZERO] = "Neuen GPU-Speicher nullen",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Neue GPU-Speicherpools beginnen mit Nullen gefüllt, wie Switch-Speicher.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Nebel und Partikel nach DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Mit DLAA werden Nebel, Staub und andere Partikel über das bereits von DLSS "
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Partikel nach DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Mit DLAA werden Staub und andere Partikel über das bereits von DLSS "
|
||||
"geglättete Bild gezeichnet, so wie das Spiel sie ohne DLSS zeichnet: Kleine "
|
||||
"Partikel im Nebel (Schreine) verschwinden nicht mehr und ziehen keine Spuren "
|
||||
"mehr. Aus: DLSS verarbeitet auch diese Effekte, wie bisher. Nur im "
|
||||
"DLAA-Modus; die hochskalierenden DLSS-Modi verarbeiten sie immer. Wirkt "
|
||||
"sofort.",
|
||||
"mehr. Nebel und Wolken gehen weiterhin durch DLSS, sodass ferne Kanten vor "
|
||||
"dem Himmel sauber bleiben. Aus: DLSS verarbeitet auch die Partikel, wie "
|
||||
"bisher. Nur im DLAA-Modus; die hochskalierenden DLSS-Modi verarbeiten sie "
|
||||
"immer. Wirkt sofort.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Feste DLSS-Belichtung",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS nimmt die Helligkeit des Spielbilds, wie sie ist, statt die Belichtung "
|
||||
"aus jedem Bild zu schätzen: In dunklen Szenen (Untergrund) werden große "
|
||||
@@ -3761,6 +3776,8 @@ static const char *const text_fr[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "Champ de vision",
|
||||
[UI_MENU_FOV_DESC] = "La part du monde que montre la caméra, en pourcentage de celle du jeu. Version 1.4.3 du jeu "
|
||||
"uniquement.",
|
||||
[UI_MENU_VERT_PLUS] = "Garder la largeur 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Sur les écrans plus étroits que 16:9 (Steam Deck, 16:10, 4:3), la caméra montre la même largeur du monde qu'en 16:9, et davantage au-dessus et en dessous. Sans effet en 16:9 ou plus large.",
|
||||
[UI_MENU_SHADOW_RES] = "Taille de la carte d'ombres",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Taille de la carte d'ombres du soleil. La taille du jeu change avec la vue, jusqu'à "
|
||||
"environ 400 près du sol, si bien que les ombres des feuilles paraissent pixelisées "
|
||||
@@ -4430,13 +4447,15 @@ static const char *const text_fr[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_ZERO] = "Remettre à zéro la nouvelle mémoire GPU",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Les nouveaux pools de mémoire GPU commencent remplis de zéros, comme la mémoire de la "
|
||||
"Switch.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Brouillard et particules après DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Avec DLAA, le brouillard, la poussière et les autres particules sont "
|
||||
"dessinés par-dessus l'image déjà lissée par DLSS, comme le jeu les dessine "
|
||||
"sans DLSS : les petites particules dans le brouillard (sanctuaires) ne "
|
||||
"disparaissent plus et ne laissent plus de traînées. Désactivé : DLSS traite "
|
||||
"aussi ces effets, comme avant. Mode DLAA uniquement ; les modes DLSS avec "
|
||||
"mise à l'échelle les traitent toujours. S'applique immédiatement.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Particules après DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Avec DLAA, la poussière et les autres particules sont dessinées par-dessus "
|
||||
"l'image déjà lissée par DLSS, comme le jeu les dessine sans DLSS : les "
|
||||
"petites particules dans le brouillard (sanctuaires) ne disparaissent plus et "
|
||||
"ne laissent plus de traînées. Le brouillard et les nuages passent toujours "
|
||||
"par DLSS, donc les bords lointains sur le ciel restent nets. Désactivé : "
|
||||
"DLSS traite aussi les particules, comme avant. Mode DLAA uniquement ; les "
|
||||
"modes DLSS avec mise à l'échelle les traitent toujours. S'applique "
|
||||
"immédiatement.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposition DLSS fixe",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS prend la luminosité de l'image du jeu telle quelle au lieu d'estimer "
|
||||
"l'exposition à chaque image : dans les scènes sombres (les Profondeurs), "
|
||||
@@ -4685,6 +4704,8 @@ static const char *const text_es[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "Campo de visión",
|
||||
[UI_MENU_FOV_DESC] = "Cuánto del mundo muestra la cámara, en porcentaje del propio del juego. Solo la versión "
|
||||
"1.4.3 del juego.",
|
||||
[UI_MENU_VERT_PLUS] = "Mantener el ancho de 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "En pantallas más estrechas que 16:9 (Steam Deck, 16:10, 4:3), la cámara muestra el mismo ancho del mundo que en 16:9, y más por arriba y por abajo. Sin efecto en 16:9 o más ancho.",
|
||||
[UI_MENU_SHADOW_RES] = "Tamaño del mapa de sombras",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Tamaño del mapa de sombras del sol. El tamaño del juego cambia con la vista, hasta "
|
||||
"unos 400 cerca del suelo, por lo que las sombras de las hojas se ven pixeladas y "
|
||||
@@ -5341,12 +5362,14 @@ static const char *const text_es[UI_TEXT_COUNT] = {
|
||||
"tamaño de dispatch, tamaño de punto, instancia base) en lugar de leer ceros.",
|
||||
[UI_MENU_FIX_ZERO] = "Poner a cero la memoria GPU nueva",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Los nuevos bloques de memoria GPU empiezan llenos de ceros, como la memoria de Switch.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Niebla y partículas tras DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, la niebla, el polvo y otras partículas se dibujan sobre la imagen "
|
||||
"que DLSS ya ha suavizado, como las dibuja el juego sin DLSS: las partículas "
|
||||
"pequeñas en la niebla (santuarios) ya no desaparecen ni dejan estelas. No: "
|
||||
"DLSS también procesa estos efectos, como antes. Solo en el modo DLAA; los "
|
||||
"modos DLSS con escalado siempre los procesan. Se aplica al momento.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Partículas tras DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, el polvo y otras partículas se dibujan sobre la imagen que DLSS ya "
|
||||
"ha suavizado, como las dibuja el juego sin DLSS: las partículas pequeñas en "
|
||||
"la niebla (santuarios) ya no desaparecen ni dejan estelas. La niebla y las "
|
||||
"nubes siguen pasando por DLSS, así que los bordes lejanos contra el cielo "
|
||||
"quedan limpios. No: DLSS también procesa las partículas, como antes. Solo en "
|
||||
"el modo DLAA; los modos DLSS con escalado siempre los procesan. Se aplica al "
|
||||
"momento.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposición fija de DLSS",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS toma el brillo de la imagen del juego tal cual en lugar de estimar la "
|
||||
"exposición en cada fotograma: en escenas oscuras (el Subsuelo) las grandes "
|
||||
@@ -5594,6 +5617,8 @@ static const char *const text_it[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "Campo visivo",
|
||||
[UI_MENU_FOV_DESC] = "Quanta parte del mondo mostra la telecamera, in percentuale di quella del gioco. Solo "
|
||||
"versione 1.4.3 del gioco.",
|
||||
[UI_MENU_VERT_PLUS] = "Mantieni la larghezza 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Sugli schermi più stretti di 16:9 (Steam Deck, 16:10, 4:3) la telecamera mostra la stessa larghezza del mondo che in 16:9, e di più sopra e sotto. Nessun effetto a 16:9 o più largo.",
|
||||
[UI_MENU_SHADOW_RES] = "Dimensione della mappa delle ombre",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Dimensione della mappa delle ombre del sole. Quella del gioco cambia con la visuale, "
|
||||
"fino a circa 400 vicino al suolo, quindi le ombre delle foglie sembrano squadrate e "
|
||||
@@ -6253,12 +6278,13 @@ static const char *const text_it[UI_TEXT_COUNT] = {
|
||||
"del dispatch, dimensione dei punti, istanza base) invece di leggere zeri.",
|
||||
[UI_MENU_FIX_ZERO] = "Azzera la nuova memoria GPU",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "I nuovi pool di memoria GPU partono riempiti di zeri, come la memoria di Switch.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Nebbia e particelle dopo DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, nebbia, polvere e altre particelle vengono disegnate sopra "
|
||||
"l'immagine già levigata da DLSS, come le disegna il gioco senza DLSS: le "
|
||||
"piccole particelle nella nebbia (sacrari) non spariscono più né lasciano "
|
||||
"scie. No: DLSS elabora anche questi effetti, come prima. Solo in modalità "
|
||||
"DLAA; le modalità DLSS con upscaling li elaborano sempre. Si applica subito.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Particelle dopo DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, polvere e altre particelle vengono disegnate sopra l'immagine già "
|
||||
"levigata da DLSS, come le disegna il gioco senza DLSS: le piccole particelle "
|
||||
"nella nebbia (sacrari) non spariscono più né lasciano scie. Nebbia e nuvole "
|
||||
"passano ancora per DLSS, così i bordi lontani contro il cielo restano "
|
||||
"puliti. No: DLSS elabora anche le particelle, come prima. Solo in modalità "
|
||||
"DLAA; le modalità DLSS con upscaling le elaborano sempre. Si applica subito.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Esposizione DLSS fissa",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS prende la luminosità dell'immagine del gioco così com'è invece di "
|
||||
"stimare l'esposizione da ogni fotogramma: nelle scene buie (il Sottosuolo) "
|
||||
@@ -6505,6 +6531,8 @@ static const char *const text_nl[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "Gezichtsveld",
|
||||
[UI_MENU_FOV_DESC] = "Hoeveel van de wereld de camera toont, in procenten van dat van het spel. Alleen spelversie "
|
||||
"1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "16:9-breedte behouden",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Op schermen die smaller zijn dan 16:9 (Steam Deck, 16:10, 4:3) toont de camera dezelfde breedte van de wereld als bij 16:9, en meer erboven en eronder. Geen effect bij 16:9 of breder.",
|
||||
[UI_MENU_SHADOW_RES] = "Grootte van de schaduwkaart",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Grootte van de schaduwkaart van de zon. De grootte van het spel verandert met het "
|
||||
"zicht, tot ongeveer 400 dicht bij de grond, waardoor bladschaduwen blokkerig ogen en "
|
||||
@@ -7145,12 +7173,14 @@ static const char *const text_nl[UI_TEXT_COUNT] = {
|
||||
"dispatchgrootte, puntgrootte, basisinstantie) in plaats van nullen te lezen.",
|
||||
[UI_MENU_FIX_ZERO] = "Nieuw GPU-geheugen op nul zetten",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Nieuwe GPU-geheugenpools beginnen gevuld met nullen, zoals Switch-geheugen.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Mist en deeltjes na DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Met DLAA worden mist, stof en andere deeltjes over het beeld getekend dat "
|
||||
"DLSS al heeft gladgestreken, zoals het spel ze zonder DLSS tekent: kleine "
|
||||
"deeltjes in mist (heiligdommen) verdwijnen niet meer en laten geen sporen "
|
||||
"meer achter. Uit: DLSS verwerkt deze effecten ook, zoals voorheen. Alleen in "
|
||||
"DLAA-modus; de upscalingmodi van DLSS verwerken ze altijd. Werkt meteen.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Deeltjes na DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Met DLAA worden stof en andere deeltjes over het beeld getekend dat DLSS al "
|
||||
"heeft gladgestreken, zoals het spel ze zonder DLSS tekent: kleine deeltjes "
|
||||
"in mist (heiligdommen) verdwijnen niet meer en laten geen sporen meer "
|
||||
"achter. Mist en wolken gaan nog steeds door DLSS, zodat verre randen tegen "
|
||||
"de lucht schoon blijven. Uit: DLSS verwerkt ook de deeltjes, zoals voorheen. "
|
||||
"Alleen in DLAA-modus; de upscalingmodi van DLSS verwerken ze altijd. Werkt "
|
||||
"meteen.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Vaste DLSS-belichting",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS neemt de helderheid van het spelbeeld zoals ze is, in plaats van de "
|
||||
"belichting per beeld te schatten: in donkere scènes (de Diepten) worden "
|
||||
@@ -7385,6 +7415,8 @@ static const char *const text_ja[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_STRETCH] = "引き伸ばし",
|
||||
[UI_MENU_FOV] = "視野角",
|
||||
[UI_MENU_FOV_DESC] = "カメラが映す範囲を、ゲーム本来の視野に対するパーセントで指定します。ゲームのバージョン 1.4.3 のみ。",
|
||||
[UI_MENU_VERT_PLUS] = "16:9 の横幅を保つ",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "16:9 より横幅の狭い画面(Steam Deck、16:10、4:3)で、カメラが 16:9 と同じ横幅の世界を映し、上下はより広く映します。16:9 以上の横長の画面では変わりません。",
|
||||
[UI_MENU_SHADOW_RES] = "シャドウマップのサイズ",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "太陽のシャドウマップの大きさです。ゲーム本来のサイズは視点によって変わり、地面近くでは約 400 まで下がるため、葉の影がブロック状になって跳ねます。固定サイ"
|
||||
"ズにすると影が安定し、くっきりします。1024 を超えると GPU 時間とビデオメモリが増えます。",
|
||||
@@ -7920,9 +7952,10 @@ static const char *const text_ja[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_C0_DESC] = "ドライバー予約の定数バンク c0 (ストレージサイズ、ディスパッチサイズ、ポイントサイズ、ベースインスタンス) を、ゼロを読む代わりに埋めます。",
|
||||
[UI_MENU_FIX_ZERO] = "新しい GPU メモリをゼロで埋める",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Switch のメモリと同じく、新しい GPU メモリプールをゼロで埋めた状態から始めます。",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA の後に霧とパーティクル",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 使用時、霧、ちり、その他のパーティクルを、DLSS が滑らかにした後の映像の上に描きます。DLSS なしでゲームが描くのと同じです: "
|
||||
"霧の中の小さなパーティクル (祠) が消えたり残像を残したりしなくなります。オフ: これまでどおり DLSS がこれらのエフェクトも処理します。DLAA "
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA の後にパーティクル",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 使用時、ちりやその他のパーティクルを、DLSS が滑らかにした後の映像の上に描きます。DLSS なしでゲームが描くのと同じです: "
|
||||
"霧の中の小さなパーティクル (祠) が消えたり残像を残したりしなくなります。霧と雲は引き続き DLSS "
|
||||
"を通るため、空を背にした遠くの輪郭はきれいなままです。オフ: これまでどおり DLSS がパーティクルも処理します。DLAA "
|
||||
"モードのみ。アップスケーリングする DLSS モードでは常に処理されます。すぐに反映されます。",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "DLSS の露出を固定",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS が各フレームから露出を推定せず、ゲームの映像の明るさをそのまま使います: 暗い場面 (地底) "
|
||||
@@ -8134,6 +8167,8 @@ static const char *const text_ko[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_STRETCH] = "늘리기",
|
||||
[UI_MENU_FOV] = "시야각",
|
||||
[UI_MENU_FOV_DESC] = "카메라가 보여 주는 범위를 게임 원래 시야에 대한 퍼센트로 지정합니다. 게임 버전 1.4.3 전용입니다.",
|
||||
[UI_MENU_VERT_PLUS] = "16:9 너비 유지",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "16:9보다 좁은 화면(Steam Deck, 16:10, 4:3)에서 카메라가 16:9와 같은 너비의 세계를 보여 주고 위아래는 더 많이 보여 줍니다. 16:9 이상 넓은 화면에서는 효과가 없습니다.",
|
||||
[UI_MENU_SHADOW_RES] = "그림자 맵 크기",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "태양 그림자 맵의 크기입니다. 게임 원래 크기는 시점에 따라 바뀌며 지면 가까이에서는 약 400까지 내려가서 나뭇잎 그림자가 각지고 튀게 됩니다. 고정 "
|
||||
"크기로 하면 그림자가 안정되고 선명해집니다. 1024를 넘으면 GPU 시간과 비디오 메모리가 늘어납니다.",
|
||||
@@ -8671,10 +8706,11 @@ static const char *const text_ko[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_C0_DESC] = "드라이버 예약 상수 뱅크 c0(저장소 크기, 디스패치 크기, 포인트 크기, 기본 인스턴스)을 0을 읽는 대신 채웁니다.",
|
||||
[UI_MENU_FIX_ZERO] = "새 GPU 메모리를 0으로 채우기",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Switch 메모리처럼 새 GPU 메모리 풀을 0으로 채운 상태에서 시작합니다.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA 후 안개와 파티클",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 사용 시 안개, 먼지 등 파티클을 DLSS가 이미 부드럽게 한 영상 위에 그립니다. DLSS 없이 게임이 그리는 방식과 "
|
||||
"같습니다. 안개 속의 작은 파티클(사당)이 더 이상 사라지거나 잔상을 남기지 않습니다. 끄기: 예전처럼 DLSS가 이 효과도 처리합니다. "
|
||||
"DLAA 모드 전용이며, 업스케일링 DLSS 모드는 항상 이 효과를 처리합니다. 즉시 적용됩니다.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA 후 파티클",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 사용 시 먼지 등 파티클을 DLSS가 이미 부드럽게 한 영상 위에 그립니다. DLSS 없이 게임이 그리는 방식과 같습니다. 안개 "
|
||||
"속의 작은 파티클(사당)이 더 이상 사라지거나 잔상을 남기지 않습니다. 안개와 구름은 계속 DLSS를 거치므로 하늘을 배경으로 한 먼 "
|
||||
"윤곽이 깨끗하게 유지됩니다. 끄기: 예전처럼 DLSS가 파티클도 처리합니다. DLAA 모드 전용이며, 업스케일링 DLSS 모드는 항상 이 "
|
||||
"효과를 처리합니다. 즉시 적용됩니다.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "DLSS 노출 고정",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS가 프레임마다 노출을 추정하지 않고 게임 영상의 밝기를 그대로 사용합니다. 어두운 장면(지저)에서 안개 낀 넓은 영역이 카메라가 "
|
||||
"움직일 때 한 프레임 동안 어두워지거나 밝아지지 않습니다. 끄기: 예전처럼 DLSS가 노출을 직접 추정합니다. 즉시 적용됩니다.",
|
||||
@@ -8869,6 +8905,8 @@ static const char *const text_vi[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_KEEP] = "Dải đen", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Kéo giãn",
|
||||
[UI_MENU_FOV] = "Góc nhìn",
|
||||
[UI_MENU_FOV_DESC] = "Camera cho thấy bao nhiêu thế giới, tính theo phần trăm của game gốc. Game phiên bản 1.1.0, 1.2.1 và 1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "Giữ bề ngang 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Trên màn hình hẹp hơn 16:9 (Steam Deck, 16:10, 4:3), camera cho thấy thế giới rộng ngang như ở 16:9, và nhiều hơn ở phía trên và dưới. Không có tác dụng ở 16:9 hoặc rộng hơn.",
|
||||
[UI_MENU_SHADOW_RES] = "Kích thước bản đồ bóng",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Kích thước bản đồ bóng của mặt trời. Kích thước của game đổi theo tầm nhìn, xuống còn khoảng "
|
||||
"400 khi gần mặt đất, nên bóng lá trông bị vỡ ô và nhảy; kích thước cố định giữ chúng đứng "
|
||||
@@ -9319,11 +9357,12 @@ static const char *const text_vi[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FIX_C0_DESC] = "Điền bảng hằng số c0 mà trình điều khiển dành riêng (kích thước vùng lưu trữ, kích thước điều phối, kích thước điểm, thực thể gốc) thay vì đọc ra số không.",
|
||||
[UI_MENU_FIX_ZERO] = "Xóa sạch bộ nhớ GPU mới",
|
||||
[UI_MENU_FIX_ZERO_DESC] = "Các vùng nhớ GPU mới bắt đầu với toàn số không, như bộ nhớ Switch.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Sương mù và hạt sau DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Với DLAA, sương mù, bụi và các hạt khác được vẽ đè lên hình DLSS đã làm mịn, như game "
|
||||
"vẽ chúng khi không có DLSS: các hạt nhỏ trong sương mù (đền thờ) không còn biến mất "
|
||||
"hay để lại vệt. Tắt: DLSS cũng xử lý các hiệu ứng này, như trước. Chỉ ở chế độ "
|
||||
"DLAA; các chế độ phóng to DLSS luôn xử lý chúng. Áp dụng ngay.",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Hạt sau DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Với DLAA, bụi và các hạt khác được vẽ đè lên hình DLSS đã làm mịn, như game "
|
||||
"vẽ chúng khi không có DLSS: các hạt nhỏ trong sương mù (đền thờ) không còn "
|
||||
"biến mất hay để lại vệt. Sương mù và mây vẫn đi qua DLSS, nên các cạnh ở xa "
|
||||
"trên nền trời vẫn sạch. Tắt: DLSS cũng xử lý các hạt này, như trước. Chỉ ở "
|
||||
"chế độ DLAA; các chế độ phóng to DLSS luôn xử lý chúng. Áp dụng ngay.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Phơi sáng DLSS cố định",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS lấy độ sáng của hình game như nó vốn có thay vì ước lượng phơi sáng từ từng "
|
||||
"khung hình: trong cảnh tối (Depths) các vùng sương lớn không còn tối hoặc sáng đi "
|
||||
|
||||
@@ -45,6 +45,7 @@ typedef enum {
|
||||
UI_MENU_ASPECT, UI_MENU_ASPECT_DESC, UI_MENU_ASPECT_FIT, UI_MENU_ASPECT_STRETCH,
|
||||
UI_MENU_MOVIE_ASPECT, UI_MENU_MOVIE_ASPECT_DESC, UI_MENU_MOVIE_ASPECT_KEEP, UI_MENU_MOVIE_ASPECT_STRETCH,
|
||||
UI_MENU_FOV, UI_MENU_FOV_DESC,
|
||||
UI_MENU_VERT_PLUS, UI_MENU_VERT_PLUS_DESC,
|
||||
UI_MENU_SHADOW_RES, UI_MENU_SHADOW_RES_DESC, UI_MENU_SHADOW_RES_GAME,
|
||||
UI_MENU_ANISO, UI_MENU_ANISO_DESC, UI_MENU_ANISO_GAME,
|
||||
UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC,
|
||||
|
||||
@@ -480,6 +480,7 @@ void gfx_exit_log(void) {
|
||||
vk_mem_shadow_read_log();
|
||||
vk_ahead_log_final();
|
||||
vk_ahead_log_guards();
|
||||
vk_counter_log();
|
||||
if (gfx_replay_async() && r_started && !plat_xchg32(&done, 1)) replay_log(game_frames, 1);
|
||||
}
|
||||
|
||||
|
||||
+18
-2
@@ -327,6 +327,7 @@ static struct {
|
||||
VkImage light_z; // this frame: the D16 depth the lighting draws into the light target with
|
||||
int fx_on; // dlaa_effects_after, read at each present while DLSS runs
|
||||
int fx_seen, fx_open, fx_bad; // this frame: the point found / the scene not ended since / drawn on after it
|
||||
int fx_comp; // this frame: a full-size pass into the light target without depth after the lighting
|
||||
uint32_t fx_steady; // DLSS frames in a row with the point found and nothing of the scene after it
|
||||
// jitter (vk_dlaa_viewport)
|
||||
VkImage jdepth; // the scene depth of the last frame DLAA ran on: passes drawing with it are jittered
|
||||
@@ -1617,6 +1618,19 @@ static void gbuf_light(const VkExec *ex) {
|
||||
// breaks it puts DLSS back at the bloom until it holds again, so a frame the rule does not fit changes the picture at
|
||||
// most once a second instead of from frame to frame.
|
||||
// dlaa_effects_after = 0 (the Screen tab, read each frame): DLSS at the bloom, effects included.
|
||||
// The point waits for the first full-size pass into the light target without depth after the lighting (the composite
|
||||
// of the half-size clouds outdoors, of the volumetric fog in shrines, of the field's effects in the yard) and runs DLSS
|
||||
// before the next pass with a depth, the particles or the dust. Run at the first pass after the lighting, it left the
|
||||
// fog layer and those composites over its picture: they decide per pixel from the scene depth whether a pixel is sky
|
||||
// or a surface, and that depth is still this frame's jittered one while DLSS's picture is not, so on a silhouette
|
||||
// against clouds or fog a pixel the picture shows as sky took the surface's side of the test in some frames. No clouds
|
||||
// or fog there that frame: a brighter dot along distant ridges at night and at dawn, flickering with the jitter's
|
||||
// phase and never resolved, since it came after DLSS. Measured at 2560x1440 with FSR 4 (frame dumps, a ridge against
|
||||
// the night sky): a ridge pixel brighter than the sky and the mountain beside it in 34 % of the columns with the point
|
||||
// before the fog layer, 15 % with it after the composite (6 % with the upscaler off). These layers are smooth and
|
||||
// follow the scene, so DLSS takes them with the scene's motion; the particles and the dust still go over its picture.
|
||||
// A frame without such a composite before the bloom runs DLSS at the bloom, and the FX_STEADY count holds the point
|
||||
// back as for any frame the rule does not fit.
|
||||
#define FX_STEADY 60u
|
||||
|
||||
static int effects_point(const VkExec *ex) {
|
||||
@@ -1630,6 +1644,8 @@ static int effects_point(const VkExec *ex) {
|
||||
unsigned o[2], s[2];
|
||||
res_sizes(o, s);
|
||||
if (c->width < o[0] || !scene_shaped(c) || !scene_large(c)) return 0;
|
||||
if (!z->image) D.fx_comp = 1; // asked again at the same pass: the same answer
|
||||
if (!D.fx_comp || !z->image) return 0;
|
||||
D.fx_seen = D.fx_open = 1;
|
||||
return D.fx_steady >= FX_STEADY;
|
||||
}
|
||||
@@ -1948,7 +1964,7 @@ void vk_dlaa_frame(void) {
|
||||
D.on = on, D.fg = vk_dlaa_fg_on = fg, D.fsr = fsr;
|
||||
// either way the next DLAA frame starts a new history from an unjittered frame
|
||||
D.reset = 1, D.cam_prev_ok = 0, D.jit_ok = D.jit_used = D.armed = D.done = D.gbuf = D.ended = D.up = 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = 0, D.fx_steady = 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = D.fx_comp = 0, D.fx_steady = 0;
|
||||
D.nodepth = D.glight = D.light_z = VK_NULL_HANDLE;
|
||||
D.hold = 0;
|
||||
return;
|
||||
@@ -1957,7 +1973,7 @@ void vk_dlaa_frame(void) {
|
||||
D.fx_on = dl_active() && cfg_bool("TOTK_DLAA_EFFECTS_AFTER"); // DLSS's point alone
|
||||
if (!D.done) D.frames_missed++;
|
||||
else D.fx_steady = D.fx_seen ? D.fx_steady + (D.fx_steady < FX_STEADY) : 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = D.fx_comp = 0;
|
||||
if (D.jit_used && !D.done) D.hold = 60, D.holds++; // jittered but not resolved: that frame shook
|
||||
else if (D.hold) D.hold--;
|
||||
if (!D.done) D.jit_ok = 0;
|
||||
|
||||
+93
-3
@@ -38,6 +38,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cfg.h"
|
||||
#include "host.h"
|
||||
#include "nvn_api.h"
|
||||
#include "nvn_tex.h"
|
||||
@@ -92,9 +93,11 @@ static void event_cb(void *arg) {
|
||||
}
|
||||
|
||||
// NVNcounterData = {counter, timestamp}; timestamps are Tegra 19.2 MHz ticks (the base of GetSystemTick).
|
||||
static uint64_t counter_last; // the newest timestamp written (completion thread), for the bound below
|
||||
static void write_counter(uint64_t addr, uint64_t counter) {
|
||||
uint64_t rec[2] = {counter, (uint64_t)((unsigned __int128)kern_now_ns() * 12 / 625)};
|
||||
memcpy((void *)(uintptr_t)addr, rec, sizeof rec);
|
||||
__atomic_store_n(&counter_last, rec[1], __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
static void counter_cb(void *arg) {
|
||||
@@ -104,11 +107,21 @@ static void counter_cb(void *arg) {
|
||||
}
|
||||
|
||||
// Reports queued by the replay that the GPU has not finished. The condition of RENDER_COND reads a timestamp one as 0
|
||||
// and a samples-passed one as unknown.
|
||||
// and a samples-passed one as unknown. The replay thread writes the ring; game threads read it too
|
||||
// (vk_counter_timestamp): an entry's fence is stored before its address, so a reader that finds the address sees its
|
||||
// fence or a newer one, and an entry caught in between is judged by the newer fence (pending, the safe side).
|
||||
#define PENDING 256
|
||||
static struct { uint64_t addr, fence; int unknown; } pending[PENDING];
|
||||
static unsigned pending_head;
|
||||
|
||||
static void pending_add(uint64_t addr, uint64_t fence, int unknown) {
|
||||
unsigned i = pending_head % PENDING;
|
||||
__atomic_store_n(&pending[i].fence, fence, __ATOMIC_RELAXED);
|
||||
pending[i].unknown = unknown;
|
||||
__atomic_store_n(&pending[i].addr, addr, __ATOMIC_RELEASE);
|
||||
__atomic_store_n(&pending_head, pending_head + 1, __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
// ---- occlusion counts (samples passed)
|
||||
//
|
||||
// After a SAMPLES_PASSED reset, the first draw of a pass begins an occlusion query (precise when the device has
|
||||
@@ -300,7 +313,84 @@ static void report_counter(VkExec *ex, const p_report_counter *p) {
|
||||
*a = p->addr;
|
||||
vk_completion_add(ex->fence, counter_cb, a);
|
||||
}
|
||||
if (!ex->chunked) pending[pending_head++ % PENDING] = (typeof(pending[0])){p->addr, ex->fence, samples}; // else the scan's
|
||||
if (!ex->chunked) pending_add(p->addr, ex->fence, samples); // else the scan's
|
||||
}
|
||||
|
||||
// ---- timestamps read one frame early (TOTK_SYNC_AHEAD)
|
||||
//
|
||||
// A report lands in guest memory when its submission's fence completes (write_counter). With the frame wait one frame
|
||||
// late the game reads timestamps of work the GPU may not have finished. TotK's GPU time for its dynamic resolution
|
||||
// controller (1.4.3 main+0xa1a50, 1.2.1 main+0x972bac) converts the end and then the begin report of a pair it issued
|
||||
// two updates before, subtracts them unsigned and zeroes both reports. An end not written yet reads 0, and one written
|
||||
// after the zeroing leaves the value of the report before it for the next read: either way the difference wraps to
|
||||
// about 2^64, the controller sees an over-budget frame, and two of those in a row drop the game to its lowest quality
|
||||
// level until 60 good frames bring it back (the half-second blur of #1123). Measured on 1.4.3 (islands): 12-20
|
||||
// wrapped pairs in 40 s with the late wait, none without it.
|
||||
//
|
||||
// Every read is kept consistent with the order of the reports. At each frame wait the bound B becomes the newest
|
||||
// timestamp written so far. A read of a report that holds 0, holds a time after B, or whose newest replayed report is
|
||||
// not done yet reads B instead. Every report done before B was taken is written and holds at most B, so of two reports
|
||||
// in submission order the first never reads later than the second: the difference lies between 0 and what the exact
|
||||
// wait gives, never wrapped. Reports the exact wait would also have covered read as they are. Only the converted value
|
||||
// changes (nvnDeviceGetTimestampInNanoseconds); guest memory, RENDER_COND and samples-passed counts stay as they were.
|
||||
// TOTK_SYNC_AHEAD_TIMESTAMPS: 1 (default; acts only with the frame wait late), 0 off, check: counts what it would
|
||||
// replace and leaves the reads as they are.
|
||||
static uint64_t ts_bound; // 0: off
|
||||
static int ts_mode = -1; // 0 off, 1 on, 2 check
|
||||
static struct { uint64_t reads, zero, later, pending, last_log; } ts_stat; // game threads, approximate counts
|
||||
|
||||
static int ts_on(void) {
|
||||
if (ts_mode < 0) {
|
||||
const char *v = cfg_get("TOTK_SYNC_AHEAD_TIMESTAMPS");
|
||||
ts_mode = !v || !*v ? 1 : !strcmp(v, "check") ? 2 : strcmp(v, "0") != 0;
|
||||
rt_log("sync-ahead: timestamps the game reads before their frame is done read as the newest one written at "
|
||||
"the frame wait: %s", ts_mode == 2 ? "check (counted, not replaced)" : ts_mode ? "on" : "off");
|
||||
}
|
||||
return ts_mode;
|
||||
}
|
||||
|
||||
void vk_counter_frame(void) {
|
||||
if (ts_on()) __atomic_store_n(&ts_bound, __atomic_load_n(&counter_last, __ATOMIC_ACQUIRE), __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
// 1: the newest replayed report to addr is not done
|
||||
static int report_pending(uint64_t addr) {
|
||||
uint64_t done = vk_sync_fence_done();
|
||||
unsigned head = __atomic_load_n(&pending_head, __ATOMIC_ACQUIRE);
|
||||
for (unsigned k = 1; k <= PENDING; k++) { // newest first: the last report to addr decides
|
||||
unsigned i = (head - k) % PENDING;
|
||||
if (__atomic_load_n(&pending[i].addr, __ATOMIC_ACQUIRE) == addr)
|
||||
return __atomic_load_n(&pending[i].fence, __ATOMIC_RELAXED) > done;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ts_log(const char *when) {
|
||||
rt_log("sync-ahead: timestamps %s: %llu reads, %s %llu (zero %llu, after the bound %llu, report not done %llu)", when,
|
||||
(unsigned long long)ts_stat.reads, ts_mode == 2 ? "would be replaced" : "replaced",
|
||||
(unsigned long long)(ts_stat.zero + ts_stat.later + ts_stat.pending), (unsigned long long)ts_stat.zero,
|
||||
(unsigned long long)ts_stat.later, (unsigned long long)ts_stat.pending);
|
||||
}
|
||||
|
||||
uint64_t vk_counter_timestamp(uint64_t addr, uint64_t t) {
|
||||
uint64_t b = __atomic_load_n(&ts_bound, __ATOMIC_ACQUIRE);
|
||||
if (!b) return t;
|
||||
ts_stat.reads++;
|
||||
int why = !t ? 1 : t > b ? 2 : report_pending(addr) ? 3 : 0;
|
||||
if (why == 1) ts_stat.zero++;
|
||||
else if (why == 2) ts_stat.later++;
|
||||
else if (why == 3) ts_stat.pending++;
|
||||
uint64_t now = kern_now_ns();
|
||||
if (now - ts_stat.last_log > 30000000000ull) { // every 30 s of host time
|
||||
if (ts_stat.last_log) ts_log("so far");
|
||||
ts_stat.last_log = now;
|
||||
}
|
||||
return why && ts_mode == 1 ? b : t;
|
||||
}
|
||||
|
||||
void vk_counter_log(void) {
|
||||
static int once;
|
||||
if (ts_mode > 0 && !__atomic_exchange_n(&once, 1, __ATOMIC_RELAXED)) ts_log("over the run");
|
||||
}
|
||||
|
||||
// ---- conditional rendering
|
||||
@@ -694,7 +784,7 @@ int vk_exec_xfer_scan(VkExec *ex, uint32_t op, const void *payload) {
|
||||
VkMemSpan m;
|
||||
if (!nvn_gpu_only(p->addr) && !vk_mem_resolve(p->addr, sizeof(NVNcounterData), &m)) break; // the recording stops
|
||||
if (samples) oq_report_state(ex);
|
||||
if (!nvn_gpu_only(p->addr)) pending[pending_head++ % PENDING] = (typeof(pending[0])){p->addr, ex->fence, samples};
|
||||
if (!nvn_gpu_only(p->addr)) pending_add(p->addr, ex->fence, samples);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-6
@@ -103,7 +103,7 @@ static struct {
|
||||
unsigned toggle;
|
||||
uint64_t frame_id, last_prep_ns, made;
|
||||
// settings read at start (vk_fg_init)
|
||||
int workers, sync_ahead, hdr, test, debug, times;
|
||||
int workers, hdr, test, debug, times;
|
||||
uint64_t shot_at; // TOTK_FG_SHOT: the first present shot, or (shot_w) the first after that world time
|
||||
int64_t shot_w;
|
||||
char shot_dir[260];
|
||||
@@ -295,7 +295,6 @@ static void start(void) {
|
||||
}
|
||||
g.win_fmt = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
g.workers = cfg_int("TOTK_REPLAY_WORKERS");
|
||||
g.sync_ahead = cfg_bool("TOTK_SYNC_AHEAD") && strcmp(cfg_value("TOTK_SYNC_AHEAD"), "check") != 0; // check: exact
|
||||
g.hdr = vk_hdr_wanted();
|
||||
g.test = knob_int("TOTK_FG_TEST");
|
||||
g.debug = knob_int("TOTK_FG_DEBUG");
|
||||
@@ -329,14 +328,16 @@ extern "C" int vk_fg_wanted(int dlss) {
|
||||
if (vk_fg_engine() != VK_FG_FSR3) return 0;
|
||||
if (!started) start(); // turned on in the menu: the contexts now; the first prepare makes them for the scene
|
||||
if (!g.live || g.failed) return 0;
|
||||
// the inputs are this frame's, recorded in replay order: one frame in flight more or chunks recording side by
|
||||
// side are not handled yet
|
||||
int why = dlss ? 1 : g.workers > 0 ? 2 : g.sync_ahead ? 3 : g.hdr ? 4 : 0;
|
||||
// the inputs are this frame's, recorded in replay order: chunks recording side by side are not handled yet.
|
||||
// sync_ahead only moves the game's frame wait; the replay and the presents keep their order, and the replay's
|
||||
// next submission waits until the present thread submitted the blit (vk_backend.c submit_sync, vk_present_drain),
|
||||
// so out[] and hl[] alternate safely with it on.
|
||||
int why = dlss ? 1 : g.workers > 0 ? 2 : g.hdr ? 3 : 0;
|
||||
if (why) {
|
||||
if (!(g.said & 1u << why)) {
|
||||
g.said |= 1u << why;
|
||||
static const char *const r[] = {"", "DLSS runs (dlaa = 1)", "the replay records in chunks (replay_workers > 0)",
|
||||
"sync_ahead = 1", "HDR output (hdr = 1)"};
|
||||
"HDR output (hdr = 1)"};
|
||||
rt_log("fg: frame generation off while %s", r[why]);
|
||||
}
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ int vk_fg_active(void);
|
||||
void vk_fg_release(void);
|
||||
|
||||
// vk_dlaa.c vk_dlaa_frame, once per present: 1 when frame generation follows the scene in the next frame. 0 while
|
||||
// DLSS runs (dlss), with replay workers or sync_ahead = 1 (the inputs are per frame and recorded in replay order),
|
||||
// DLSS runs (dlss), with replay workers (the inputs are per frame and recorded in replay order),
|
||||
// with HDR output, or while the game shows a menu without its world (vk_fg_menu); each reason is logged once.
|
||||
int vk_fg_wanted(int dlss);
|
||||
// vk_dlaa.c, the game's thread at each present: 1 while the map or a loading or event fade is open (sampled there,
|
||||
|
||||
Reference in new issue
Block a user