Build against the real SpeedTree SDK; keep assert-based tests in release

SDK 62a5f5a carries the SpeedTree runtime, so the local mirror/shim is no
longer needed. attack_combo and ava2_render_3d tests called the code under
test inside assert() and segfaulted under NDEBUG; undefine it like
hardware_scene_test. android/build.sh prefers the SDK adb. Desktop ctest
59/59 incl. speedtree_forest; device 60 fps with real trees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-13 11:03:57 +09:00
co-authored by Claude Opus 5.5
parent 8f96e7a143
commit 15b2397b54
4 changed files with 32 additions and 1 deletions
+3 -1
View File
@@ -92,7 +92,9 @@ fi
APK="$HERE/app/build/outputs/apk/debug/app-debug.apk"
ls -l "$APK"
ADB="$ANDROID_HOME/platform-tools/adb"; command -v adb >/dev/null && ADB="$(command -v adb)"
# Prefer the SDK's adb: a different adb version on PATH (e.g. Homebrew's) restarts a running adb
# server it does not match, which drops an install or push in progress.
ADB="$ANDROID_HOME/platform-tools/adb"; [[ -x "$ADB" ]] || ADB="$(command -v adb)"
[[ -n "${ADB_SERIAL:-}" ]] && ADB="$ADB -s $ADB_SERIAL"
if $ADB get-state >/dev/null 2>&1; then
$ADB install -r -d "$APK"
+21
View File
@@ -1139,6 +1139,7 @@ Not verified: in-game or device visuals (no server in this session).
the SDK repository (`LegacyWindController`, `CreateFromSpt` variance, LOD
fields). Until that SDK work is pushed, the APK builds from a local mirror
with shims: `AVA2_SOURCE_DIR=<mirror> AVA2_SDK_ROOT=<shim> android/build.sh`.
(Obsolete since SDK 62a5f5a, 2026-10-13: plain `AVA2_SDK_ROOT=../sdk` builds.)
Verified: debug APK builds; the desktop client reaches the login screen inside
`build/android-data/root` (the phone layout) with no missing-effect errors.
@@ -1547,3 +1548,23 @@ Outstanding:
- A missing or unreadable model should fail that load, not throw out of main.
- The `--preview-data` camera starts inside the tree canopy, so the player is hidden.
- Thermals over a long session not yet measured.
### 2026-10-13 Real SpeedTree SDK
The SDK repository now carries the SpeedTree runtime this checkout calls (SDK 62a5f5a:
"Implement cross-platform SpeedTree runtime and recovery tests" and "Fix terminal foliage
dispatch on frond branches"). The local mirror and SDK shim are no longer needed; desktop
and Android build against the plain SDK checkout.
Changes:
- `tests/attack_combo_test.cpp` and `tests/ava2_render_3d_test.cpp` call the code under
test inside `assert()`. In RelWithDebInfo (NDEBUG) those calls compiled out and the tests
segfaulted; they had been skipped only because the test rundir was not found. Both now
undefine NDEBUG, like `hardware_scene_test.cpp`.
- `android/build.sh` prefers the SDK's adb over the one on PATH (see the adb note above).
Verified:
- Desktop ctest 59/59 with `-DAVA2_TEST_RUNDIR=<checkout>/build/dev/test-rundir`, including
`ava2.speedtree_forest` (without that option the 9 asset tests are skipped).
- Desktop phone layout and the device both render trees with real branches and fronds.
- Device game phase: 60.3 fps, max frame gap 16.6 ms, 0 frames over 25 ms.
+4
View File
@@ -1,5 +1,9 @@
// Attack wiring (mobile step 3b): CRaceMotionData .msa parsing, the PythonPlayerSettingsModule combo
// tables, the ActorInstanceBattle combo state machine and __NormalAttackProcess hit detection.
// The checks call the code under test inside assert(); keep them in release builds.
#ifdef NDEBUG
#undef NDEBUG
#endif
#include "src/eter_render/ActorInstance.h"
#include "src/eter_render/RaceData.h"
#include "test_rundir.h"
+4
View File
@@ -1,3 +1,7 @@
// The checks call the code under test inside assert(); keep them in release builds.
#ifdef NDEBUG
#undef NDEBUG
#endif
#include "src/eter_render/Gr2ModelRenderer.h"
#include "src/eter_render/TerrainHeightmap.h"
#include "src/eter_render/MapObjectManager.h"