mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 20:25:57 +00:00
Build and run the runtime natively on Linux.
Shared runtime code now goes through runtime/platform/platform.h, implemented by platform/win32.c and a new platform/linux.c: futex locks, a userfaultfd and PAGEMAP_SCAN write watch, signal-based async preemption, our own fiber switch, and a SIGSEGV handler for the thaw and crash hooks. The window, input, menu and software keyboard get SDL3 back ends beside the Win32 ones, with the swapchain (gfx_present.c) and input merging (input.c) shared. SHA-256 replaces BCrypt, ELF builds get their own override sections, and the build tools gain Linux branches. On Linux the selftest and the gfx-abi, astc, nvn and window probes pass. probe-vkmem still fails: imported guest memory cannot be write-watched on Linux, which the shadow buffers in vk_memory.c will address.
This commit is contained in:
1 parent
c3b9a4e7f6
commit
1d51343ac1
102 files changed
+7721
-4424
No files matched your search
+4
-4
@@ -1,6 +1,6 @@
|
||||
// The in-game menu core: Dear ImGui state, the event queue the window adapter fills, gamepad navigation, the Vulkan back
|
||||
// end on our device and the menu's pages. Free of any window system (menu.h). ImGui runs on the present path only,
|
||||
// under gfx_window.c's present lock; the event functions only queue.
|
||||
// under gfx_present.c's present lock; the event functions only queue.
|
||||
//
|
||||
// The Vulkan set-up follows LAS Recomp's runtime/nvn/vulkan/imgui_glue.cpp (https://github.com/peiikai/LASRecomp @
|
||||
// da35b83a9611d046a9a681aae668d7085954d37f, MIT, Copyright (c) 2026 Peiikai): dynamic rendering into the swapchain
|
||||
@@ -233,7 +233,7 @@ static int vk_up(const MenuTarget *t) {
|
||||
ii.Queue = t->queue;
|
||||
ii.DescriptorPoolSize = 16;
|
||||
ii.MinImageCount = 2;
|
||||
ii.ImageCount = 4; // vertex buffers rotate per recorded frame: more than gfx_window.c's 2 frames in flight
|
||||
ii.ImageCount = 4; // vertex buffers rotate per recorded frame: more than gfx_present.c's 2 frames in flight
|
||||
ii.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
|
||||
ii.UseDynamicRendering = true;
|
||||
g_vk_fmt = t->format;
|
||||
@@ -690,7 +690,7 @@ static void tab_advanced(float scale) {
|
||||
static char rec_path[600]; // the recording goes beside the log
|
||||
if (!rec_path[0]) {
|
||||
char dir[512];
|
||||
snprintf(rec_path, sizeof rec_path, "%s\\input-record.txt", sysinfo_log_folder(dir, sizeof dir) ? dir : ".");
|
||||
snprintf(rec_path, sizeof rec_path, "%s/input-record.txt", sysinfo_log_folder(dir, sizeof dir) ? dir : ".");
|
||||
}
|
||||
row_set_or_not("TOTK_INPUT_RECORD", UI_MENU_INPUT_RECORD, UI_MENU_INPUT_RECORD_DESC, rec_path);
|
||||
if (opt_button("##open_log", UI_MENU_OPEN_LOG, UI_MENU_OPEN_LOG_DESC, action_value(log_note, UI_MENU_OPEN_LOG))) {
|
||||
@@ -935,7 +935,7 @@ static void perf_label(UiTextId label, const ImVec4 &c) {
|
||||
static float perf_gb(float mb) { return mb < 0 ? -1 : mb / 1024; }
|
||||
|
||||
// The picture lines: the window, the game image the present shows and the 3D scene it holds (resolution.c), how the
|
||||
// present scales the image to the window (gfx_window.c, the last present), the frame limit and the presentation mode
|
||||
// present scales the image to the window (gfx_present.c, the last present), the frame limit and the presentation mode
|
||||
// in use.
|
||||
static void perf_picture(const MenuTarget *t, const ImVec4 &c) {
|
||||
unsigned out[2], scene[2];
|
||||
|
||||
Reference in new issue
Block a user