Skip to content

Fix build on Intel Mac (AMD GPU crash + LLVM 21+ patches compat)#1

Open
wendlinga wants to merge 5 commits into
mainfrom
fix/apple-clang
Open

Fix build on Intel Mac (AMD GPU crash + LLVM 21+ patches compat)#1
wendlinga wants to merge 5 commits into
mainfrom
fix/apple-clang

Conversation

@wendlinga
Copy link
Copy Markdown
Owner

@wendlinga wendlinga commented Apr 15, 2026

Two fixes needed to build and run on Intel Mac with AMD GPU using Apple Clang:

1. Metal crash fix (via rt64 submodule update)

Updates lib/rt64 to pick up a fix for a SIGSEGV at launch on Intel Mac AMD
GPUs (AMDMTLBronzeDriver). See wendlinga/plume#1 for the root cause —
setBuffer() was called on a Metal argument encoder without a backing buffer.

2. patches/Makefile: suppress -Wincompatible-pointer-types

Clang 21+ promotes -Wincompatible-pointer-types to a hard error in C mode.
Several patch files contain implicit pointer type conversions (e.g. Mtx* to
float(*)[4]) that older compilers silently accepted. Adding
-Wno-incompatible-pointer-types to CFLAGS keeps these building with LLVM 22+.

This is consistent with the existing -Wno-cast-function-type-mismatch already
in the Makefile — same pattern, same rationale.

Testing

Verified on Intel MacBook Pro (x86_64, AMD Radeon 555X, macOS 15.7.4) with
Apple Clang 16 (host) and Homebrew LLVM 22 (MIPS cross-compiler for patches).
App builds cleanly and runs without crashing.

wendlinga added 2 commits April 15, 2026 12:54
Points rt64 to wendlinga/rt64:fix/apple-clang which updates plume to call
setArgumentBuffer() before setBuffer() on Tier2/non-Metal3 hardware.
Clang 21+ promotes -Wincompatible-pointer-types to a hard error in C mode.
Several patch files pass Mtx*/float(*)[4] and similar type-mismatched pointers
that the original MIPS compiler accepted silently. Add -Wno-incompatible-pointer-types
to keep the existing implicit-cast patterns building with newer LLVM/Clang.

This mirrors the existing -Wno-cast-function-type-mismatch flag already present.
@wendlinga wendlinga changed the title Fix build on Intel Mac (AMD GPU crash + MIPS type errors) Fix build on Intel Mac (AMD GPU crash + LLVM 21+ patches compat) Apr 15, 2026
wendlinga and others added 3 commits April 15, 2026 14:07
Texture and sampler descriptors were bound via gpuResourceID() direct
writes (the Metal3 bindless path). Intel AMD GPUs (AMDMTLBronzeDriver)
report Argument Buffers Tier2 but do not support the bindless pattern,
causing black output after the crash fix. Updated plume (abb241f) now
gates all three resource types on useDirectBufferAddresses and uses the
argument encoder for textures and samplers on non-Metal3 hardware.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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