diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 53a89f1f..87115ad9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -30,6 +30,9 @@ jobs: if ! command -v cmake >/dev/null || ! command -v ninja >/dev/null; then brew install cmake ninja fi + if ! command -v glslangValidator >/dev/null; then + brew install glslang + fi - name: Build working-directory: ${{ env.NXEMU_LOCAL_WORKSPACE || github.workspace }} diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index b36e9e9a..8126cc4c 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -167,7 +167,19 @@ endif() # Opus if (NOT TARGET Opus::opus) + # AArch64 always provides NEON. Opus 1.5.x does not recognize macOS' + # "arm64" processor name as its "aarch64" presume-NEON case, while + # runtime CPU capability detection is unavailable on this platform. + if (APPLE AND ARCHITECTURE_arm64) + set(OPUS_MAY_HAVE_NEON OFF CACHE BOOL "Use runtime NEON detection" FORCE) + set(OPUS_PRESUME_NEON ON CACHE BOOL "Assume NEON support" FORCE) + endif() add_subdirectory(opus) + if (APPLE AND ARCHITECTURE_arm64) + # Opus also guards NEON declarations with MAY_HAVE, even when presumed. + target_compile_definitions(opus PRIVATE + OPUS_ARM_MAY_HAVE_NEON OPUS_ARM_MAY_HAVE_NEON_INTR) + endif() endif() # Vulkan — headers must come first: VulkanUtilityLibraries runs find_package(VulkanHeaders CONFIG),