Skip to content

Windows: raea.exe starts on a CPU without AVX; 0.1.8's notes for rc10-rc12 - #204

Merged
shinyobjectz merged 2 commits into
mainfrom
win-noavx
Nov 20, 2026
Merged

shinyobjectz merged 2 commits into
mainfrom
win-noavx

Conversation

@shinyobjectz

Copy link
Copy Markdown
Owner

rc11's raea.exe stops before it does anything on a PC whose processor has no AVX: a Goldmont Celeron or Pentium, a Nehalem Core. Intel's SDE (10.13.1) on the Windows PC, as each chip:

hsw: exit 0 0.1.8-rc11
ivb: exit 0 0.1.8-rc11
nhm: exit 1 Image: ...\raea.exe+0x123b5d40 Instruction bytes are: c5 fc 28 05 f8 be ee 03   (vmovaps ymm)
glm: exit 1 (the same)

Why. The instruction is in one of seven C++ dynamic initializers in raea.exe's CRT table (.CRT$XCU), which run before main. They copy ETC1's intensity tables (2, 5, 9, 13, 18, 24, 33, 47 / 8, 17, 29, 42, 60, 80, 106, 183) into globals: ctt-etcpak's Tables.cpp, whose g_table_SIMD and the rest are set with _mm_setr_epi16, which MSVC initializes at run time. ctt builds each encoder once per ISA and picks one at run time, but every copy's static initializers run at start, so the /arch:AVX2 copy's run on every CPU.

Proof it's the only one in raea.exe. A copy of rc11's raea.exe with those seven initializers made ret runs --version under SDE as both a Nehalem and a Goldmont, with Windows' own VC++ runtime. (With the 14.44 runtime raea bundles, SDE then stops in VCRUNTIME140.dll's memmove. That's SDE's artifact: the DLL's memcpy is a function override (dynamic relocation type 7, the fothk section), which Windows' loader points at an AVX copy from the real CPU's features, which SDE can't hide from the kernel. The exported memmove checks __isa_available itself, and on a real CPU without AVX the loader keeps it.)

The fix. ctt comes only from Bevy's compressed_image_saver (bevy_image's CompressedImageSaver, BC7/ASTC/ETC2 for Bevy's asset processing), which raea never runs. It's out of:

  • the plugin catalog's Bevy features (sdk/raea/bench/bevy-plugins/package.json, 0.19 and 0.20);
  • engine/bevy-plugins' generated bevy feature (tools/bevy-plugins.sh sync writes the same);
  • engine/render's bevy-all.

So ctt's eight crates, fast_image_resize, ispc-build-utils and zstd leave the lock, and NOTICE and LICENSES are tools/licenses.sh's output on main with the change. compressed_image_saver_universal (basis-universal) stays. The docs (bevy-plugins.md, bevy-upgrade.md, render's manifest) say why it's out.

Linux has a second blocker, which this doesn't fix: the static ONNX Runtime's protobuf initializers use AVX (vxorps in OnShutdownRun, under SDE as a Nehalem). Linux needs glibc 2.39 already, so the notes and the install page now say Linux needs a processor with AVX (most from 2011 on). Loading ONNX Runtime at run time there, as Windows does (#110), is for the next release.

Notes. 0.1.8's What's New gains what rc10-rc12 fixed on Windows: #169's workspaces and Git, #112/#124's crash at launch, raea show and Windows paths, Intl, --quality master's darks, and no AVX. It is dated the 19th.

rc12 is checked under SDE on the PC (nhm, glm) before the release.

🤖 Generated with Claude Code

rc11's raea.exe stopped before main on a processor without AVX (Intel's SDE as a Goldmont Celeron and as a Nehalem:
"Executed instruction not valid", vmovaps ymm at raea.exe+0x123b5d40). The instruction is in one of seven C++
dynamic initializers in the CRT's table: ctt-etcpak's ETC1 tables (Tables.cpp's g_table_SIMD and the rest, set with
_mm_setr_epi16, which MSVC initializes at run time), from the copy ctt builds with /arch:AVX2. ctt picks an ISA's
copy at run time for its encoders, but every copy's static initializers run at start, on every CPU. With those seven
skipped (a patched rc11), raea.exe --version runs under SDE as both chips.

ctt comes only from Bevy's compressed_image_saver feature (bevy_image's CompressedImageSaver, BC7/ASTC/ETC2 for
Bevy's asset processing), which raea never runs. It's out of the plugin catalog's Bevy features (0.19 and 0.20),
engine/bevy-plugins' generated `bevy` feature (tools/bevy-plugins.sh sync agrees) and engine/render's bevy-all, so
ctt's eight crates, fast_image_resize, ispc-build-utils and zstd leave the lock; NOTICE and LICENSES are
tools/licenses.sh's on main with the change. compressed_image_saver_universal (basis-universal) stays.
…r's darks, no-AVX; Linux's requirements

The Windows fixes since the notes were written (rc10-rc12), in the notes' words, and what Linux needs: a processor
with AVX (the static ONNX Runtime's initializers use it) and glibc 2.39, in the notes' Known and the install page.
Dated the 19th.
@shinyobjectz
shinyobjectz merged commit a9ecc06 into main Nov 20, 2026
4 checks passed
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