Skip to content

AppImage: say up front when its renderer needs AVX2 the CPU lacks - #414

Open
Wpaif wants to merge 1 commit into
NotRexed:mainfrom
Wpaif:fix/cpu-without-avx2
Open

Wpaif wants to merge 1 commit into
NotRexed:mainfrom
Wpaif:fix/cpu-without-avx2

Conversation

@Wpaif

@Wpaif Wpaif commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Refs #363

Thanks for 2c48613: the build now follows the CPU, which covers the reporter's case (Windows builder, everything compiled locally). I reduced this PR to what that commit leaves open, and dropped my own CPU detection in favour of yours.

What is still open

The Linux AppImage's hookshot_vk.so comes prebuilt from CI (HOOKSHOT_VK_PREBUILT). On a CPU without AVX2 the game is now built for x86-64-v2, but that renderer is still x86-64-v3, so the game stops at its start after the whole build.

Change

  • nx2/host_cpu.py: host_march() moved there unchanged (byte-identical to 2c48613), so make_game.py can ask it without importing build.py (which does work at import). build.py imports it; its MARCH/CPU lines are untouched.
  • nx2/make_game.py: check_cpu() stops before the game is read, with a plain message pointing to a source build, when HOOKSHOT_VK_PREBUILT is set and the CPU is not x86-64-v3. A player-set RX_MARCH skips it.
  • scripts/linux/appimage.sh: the prebuilt renderer is pinned to RX_MARCH=x86-64-v3, so with host_march() it no longer depends on the CI runner's CPU.
  • tests/test_cpu_target.py (game-free, in source-regressions): host_march() on Haswell / Ivy Bridge / Core 2 cpuinfo, an unreadable cpuinfo, and the Windows IsProcessorFeaturePresent path (faked); check_cpu() stopping only for the AppImage without AVX2, and running before the game is read.

Testing

  • python -I -B tests/test_cpu_target.py: 9/9 pass; it fails when the AppImage stop is disabled.
  • The rest of the suite passes on Linux (test_cpp_preflight.py already fails on main; test_cpp_preflight: take the Visual Studio route on any host #409 fixes it).
  • Not run on a pre-AVX2 CPU or on Windows (I only have a Linux PC with AVX2).

If you'd rather keep host_march() in build.py, I can instead have make_game.py import it from there.

🤖 Generated with Claude Code

@Wpaif
Wpaif force-pushed the fix/cpu-without-avx2 branch from 3729a10 to 0f8fac9 Compare November 8, 2026 00:09
The build now follows the CPU (host_march, issue 363), but the
AppImage's hookshot_vk.so comes prebuilt from CI: on a CPU without AVX2
the game is built for x86-64-v2 and still stops at its start, in the
renderer, after the whole build.

- host_march moves, unchanged, to nx2/host_cpu.py, so make_game.py can
  ask it without importing build.py.
- make_game.py's check_cpu stops before the game is read when
  HOOKSHOT_VK_PREBUILT meets a CPU without x86-64-v3, pointing to a
  source build (RX_MARCH set by the player skips it).
- scripts/linux/appimage.sh pins the prebuilt renderer to x86-64-v3, so
  it no longer depends on the CI runner's CPU.
- tests/test_cpu_target.py covers host_march (cpuinfo and Windows) and
  the check, without a game.

Refs NotRexed#363

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Wpaif
Wpaif force-pushed the fix/cpu-without-avx2 branch from 0f8fac9 to 7cd85f3 Compare November 8, 2026 00:16
@Wpaif Wpaif changed the title build: the CPU target follows the PC that builds the game (no-AVX2 CPUs) AppImage: say up front when its renderer needs AVX2 the CPU lacks Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant