mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-27 19:54:38 +00:00
Two matches with the Indium hand-off round (narrow present wait, deferred blits, worker-side command-buffer lease, skipping CPU Vulkan devices) ran slower than before, with more main-thread futex waiting. Each change is now behind a guest flag file and off by default, so the default libindium matches the round-3 build (vertex-descriptor dirty masks, cheaper resource setters). The wait counters stay opt-in, write a "waits enabled" line when they are on and keep their state per image. The docs explain that flag files created from the host while Darling runs may stay invisible through the overlay mount. Also adds a passive cursor watcher. The stuck in-game cursor is Hyprland's direct scanout, not Darling. The first match with direct scanout off averaged 135 FPS. STATUS, TROUBLESHOOTING and README are updated with the new matches. Co-Authored-By: Claude Opus 5.5 <[email protected]>
26 lines
1.5 KiB
Bash
Executable File
26 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
# Build and run the host-side tests of the Indium deferred hand-off (Linux host, no guest, no GPU).
|
|
#
|
|
# tools/test-deferred-handoff.cpp the ordered worker's FIFO, the present-dispatch token, the wait counters
|
|
# tools/test-deferred-encoder-model.cpp the deferred blit/render op hand-off: order, resource lifetime, drop safety
|
|
#
|
|
# Both compile the real headers from deps/indium/private-include with the host compiler. The counter test writes its
|
|
# summary to /tmp/opencode/waits-test.log (DARLING_WAITS_LOG) and needs /tmp/metal-debug-waits for the length of the
|
|
# run; it removes the flag again if it created it (and first checks, in a forked child, that the counters stay off and
|
|
# write nothing without it).
|
|
#
|
|
# In the runtime the mechanisms exercised here are opt-in experiments (round-3 behaviour is the default): the narrow
|
|
# present-dispatch wait needs /tmp/metal-present-dispatch-wait, the deferred blit list /tmp/metal-deferred-blit, the
|
|
# counters /tmp/metal-debug-waits. The tests exercise the mechanisms themselves, independent of those flag files.
|
|
set -eu
|
|
project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
out_dir=${RIOT_TEST_OUT:-/tmp/opencode}
|
|
include="$project_dir/build/darling-src/src/external/metal/deps/indium/private-include"
|
|
mkdir -p "$out_dir"
|
|
for name in test-deferred-handoff test-deferred-encoder-model; do
|
|
c++ -std=c++17 -O1 -pthread -I "$include" "$project_dir/tools/$name.cpp" -o "$out_dir/$name"
|
|
echo "== $name"
|
|
"$out_dir/$name"
|
|
done
|
|
echo "all host deferred-hand-off tests passed"
|