Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cross compile] gcc/llvm + aarch64/riscv64 embree intrinsics #96036

Open
jwinarske opened this issue Aug 24, 2024 · 3 comments
Open

[cross compile] gcc/llvm + aarch64/riscv64 embree intrinsics #96036

jwinarske opened this issue Aug 24, 2024 · 3 comments

Comments

@jwinarske
Copy link
Contributor

Tested versions

4.3-stable

System information

Yocto scarthgap running on Fedora 40

Issue description

Incorrect embree intrinsics used with RaspberryPi 5 on Yocto build system

-mcpu=cortex-a76+crypto
Compiling modules/navigation/2d/nav_mesh_generator_2d.cpp ...
In file included from thirdparty/embree/common/sys/../simd/arm/emulation.h:12,
                 from thirdparty/embree/common/sys/intrinsics.h:13,
                 from thirdparty/embree/common/sys/alloc.cpp:5:
thirdparty/embree/common/sys/../simd/arm/sse2neon.h: In function '__m128i _mm_aesdeclast_si128(__m128i, __m128i)':
thirdparty/embree/common/sys/../simd/arm/sse2neon.h:9918:69: error: invalid operands to binary ^ (have '__Int64x2_t' and '__Uint8x16_t')
 9918 |                vaesdq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0))) ^
      |                                                                     ^
Compiling modules/navigation/editor/navigation_mesh_editor_plugin.cpp ...
In file included from thirdparty/embree/common/sys/../math/../sys/../simd/arm/emulation.h:12,
                 from thirdparty/embree/common/sys/../math/../sys/intrinsics.h:13,
                 from thirdparty/embree/common/sys/../math/emath.h:7,
                 from thirdparty/embree/common/sys/../math/vec2.h:6,
                 from thirdparty/embree/common/sys/estring.h:7,
                 from thirdparty/embree/common/sys/estring.cpp:4:
thirdparty/embree/common/sys/../math/../sys/../simd/arm/sse2neon.h: In function '__m128i _mm_aesdeclast_si128(__m128i, __m128i)':
thirdparty/embree/common/sys/../math/../sys/../simd/arm/sse2neon.h:9918:69: error: invalid operands to binary ^ (have '__Int64x2_t' and '__Uint8x16_t')
 9918 |                vaesdq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0))) ^
      |                                                                     ^
Compiling modules/navigation/nav_map.cpp ...
In file included from thirdparty/embree/common/sys/../simd/arm/emulation.h:12,
                 from thirdparty/embree/common/sys/intrinsics.h:13,
                 from thirdparty/embree/common/sys/sysinfo.cpp:11:
thirdparty/embree/common/sys/../simd/arm/sse2neon.h: In function '__m128i _mm_aesdeclast_si128(__m128i, __m128i)':
thirdparty/embree/common/sys/../simd/arm/sse2neon.h:9918:69: error: invalid operands to binary ^ (have '__Int64x2_t' and '__Uint8x16_t')
 9918 |                vaesdq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0))) ^
      |                                                                     ^

Configuration

scons p=linuxbsd target=editor arch=arm64 use_static_cpp=yes optimize=speed progress=yes no_editor_splash=yes num_jobs=32 alsa=yes dbus=yes debug_symbols=no fontconfig=yes libdecor=yes use_llvm=no LINK='aarch64-poky-linux-g++  -mcpu=cortex-a76+crypto -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot=  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot=  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot-native=  -Wl,-z,relro,-z,now' opengl3=yes openxr=no pulseaudio=yes use_sowrap=no builtin_brotli=no builtin_freetype=no builtin_graphite=no builtin_harfbuzz=no builtin_icu4c=no builtin_libogg=no builtin_libpng=no builtin_libtheora=no builtin_libvorbis=no builtin_libwebp=no builtin_zlib=no builtin_zstd=no touch=yes udev=yes vulkan=yes use_volk=yes wayland=yes x11=no CC="aarch64-poky-linux-gcc  -mcpu=cortex-a76+crypto -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot" cflags=" -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot=  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot=  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot-native= " CXX="aarch64-poky-linux-g++  -mcpu=cortex-a76+crypto -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot" cxxflags=" -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/git=/usr/src/debug/godot/4.3  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot=  -fmacro-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot=  -fdebug-prefix-map=/mnt/raid10/yocto/master/raspberry-pi5/tmp/work/cortexa76-poky-linux/godot/4.3/recipe-sysroot-native=  -fvisibility-inlines-hidden" AS="aarch64-poky-linux-as " AR="aarch64-poky-linux-gcc-ar" RANLIB="aarch64-poky-linux-gcc-ranlib" import_env_vars=PATH,PKG_CONFIG_DIR,PKG_CONFIG_DISABLE_UNINSTALLED,PKG_CONFIG_LIBDIR,PKG_CONFIG_PATH,PKG_CONFIG_SYSROOT_DIR,PKG_CONFIG_SYSTEM_INCLUDE_PATH,PKG_CONFIG_SYSTEM_LIBRARY_PATH

Full Compile Log
log.do_compile_rpi5.txt

Steps to reproduce

Yocto scarthgap OS image using meta-raspberrypi, meta-godot: https://github.com/jwinarske/meta-godot
MACHINE ?= "raspberrypi5"

Run bitbake godot to build the recipe: https://github.com/jwinarske/meta-godot/blob/scarthgap/recipes-graphics/godot/godot_4.3.bb

Minimal reproduction project (MRP)

build only issue

@AThousandShips AThousandShips changed the title [cross compile] gcc + aarch64 + tuning embree intrynsics [cross compile] gcc + aarch64 + tuning embree intrinsics Aug 24, 2024
@jwinarske
Copy link
Contributor Author

jwinarske commented Aug 24, 2024

Similar error pattern with LLVM
godot_compile_rpi5.txt

@jwinarske
Copy link
Contributor Author

riscv64 cross compiles fine (GCC+LLVM). Looking at the embree source, there are no optimizations for the RISC-V 256-bit RVV 1.0 standard.

@jwinarske jwinarske changed the title [cross compile] gcc + aarch64 + tuning embree intrinsics [cross compile] gcc/llvm + aarch64/riscv64 + embree intrinsics Aug 24, 2024
@jwinarske jwinarske changed the title [cross compile] gcc/llvm + aarch64/riscv64 + embree intrinsics [cross compile] gcc/llvm + aarch64/riscv64 embree intrinsics Aug 24, 2024
@Calinou Calinou added the bug label Aug 24, 2024
@jwinarske
Copy link
Contributor Author

RenderKit/embree#499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants