Skip to content

Android: armeabi-v7a (32-bit ARM) builds - #43

Merged
ASDAlexander77 merged 1 commit into
mainfrom
android-armeabi-v7a
Oct 12, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
android-armeabi-v7a

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

  • android-arm32 preset, tools/android.py --abi arm32, and armeabi-v7a in package_apk.py; CMakeLists.txt uses the armv7a-linux-androideabi triple and defines VULKAN_HPP_TYPESAFE_CONVERSION for it (Vulkan's non-dispatchable handles are 64-bit integers on 32-bit targets).
  • patches/nvrhi-vulkan-32bit-handles.patch: NVRHI's Vulkan backend names objects and builds debug text through a rawHandle() helper, and uses VK_NULL_HANDLE instead of nullptr.
  • patches/Donut-chunk-layout-64bit-only.patch: Donut's chunk struct size asserts hold only on 64-bit.
  • patches/Donut-skinned-buffer-size-uint64.patch: size_t passed as uint64_t& in Scene::CreateMeshBuffers.
  • core/donut_interop.cpp: Vulkan handles to and from NVRHI's Object (pointer on 64-bit, integer on 32-bit) and printfMessenger kept as its 64 bits.
  • headless and nvrhi_direct are not built for armeabi-v7a: tslang has no @cppvtable struct returns for 32-bit ARM, so core/nvrhi.ts cannot compile there. android.py skips headless for arm32.

Needs

A tslang drop with the armeabi-v7a collector, async runtime and default library (android/armeabi-v7a/lib, defaultlib/lib/arm): see ASDAlexander77/TypeScriptCompiler#555 and ASDAlexander77/TypeScriptCompilerDefaultLib#32.

Verified

  • python tools/android.py build --abi arm32 basic_triangle builds the APK (NDK r30).
  • On a Galaxy Tab A 10.1 (SM-T510, armeabi-v7a only, Android 11) the APK installs and starts: the tslang runtime loads, Vulkan creates its instance, then Donut stops with "Vulkan API version supported on the system (1.1.0) is too low, at least 1.3.0 is required".

Not verified

  • No frame has been rendered on 32-bit ARM: the only device available has Vulkan 1.1. Needs a 32-bit-capable device with Vulkan 1.3.
  • Only basic_triangle was built; the other examples were not.
  • Debug builds and the existing x86_64 and arm64 presets were not rebuilt after these changes (the 64-bit paths of the rawHandle/vkHandle* helpers compile to the old pointer casts, but that is unchecked).

🤖 Generated with Claude Code

android-arm32 preset, tools/android.py --abi arm32, package_apk.py takes armeabi-v7a; CMake picks
the armv7a-linux-androideabi triple and defines VULKAN_HPP_TYPESAFE_CONVERSION (Vulkan's
non-dispatchable handles are 64-bit integers on 32-bit targets).

- patches/nvrhi-vulkan-32bit-handles.patch: NVRHI's Vulkan backend names objects, defaults and
  prints handles through rawHandle(), and uses VK_NULL_HANDLE instead of nullptr.
- patches/Donut-chunk-layout-64bit-only.patch: the chunk structs' 64-bit size asserts.
- patches/Donut-skinned-buffer-size-uint64.patch: size_t passed as uint64_t&.
- core/donut_interop.cpp: Vulkan handles to and from NVRHI's Object and printfMessenger by their
  64 bits.
- headless and nvrhi_direct are not built for armeabi-v7a: tslang has no @cppvtable struct returns
  for 32-bit ARM, so core/nvrhi.ts cannot compile there; android.py skips headless.

Checked: basic_triangle builds and its APK installs and starts on an armeabi-v7a-only device
(SM-T510), up to Donut's Vulkan 1.3 check, which that device (Vulkan 1.1) fails. No frame has been
rendered on 32-bit ARM.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ASDAlexander77

Copy link
Copy Markdown
Owner Author

Update: after these changes basic_triangle_apk also builds for android-x86_64 and android-arm64 (the 64-bit paths of the handle helpers). Not run on a device or emulator.

@ASDAlexander77
ASDAlexander77 merged commit ba754dd into main Oct 12, 2026
@ASDAlexander77
ASDAlexander77 deleted the android-armeabi-v7a branch October 12, 2026 09:43
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