Closed
Conversation
In SPIRV-Tools v2024.4.rc2, the static library target is named 'SPIRV-Tools-static' (not 'SPIRV-Tools'). Also switch to cmake --build for more portable target specification.
Meson configure fails with 'Dependency "x11-xcb" not found'. Add the missing X11/XCB development packages required by Mesa's WSI layer.
The wrapper driver forces android-stub=true, but the Android stub headers use __INTRODUCED_IN() and __ANDROID_API__ macros that are only defined in the Android NDK's sys/cdefs.h. Define them as no-ops for the Linux CI build.
…API__ in utils - Only define NULL=nullptr for C++ (nullptr is not valid in C11) - Remove __ANDROID_API__=26 which triggers Android-specific syscall paths in generic Mesa utilities like anon_file.c
The HAVE_MEMFD_CREATE code path in src/util/anon_file.c uses SYS_memfd_create but only includes sys/mman.h (not sys/syscall.h). This is a pre-existing issue that doesn't manifest on Android builds. Work around it by force-including sys/syscall.h.
The WSI AHardwareBuffer code requires __ANDROID_API__ to be defined for the Android-specific struct members to exist. Keep -include sys/syscall.h for C to fix SYS_memfd_create, and -DNULL=nullptr only for C++ stubs.
The wsi_common.h header guards GetAndroidHardwareBufferPropertiesANDROID and related WSI callbacks behind #ifdef __TERMUX__, but wsi_common_ahardware_buffer.c references them unconditionally. Define __TERMUX__ so the struct members exist during CI compilation.
* Create ci.yml * Update ci.yml * Use drv_info for optimization barriers: update Qualcomm proprietary check * Fix SPIRV-Tools build: use correct CMake target names for v2024.4.rc2 In SPIRV-Tools v2024.4.rc2, the static library target is named 'SPIRV-Tools-static' (not 'SPIRV-Tools'). Also switch to cmake --build for more portable target specification. * Fix CI: add missing libx11-xcb-dev and libxcb-keysyms1-dev dependencies Meson configure fails with 'Dependency "x11-xcb" not found'. Add the missing X11/XCB development packages required by Mesa's WSI layer. * CI: use clang for Meson configure (meson.build requires -ferror-limit=1000) * Fix CI: define Android stub macros for non-Android host builds The wrapper driver forces android-stub=true, but the Android stub headers use __INTRODUCED_IN() and __ANDROID_API__ macros that are only defined in the Android NDK's sys/cdefs.h. Define them as no-ops for the Linux CI build. * Fix CI: separate C/C++ stub args to avoid nullptr in C and __ANDROID_API__ in utils - Only define NULL=nullptr for C++ (nullptr is not valid in C11) - Remove __ANDROID_API__=26 which triggers Android-specific syscall paths in generic Mesa utilities like anon_file.c * Fix CI: include sys/syscall.h for SYS_memfd_create in anon_file.c The HAVE_MEMFD_CREATE code path in src/util/anon_file.c uses SYS_memfd_create but only includes sys/mman.h (not sys/syscall.h). This is a pre-existing issue that doesn't manifest on Android builds. Work around it by force-including sys/syscall.h. * Fix CI: restore __ANDROID_API__=26 for WSI AHardwareBuffer code The WSI AHardwareBuffer code requires __ANDROID_API__ to be defined for the Android-specific struct members to exist. Keep -include sys/syscall.h for C to fix SYS_memfd_create, and -DNULL=nullptr only for C++ stubs. * Fix CI: define __TERMUX__ for WSI AHardwareBuffer struct members The wsi_common.h header guards GetAndroidHardwareBufferPropertiesANDROID and related WSI callbacks behind #ifdef __TERMUX__, but wsi_common_ahardware_buffer.c references them unconditionally. Define __TERMUX__ so the struct members exist during CI compilation. --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The wsi_common_x11.c file uses native_handle_t inside #ifdef __TERMUX__, but this type is only defined in Android NDK headers. Define it as a struct stub when building on non-Android hosts (Linux CI) to fix the compilation error.
The generated trampoline code tries to dereference and cast output pointer params with (int64_t)*param_name, but wl_display is an opaque struct that cannot be cast to int64_t. Add it to the exclusion list alongside Display and xcb_connection_t.
getprogname() is an Android/BSD function not available on Linux glibc. Use program_invocation_short_name (GNU extension, already enabled via -D_GNU_SOURCE) as a fallback for the Linux CI build.
- Add #include <fcntl.h> for open() and O_RDONLY used in dma_heap_fd init - Fix VK_DRIVER_ID_MESA_PANFROST -> VK_DRIVER_ID_MESA_PANVK (the correct Vulkan spec enum for the Mesa PanVK driver)
…d builds Same fix as wrapper_instance.c — getprogname() is Android/BSD only. Map it to glibc's program_invocation_short_name on Linux.
adrenotools is an Android-only library for loading custom GPU drivers. Provide a no-op stub that returns NULL on Linux CI builds so the linker can resolve the symbol. The code path already falls back to dlopen() when adrenotools returns NULL.
The prototype in wrapper_private.h:52 is non-static, so the stub implementation must also be non-static to avoid conflicting declarations.
Merge pull request #1 from BlueInstruction/PR
…ot constant expr)
… .so Key changes: - Use Android NDK r27c with Clang (aarch64-linux-android26-clang) - Use BlueInstruction/SPIRV-Tools fork with custom passes - Preserve patched optimizer.hpp headers (don't overwrite with upstream) - Define HAVE_CUSTOM_SPIRV_PASSES to use real SPIRV passes - Target Android platform (system='android' in cross file) - Disable X11/Wayland platforms (not needed for Android runtime) - Output links against Bionic libc (compatible with Winlator)
The original libvulkan_wrapper.so links against libdrm.so, libxcb.so.1, libX11-xcb.so.1, and other X11 libraries. These are not provided by the Android NDK, so we build them from source using the same NDK cross file. Also changed -Dplatforms= to -Dplatforms=x11 to match the original binary which has X11/XCB support enabled.
|
These pull requests won't be merged man |
… add missing deps (libXext, libXrender)
Author
|
These PRs are internal to my fork only,there is no intention to merge anything into the upstream repo. |
…, explicit cd for each lib
Building X11/XCB libraries from source is impractical because many (libxcb, libxfixes, etc.) don't have meson.build and use autotools only. Instead, download prebuilt .deb packages from Termux repository — these are the exact same libraries the original libvulkan_wrapper.so was built against.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.