Commit Graph
1180 Commits
Author SHA1 Message Date
Valiantsin DzerakhandClaude Opus 5.5 c418dbef04 Merge task/pjournal: a device loss logs the last descriptor pool events, and a pool with two owners is logged at once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 18:55:52 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d6715029e5 A device loss logs the last descriptor pool events, and a pool with two owners is logged at once
The replay keeps a ring of the last 1024 descriptor pool events (a CbRes made, a pool handed to a CbRes from the spare
list or new, a pool reset or destroyed), a few per submission and nothing per draw. vk_device_fault_report logs the
newest 256 after a device loss. Each pool's owner is checked under spare_lock as the pool is handed out and as it is
reset: a pool handed out while another CbRes holds it, or reset by a CbRes that does not hold it, is logged at once
with the 64 events before it. On a GTX 1050 Ti with TOTK_BIND_INC on, the validation layer reported a descriptor pool
reset while a command buffer used it, then binds of its sets, before a device lost that slower diagnostic runs did
not bring back; the next one names the pool's owners.

--probe-vkexec gains a set batch part (60 submissions of batched sets with splits and empty submissions beside them),
a pool owner part (one pool handed to two CbRes, then reset by the one that no longer holds it: two conflicts) and
calls the device loss report on the working device to check that it comes out and returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 18:55:39 +03:00
Valiantsin DzerakhandClaude Opus 5.5 434533aa11 Merge pull request #1207: the memory probe's test textures carry their pool flags, so --probe-vkmem passes again (shenjackyuanjie)
Only the fix commit is taken; the PR branch carries 88 unrelated fork merges. On top: the slot redirect check follows
the format rule of 1c5c6fdb, which the pool-flags failure had hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:12:47 +03:00
Valiantsin DzerakhandClaude Opus 5.5 810cf2c2bb The memory probe's slot redirect check follows a texture of the slot's own format
Since 1c5c6fdb a finalized slot follows only a live entry of its texel format at its storage; the check still put an
RGBA8 texture over a BC1 slot and expected the slot to follow it. The live texture is now BC1 of another size, and a
second check puts an RGBA8 texture at the same storage and expects the slot to stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:12:40 +03:00
Valiantsin Dzerakh fad20c0fcd Up version 0.4.1 2026-11-15 11:08:49 +03:00
shenjack 74bb01d2af Preserve pool flags in the Vulkan memory probe texture fixture 2026-11-15 11:07:25 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c26c3a04bc Merge pull request #1203: on AMD's Windows drivers objects against clouds and fog lose the light blocky fringe round their silhouettes; a discard demotes the fragment as on the Switch (codexx-dev, #164)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:38:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f5e560d176 Merge pull request #1200: with contact shadows on, rock faces turned away from the sun no longer go dark and smoky, and fewer dark strokes cross the grass (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:08:44 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6ff98e2d61 Contact shadows take the in-image neighbour on the screen border when they find the surface normal
On the border the clamped neighbour is the pixel itself, so the nearer-in-depth pick took a zero difference and
normalize() returned NaN; `lit <= 0.0` is false for NaN, so whether those pixels were marched and what they wrote
depended on how the driver clamps NaN. The border now uses the side inside the image, and a NaN gate skips the march.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:05:54 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f76a24a7cf Merge pull request #1200 into task/pr1200: with contact shadows on, rock faces turned away from the sun no longer go dark and smoky in haze and fog (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:34:39 +03:00
Valiantsin DzerakhandClaude Opus 5.5 33bfd29ebb Merge pull request #1197: a Calibrate gyro button on the Controls tab removes the aim drift of a controller with a gyro bias; each controller keeps its own, and a calibration where the pad moved is rejected (palxex)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:32:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0efa904d90 A new controller no longer inherits the previous one's gyro bias, and a calibration where the pad moved is rejected
The bias reset in sensors_ready only ran when sensor_pad was nonzero, but scan_pads zeroes it on every disconnect,
so a pad connected after another one kept the old pad's bias, and an attempt still collecting finished on the new
pad under the old pad's name. The bias was also loaded only once, at the first StartSixAxisSensor.

