mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 22:15:57 +00:00
Merge main (0.2.1) into the DLSS branch
Conflicts: the known-key and section lists in cfg.c keep both sides; vk_backend.c, vk_device.c and vk_exec_draw.c include platform.h and vk_dlaa.h; create_instance takes the window's instance extensions from gfx_window_vk_extensions as on main, in a 12-entry array for NGX's.
This commit is contained in:
commit
9e079622dc
144 files changed
+9859
-4841
No files matched your search
+14
-5
@@ -91,11 +91,19 @@ static inline void ret_d(Cpu *c, double d) { uint64_t b; memcpy(&b, &d, 8); c->v
|
||||
typedef struct { const char *name; GuestFn fn; } RtHostEntry;
|
||||
#define RT_CAT2(a, b) a##b
|
||||
#define RT_CAT(a, b) RT_CAT2(a, b)
|
||||
// File-scope declarations; fn must be declared before. The loader binds them by symbol name.
|
||||
// File-scope declarations; fn must be declared before. The loader binds them by symbol name. The entries of every
|
||||
// object file meet in one section per kind, which hostfn.c walks: on PE/COFF ".ovr$m", which the linker sorts between
|
||||
// hostfn.c's ".ovr$a" and ".ovr$z" markers; on ELF "totk_ovr", which the linker brackets with __start_totk_ovr and
|
||||
// __stop_totk_ovr.
|
||||
#ifdef _WIN32
|
||||
#define RT_HOST_SECTION(kind) section("." #kind "$m")
|
||||
#else
|
||||
#define RT_HOST_SECTION(kind) section("totk_" #kind)
|
||||
#endif
|
||||
#define HOST_OVERRIDE(sym, fn) /* replaces sym in every GOT/GLOB_DAT/ABS64 of every module */ \
|
||||
__attribute__((used, section(".ovr$m"))) static const RtHostEntry RT_CAT(rt_ovr_, __COUNTER__) = {sym, fn}
|
||||
__attribute__((used, RT_HOST_SECTION(ovr))) static const RtHostEntry RT_CAT(rt_ovr_, __COUNTER__) = {sym, fn}
|
||||
#define HOST_OBSERVER(sym, fn) /* JUMP_SLOT only; fn calls rt_original(c) */ \
|
||||
__attribute__((used, section(".obs$m"))) static const RtHostEntry RT_CAT(rt_obs_, __COUNTER__) = {sym, fn}
|
||||
__attribute__((used, RT_HOST_SECTION(obs))) static const RtHostEntry RT_CAT(rt_obs_, __COUNTER__) = {sym, fn}
|
||||
uint64_t hostfn_register(const char *name, GuestFn fn); // synthetic address; before hostfn_seal only. The same
|
||||
// (name, fn) pair returns the same address
|
||||
GuestFn hostfn_override(const char *name); // NULL if none
|
||||
@@ -285,13 +293,14 @@ void rt_boot(void); // boot.c
|
||||
// modules, registers its host functions, then seals (hostfn_seal, or implicitly at the first rt_call). Return the
|
||||
// process exit code.
|
||||
int probe_cfg(void); // cfg_probe.c
|
||||
int probe_dpi(void); // dpi_probe.c
|
||||
int probe_dpi(void); // dpi_probe_win.c (Windows only)
|
||||
int probe_loader(void), probe_kernel(void), probe_ipc(void), probe_services(void), probe_fs(void);
|
||||
int probe_gfx_abi(void); // gfx_abi_probe.c
|
||||
int probe_vkdevice(void); // vk_device.c
|
||||
int probe_nvn(void), probe_nvn_tex(void); // nvn_probe.c, nvn_tex_probe.c
|
||||
int probe_window(void); // gfx_window.c
|
||||
int probe_window(void); // gfx_window_probe.c
|
||||
int probe_shader(void); // gfx_shader.c
|
||||
int probe_census_dir(char *dir, size_t n); // gfx_shader_probe.c: build/<version>/shaders for the probes
|
||||
int probe_vkmem(void), probe_vkexec(void), probe_astc(void); // tex_probe.c, vk_exec_probe.c, astc_probe.c
|
||||
int probe_movie(void); // movie_probe.c: host VP9 movie::Decoder on one RomFS movie
|
||||
int vk_pipeline_prepare_shaders(void); // vk_pipeline.c: --prepare-shaders (tools/prepare_shaders.py)
|
||||
|
||||
Reference in new issue
Block a user