Skip to content

Android: collision and fast_block_compress build and run; denoised_rtao Windows only - #40

Merged
ASDAlexander77 merged 2 commits into
mainfrom
android-windows-only-ports
Oct 11, 2026
Merged

ASDAlexander77 merged 2 commits into
mainfrom
android-windows-only-ports

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

A full Android build (cmake --build build-android-x86_64) stopped in three ports from Windows samples. Two now build and run on Android; denoised_rtao is Windows only.

Example Problem on Android Fix
fast_block_compress MSVC's __declspec(align(16)) (x86-64); memcpy_s (arm64) alignas(16); a memcpy_s in fbc_cpu_compat.h off Windows
collision DirectXCollision.h is the Windows SDK's DirectXMath fetched on Android (DIRECTXMATH_FETCH_TAG, jun2026, headers only), with core/sal/sal.h for the annotations it uses
denoised_rtao WIC texture loading, windows.h in the PBRT parser built on Windows only

Two more fixes found while running them:

  • fast_block_compress image names: all four offline BC files end in .DDS, while opaque_512.dds doesn't. The code reused the image's extension, which Windows tolerates but Android's case-sensitive file names don't, so the example exited at startup.
  • APK dependencies: an <example>_apk now also depends on what its executable depends on (the copies of the samples' media). tools/android.py build builds APKs, not executables, so fast_block_compress_apk failed when its images hadn't been copied yet.

A second commit adds .gitattributes so patches are always checked out with LF. With core.autocrlf, a checkout gave Donut-message-callback-all-apis.patch CRLF line endings; git apply then called it corrupt (its empty context line), and configure skipped it with only a warning. A fresh Windows clone built Donut without #39's patch.

Testing

Platform Result
Android x86_64 full build passes (-k 0, no failures)
Android arm64 collision, fast_block_compress (C fallback), headless, nvrhi_direct and both apps build
Android emulator (API 34, host GPU) collision.apk draws the frustum and shapes. fast_block_compress.apk loads all its images; GPU BC1 RMS error 2.21, CPU (SSE2) BC1 2.22
APK alone after deleting the copied images, building only fast_block_compress_apk copies them and packages
Windows builds; CTest 61/61, including denoised_rtao
Configure no patch warnings after re-checking the patches out with LF

🤖 Generated with Claude Code

ASDAlexander77 and others added 2 commits October 12, 2026 00:08
…ao Windows only

The full Android build stopped in three ports:
- fast_block_compress: fbc_cpu.cpp's SSE2 constants used MSVC's __declspec(align(16)), now
  alignas(16); its C fallback (arm64) used memcpy_s, which fbc_cpu_compat.h now provides off
  Windows. The offline BC images' names are .DDS for all four images (opaque_512's own is .dds):
  Android's file names are case-sensitive, so they have their own extension list.
- collision: DirectXMath (the Windows SDK's) is fetched on Android (DIRECTXMATH_FETCH_TAG,
  jun2026, headers only), with core/sal/sal.h for the annotations it uses.
- denoised_rtao: Windows only. It loads textures through WIC and the PBRT parser takes its
  definitions from windows.h.

An APK now also depends on what its executable was made to depend on after it was added (the
copies of the samples' media): tools/android.py build builds APKs only, so
fast_block_compress_apk failed when the images hadn't been copied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With core.autocrlf, a checkout gives a patch CRLF line endings; git apply then calls
Donut-message-callback-all-apis.patch corrupt (its empty context line), and configure skipped
it with a warning: a fresh clone on Windows built Donut without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 3ae0271 into main Oct 11, 2026
@ASDAlexander77
ASDAlexander77 deleted the android-windows-only-ports branch October 11, 2026 23:12
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