Merge Tobim6's work for older graphics cards: mesh shaders emulated with compute, video memory kept within the heaps' budgets, staged mirror uploads and the submit wait that goes with them.

Conflicts: the settings key lists take both sides; frame generation keeps the camera-cut handling and logs its counters every 600 frames with the cuts among them; the pass-time mark moves into draw_viewport; mo_desc keeps the pose depth and notes the reader.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 12:14:58 -05:00
43 changed files with 4748 additions and 266 deletions

View File

@@ -288,6 +288,9 @@
# which game memory gets no copy in video memory (memory = mirror), which costs far more frame time than a texture
# uploaded again. 0: textures never give way for video memory.
# tex_vram_pressure = 80
# Textures the game released that are kept as they are (1 to 16384); past this count only those that lose nothing
# when dropped go. Default: one per 2 MB of the video memory budget, 2048 to 8192. Read at start.
# tex_released_max = 4096
# Megabytes of this process's commit above which the log says so. Windows counts video memory against the commit;
# with a discrete GPU the video memory in use is left out of the comparison, since it is not in RAM. Textures no longer
# give way at this bound: dropping one lowers both sides of the comparison alike, so nothing they could do brought the
@@ -421,6 +424,20 @@
# 3D render scale: the scene's size relative to the game resolution, game (5/6, the game's own 1600x900 at 1080p) or
# a percentage (25 to 400, at most 4096 pixels a side); above 100 supersamples the scene (anti-aliasing). Read at start.
# render_scale = game
# Discrete GPUs: a game memory pool whose copies to and from video memory each frame reach this percentage of its size
# is read and written by the GPU in system memory instead (0: every pool keeps its video memory copy). For GPUs and
# buses short of bandwidth; on an RX 580 the pools the game refills every frame cost about 8 ms a frame in copies.
# mirror_hot = 0
# 2: the next Rebuild the Game compiles the game's code at -O2 instead of -O1 (faster game threads on a slower CPU, a
# build several times longer). Read by tools/make_game.py; the environment variable NX2NAVI_GUEST_OPT wins.
# guest_opt = 1
# GPUs without mesh shaders (VK_EXT_mesh_shader: AMD before RDNA 2, NVIDIA before Turing): 1 runs the game's mesh
# and task shaders (grass and other foliage) as compute shaders and draws what they make; 0 skips those draws. The
# arena for their vertices and triangles is mesh_emu_mb MiB of video memory, with mesh_emu_tasks task records (3 KiB
# each) per submission; with trace = perf the log says how much a submission used. Read at start.
# mesh_emulation = 0
# mesh_emu_mb = 256
# mesh_emu_tasks = 16384
# Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening
# from 0 (off) to 100. Changes while the game runs take effect at once.
# upscaler = fsr