- input.c pad_bias_select runs for every pad the sensor code sees: it drops the old bias and attempt, then loads the
  saved bias when gyro_bias_pad names this pad. scan_pads drops them on disconnect. The bias loads with
  gyro_calibration off too, so turning the switch on mid-run applies it.
- The pad identity is the name plus an FNV-1a hash of SDL's serial when the pad reports one, so two pads of one
  model no longer share a bias; the hash keeps the Bluetooth address out of totk.ini and the log.
- An attempt skips 0.5 s of samples (the button press shakes the pad), then averages 1 s. It is rejected when the
  largest per-axis standard deviation exceeds 0.04 rad/s; a steady bias of any size passes. The row then says the
  controller moved (new UI_MENU_GYRO_CALIBRATE_MOVED in all four catalogs) and the bias in effect stays.
- The timeout counts 5 s without a sample, not 5 s from the start.
- Calibrate gyro starts the sensor thread when the game has not yet (title screen) instead of doing nothing.
- Row states are an enum (MOTION_CALIB_*); motion_calibrate_start takes the clock, and only the gamepad's fusion
  instance writes totk.ini, so --probe-services now checks a measured bias, a rejected attempt and the timeout.
- The duplicate copy_name in motion_fusion.c is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:32:05 +03:00
Valiantsin Dzerakh 0a792f22c1 Merge pull request #1197 into task/pr1197: a Calibrate gyro row on the Controls tab removes the aim drift of a controller with a large gyro bias (palxex) 2026-11-15 09:21:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 7b5265d1fd Discard as demote runs only where shaderDemoteToHelperInvocation is enabled, and the log says whether it is on (#164)
vk_device.c create_device records the feature from the Vulkan 1.3 chain it passes to vkCreateDevice. spirv_demote
leaves the module as the translator wrote it without the feature, also under TOTK_DEMOTE=1, since the
DemoteToHelperInvocation capability needs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:19:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 db26ab1abb Merge pull request #1194: a charged attack that hits no longer crashes above 60 fps when the weapon's hit record map is full (project-snail)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:12:55 +03:00
Valiantsin DzerakhandClaude Opus 5.5 fda4e62405 Merge pull request #1203 into task/pr1203: objects against clouds and fog lose the light blocky fringe on AMD's Windows drivers (codexx-dev)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:08:13 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c8a6b91c61 The empty hit list sites' comment names the functions, the stale slot and the registers the skipped path reads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:04:34 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8fde60d854 Merge pull request #1194 into task/pr1194: a charged spear attack that hits no longer crashes above 60 fps (project-snail)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:04:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b642c849ef Merge task/fpslim: the FP fast paths of the game's code are smaller with the same results, 8% fewer instructions in the hottest functions (#381)
The directed-RMode test folds into the result compare through a per-thread threshold, vector slow paths take
their operands through the Cpu instead of stack copies (___chkstk_ms leaves the large lifted functions), the
static FP helpers use preserve_most, and the slow paths rerun only the failing lanes. Bit-identical to the old
headers: 14.85M edge cases under every FPCR mode on v3 and v2, and 13.4G FP ops compared in a check-mode build in
the town and fight2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:54:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 2ab5329909 The NVN probe's Cpu gets the FP result check threshold too
Its static Cpu ran guest code with a zeroed threshold, which lets +-smallest normal pass the check unexamined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:54:22 +03:00
codexx-dev fc87618233 Demote instead of OpKill on AMD's drivers so a discard keeps the quad's derivatives defined (#164) 2026-11-14 21:25:22 -03:00
itaskaev2andClaude Opus 5.5 a3fee27cfe Leave surfaces turned away from the sun out of the contact shadows
The contact shadow march darkened the whole lit colour of every pixel whose ray toward the sun passed behind
geometry. On a face turned away from the sun the ray runs into that face at once, so every such face within 80 m
was darkened by the full strength, although it gets no direct sunlight to lose: what was darkened was its ambient
light and the fog the composite had already added. In hazy scenes (the Gerudo sandstorm) the shaded rock faces and
the undersides of overhangs showed as dark smoky silhouettes in the haze, and objects such as a wagon lost their
fogged look. The shader now takes the surface normal from the linear depth and scales the shadow by how far the
surface faces the sun: none for faces turned away, a growing share from a grazing angle on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:35:24 +01:00
Valiantsin DzerakhandClaude Opus 5.5 5c48f62fca The FP fast paths of the lifted code check FPCR.RMode inside the result compare and pass vector slow-path operands through the Cpu
The result check of every scalar and vector FP op compares |r| against a per-thread threshold in the Cpu (fp_th_s,
fp_th_d): the smallest normal in round-to-nearest, NaN under a directed RMode, so a directed mode sends every result
to the redo path and the separate load and test of c->fpcr per op goes. rt_fpcr_threshold sets it; rt_fpcr_sync
calls it on every host, and the Cpu inits and the fiber switch's fpcr copy call it too.

The vector slow path FN(vredo) takes its operands from c->fp_arg instead of three stack copies per call site, which
takes ___chkstk_ms out of the large lifted functions (275 call sites in main to 5). It reruns only the lanes that
failed the check. A NaN result in round-to-nearest goes from redo straight to fix with the FZ-flushed operands. The
static FP helpers use preserve_most, so their cold call sites do not spill the caller-saved registers.

Results are bit-identical to the old headers (equivalence harness of build/v143-genko/static2, 200M cases).
On the 42 hottest 1.4.3 functions: instructions -8.2%, bytes -8.8%, hot-path instructions -4.3%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 00:31:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 94eb3d4628 Merge pull request #322: Steady detail under load, a switch that stops the game lowering model and texture detail when the frame rate drops (ProSep)
The PR's level-of-detail distance part is left out: it made no visible difference in play, and the emulator mod it came from was dropped there as a placebo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:07:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5f1d74023b Remove the lod_range setting and the lodrange patch set; lod_steady stays
Playtests showed no visible difference from lod_range, and the emulator mod scene dropped the same change as a placebo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:07:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9d05ccd920 Merge task/padaudio: the DualSense touchpad click is a bindable button, and the audio output device can be chosen in the menu and switches while the game runs (#482, #1014)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:54:36 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6347b8262a The audio output device can be chosen on the Sound tab and in totk.ini (audio_device), and a change moves the sound to it while the game runs (#1014)
TOTK_AUDIO_DEVICE names the device as SDL lists it; unset, empty or default keeps the system default and the same open
as before. audio_mixer.c output_open opens the named device, or the default with one log line when it is not
connected. Once a device is chosen, an output worker thread (output_worker) owns the SDL stream: on a cfg change and
once a second it resolves the name again and output_switch opens the new device with the same spec, destroys the old
stream (which waits for its callback), restarts the prefill and resumes. The render thread only wakes or starts the
worker (output_watch), so the game's audio never waits for a device open. A chosen device that disappears falls back
to the system default and comes back within a second of being plugged in again. TOTK_AUDIO_CHANNELS=auto reads the
channels of the device chosen at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:28:42 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0ce53aa7c7 The DualSense and DualShock 4 touchpad click is a bindable gamepad input named touchpad, shown and captured on the Controls tab (#482)
PAD_TOUCHPAD follows the paddles in input_map.h and reads SDL_GAMEPAD_BUTTON_TOUCHPAD in input.c pad_physical, so
input_capture sees the click when a Controls cell waits for a press (#852 had no pad id to report it). It is unbound by
default; pads without a touchpad never report it held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:19:51 +03:00
Valiantsin DzerakhandClaude Opus 5.5 cf3acd0a2f Model detail range replaces the distant detail switch: lod_range scales the depth at which models leave their detailed level (1x, 1.5x, 2x, 3x or max) (#949)
The pick patched before (main+0x1ee8424) is reached through its vtable only when the method is overridden; the culling
passes run about 20 inlined copies of it, so the switch changed almost nothing. The lodrange set patches the two places
per version that compute the level depth B at model setup (the setter and its inlined copy); the slope of the coarser
levels follows from B there, and max takes B = 1e30. The menu row sits under Grass range, with Steady detail under load
after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:58:48 +03:00
palxex dc13b194ce Add gyro bias calibration for the six-axis sensor
The yaw axis has no gravity reference, so it drifts with the gyro's
manufacturing bias. Two controllers of the same model can drift in
opposite directions, and the sensor fusion had no way to estimate or
remove the offset: aiming with motion turned slowly on its own and
needed constant correction.

A Calibrate gyro row on the Controls tab collects 250 gyro samples
(about a second) while the controller is held still, averages them per
axis into a bias, subtracts that bias from every sample before the
fusion integrates it, and restarts the angle so the estimate starts
clean. Collection has no motion threshold: a controller whose bias
exceeds any absolute threshold would otherwise never finish, which is
how the first version of this stalled with no way out. Five seconds
without the expected samples ends the attempt, from the sample path and
from the menu alike, so a sensor thread that stops feeding it is
reported instead of leaving the row on "calibrating". The first raw
sample and the final bias are logged, so a report carries the numbers
that were measured.

The row's value says where the controller stands: calibrating,
"<controller>, calibrated" once it is done or when the bias was loaded
from totk.ini at start, and "calibration failed" when an attempt timed
out with no bias in effect. A controller change cancels a calibration
that is in progress and clears the bias and the label, so neither is
carried over to the new controller.

The behaviour sits behind gyro_calibration (the Controls tab's "Gyro
bias calibration", default on, live): off, the fusion takes the raw
gyro, an attempt in progress is dropped, and nothing is loaded at
start, while the saved keys stay in totk.ini so turning it back on
restores the last calibration.

The bias and the controller's name go to totk.ini when calibration
completes, outside the fusion's lock, and are loaded at the next start
only when the connected controller has the same name.

Tested with a Switch Pro Controller on the 1.4.3 build: the log shows a
z-axis bias of 0.139 rad/s (8 degrees per second), calibration finishes
in about a second, the yaw drift is gone, and the row reports each state.
2026-11-15 02:26:30 +08:00
Valiantsin DzerakhandClaude Opus 5.5 517a161457 Merge pull request #322: distant model detail settings, brought up to date with dev (ProSep)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:16:19 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3858ad4b51 Merge task/pack: lifted functions skip the function-entry check except where the runtime watches them, and host calls are no longer counted outside probes and traces (#381)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:03:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f1a771e493 Merge task/bindinc: a draw rebuilds only the bindings, shaders and pipeline state whose inputs changed since the draw before, about 3% less render-thread time on the CPU (#381)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:03:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 2f32f21f5c The incremental draw preparation is on by default, and bind_inc and memx are listed in totk.ini.example (#381)
TOTK_BIND_INC had no settings row, so unset meant off. It now has one with default 1, like TOTK_MEMX: 0 or off turns
it off, check keeps the comparison mode. The check mode found 0 differences on 13 scenes (town, fight2, Kakariko,
Great Sky Island, Depths lit and dark, a shrine, rain, a cave, evening, a field, the menus, entering a building).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:03:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 99878f3c55 Log the first guest write of a directed FPCR rounding mode, with its caller
Diagnostic only. The lifted MSR FPCR (recomp/lifter.py) now also tests the stored RMode bits (cpu.h RT_FPCR_NOTE); the
first nonzero one is logged once by main.c rt_fpcr_rmode with the caller of the writing function. The write itself
behaves as before. Whether the line ever shows decides if the directed-rounding slow paths of runtime/simd.h are dead
in the game. 10 MSR FPCR sites on 1.4.3; nothing on the other paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:05:19 +03:00
Valiantsin DzerakhandClaude Opus 5.5 2d5879f9e2 Host-function calls are counted only by the probes and under TOTK_TRACE=host
hostfn_entry bumped a per-thread call counter on every host-function call (a TLS load, two branches, a load and a
store) for readers that only the probes and the boot checkpoint line have. The count now sits beside the first-call
trace in a cold hostfn_watch, behind the same single test of rt_trace: RT_TRACE_HOSTCOUNT, switched by hostfn_count,
which --probe-kernel (test_lifted_ticks reads the count) and --probe-ipc turn on. The boot checkpoint line leaves the
host-call count out when nothing counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:05:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6a23628771 Lifted functions check the function-entry hook only where the runtime watches them, on 1.4.3 only the render size setup
FN_ENTER (runtime/cpu.h) opened all 282,702 lifted functions of 1.4.3 with a load of g_fnprof and a branch, for one
reader: runtime/resolution.c res_fn_hit, which waits for main+0x585bd0 (SET_RENDER_SIZE). A `hook` line of the patch
table (recomp/patches.py) now names the functions that keep it; patches-v143.txt hooks main+0x585bd0, and gen.py stops
on a hook that is no function start. Tables without hook lines (1.2.1, 1.1.0) keep FN_ENTER in every function, and
gen.py --fn-enter-all puts it everywhere for a whole-game function-entry profile. The hooked addresses of a chunk are
in its lift cache key (tests/lift_cache_test.py test_hooks_are_in_the_key).

On 1.4.3 the generated C is otherwise byte-identical to dev's (282,701 FN_ENTER lines fewer, nothing else differs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:05:08 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d52c16e651 Merge dev into task/bindinc: the incremental binding keeps its logic and takes dev's inline compares and copies (TOTK_MEMX)
The ten conflicts in runtime/vk_exec_draw.c were dev's memcmp/memcpy -> MX_EQ/MX_NE/MX_CPY swap on lines task/bindinc
had rewritten. Each keeps the task/bindinc code with the swap applied to its hot-path compares and copies (push and set
signature compares, the shader memo's pipe compare, the pipeline memo and recorded-state compares, the vertex
attribute and stream lists). The check-mode compares that call bi_mismatch keep memcmp as the reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 18:47:31 +03:00
project-snail f3efc5806c Send an empty charged-attack hit list to the game's own count == 0 check
The weapon's hit-record pool holds 10 records, and one charged swing above 60 fps fills it: the
insert fails, and the list of hits made this frame stays empty. main+0x2906de0 then reads the empty
list's slot, which holds a stale stack value, and passes it to the hit handler before the game's own
count == 0 check would return; the stale value here pointed at the temp hit map and the read at
main+0x870158 faulted reading 0x100000000a.

Both count == 0 branches now go to main+0x2906df0, the game's check, under the realtime set. A
non-empty list is unchanged, and below 60 fps the pool never fills.

Verified on 1.4.3: a charged spear attack on an enemy at 120 and 144 fps no longer faults, and the
damage at 60 and 120 fps matches the build without this patch.
2026-11-14 21:00:38 +08:00
Valiantsin DzerakhandClaude Opus 5.5 97d12240f4 Merge task/cheatsrebuild: on the Linux AppImage "Rebuild the game now" starts the setup AppImage itself, so code cheats get built in, and a rebuild that does not start is tried again (#560, #403)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:13:04 +03:00
Valiantsin DzerakhandClaude Opus 5.5 35c590bacd Start the Linux rebuild through the AppImage file, not its vanished mount
The setup wrote the path of its Python inside the AppImage mount into
build-cache/rebuild.txt. The mount is gone once the setup exits, so the
game could not start the rebuild for code cheats and ExeFS patches, kept
its old code, and rebuild.skip then stopped every later attempt. The
command now starts $APPIMAGE --rebuild <install folder>, and a rebuild
that does not start leaves no rebuild.skip (#560, #403)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:12:35 +03:00
Valiantsin DzerakhandClaude Opus 5.5 04ccb9cd36 Merge task/pr996: pull request #996, the lift redoes only the chunks whose inputs changed, so a cheat or mod change lifts in seconds instead of a minute or more (Wesley-CR)
On 1.4.3 the cached lift and a --no-cache lift give byte-identical C, tables and folded.txt; a run with unchanged
inputs reuses all 418 chunks in 2.8 s (92 s cold), and one patch site removed lifts one chunk in 3.7 s with the same
output as a full lift. tests/lift_cache_test.py passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:16:30 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3fc643cb65 Merge pull request #996 into task/pr996: lift again only the chunks whose inputs changed
The conflict in recomp/gen.py was the Usage line and the options next to --v-locals and --v-trust; both are kept, and
v_locals and v_trust are in the Emitter options the cache key holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:16:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b2355be341 Merge task/memx: the replay compares and copies its per-draw state inline instead of calling the C library, about 5% less render-thread time on the CPU (#381)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:35:49 +03:00
Valiantsin DzerakhandClaude Opus 5.5 354887a2a3 The replay's per-draw compares and copies run inline instead of calling ucrtbase memcmp and memcpy (TOTK_MEMX)
runtime/memx.h: MX_EQ and MX_CPY compare and copy with 32-byte loads in the caller; a constant size unrolls, a variable
one loops without a call. Used for the pipeline memo state and the recorded dynamic state (prepare_draw), the shader
answers (shader_for, which also compares the stored hash first), descriptor signatures and push sets (bind_resources),
c0 and support buffers, the uniform update copies, the vertex attribute and stream binds, pipe_find, the dynamic state
delta, nvn_hm_get and the recorder's tail_copy. TOTK_MEMX=1 (default) takes the inline forms, 0 keeps memcmp/memcpy,
check runs memcmp and logs any compare the inline form answers differently.

Machine A, 4 cores, 1080p, bindinc on both sides: Lookout Landing replay 9.64 -> 9.16 ms over 4+4 runs (each ABBA block
-0.40 and -0.55 ms), Kakariko 9.04 -> 8.38 ms over 2+2. Check mode on dev: Lookout Landing pan, 0 mismatches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:35:29 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1ada4a7586 Wake the recorder through the fenced check on every publish (#1174)
pub_now stored head and read Q.sleeping with no fence between them, while rec_main sets Q.sleeping and then reads head.
x86 may read Q.sleeping before the head store is visible, so both sides could miss each other and the recorder slept
out its 2 ms timeout with packets waiting. Since rec_submit returns without a drain (TOTK_REC_ASYNC=1), its publish is
the last of a submission, and the present, uploads and readbacks waited for that timeout in rec_queue_wait: a #1174 log
on an RX 9070 XT shows 1.6 to 3.4 ms a wait late in the session against 0.04 ms at its start. pub_now now wakes through
wake(), which has the fence. Cost: one locked instruction per publish, about 2300 a frame in that scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:15:01 +03:00
Valiantsin DzerakhandClaude Opus 5.5 42b36b0e0b Merge task/prfix: pull requests #1184 (with #1161), #1162, #1163, #1164 and #1165; with DLSS/DLAA the picture no longer flickers, the mist no longer flashes, the inventory icon is no longer stretched over the menu and the quick weapon menu no longer closes on a dark frame; the chunked replay no longer leaves a black strip by the quick menu; shadow is a known totk.ini key (ipavlin98, itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:42:55 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e654aa288f Merge pull request #1165 into task/prfix: SHADOW is a known totk.ini key (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:34:52 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4e3464767e Merge pull request #1164 into task/prfix: A chunk of the chunked replay records a new pool-bound image's first transition and clear in its own command buffer, which removes the black strip by the quick menu (ipavlin98)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:34:52 +03:00
Valiantsin DzerakhandClaude Opus 5.5 06088863bc Merge pull request #1163 into task/prfix: DLSS arms only on a light target more than half the scene size, so the frame no longer goes dark when the quick weapon menu closes (ipavlin98)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:34:52 +03:00