godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.75k stars 21.3k forks source link

Does not run on the RISC-V64, VisionFive2 SBC, #80676

Open DSOE1024 opened 1 year ago

DSOE1024 commented 1 year ago

Godot version

3.5stable

System information

Debian

Issue description

Godot Engine v3.5.2.stable.custom_build.170ba337 - https://godotengine.org free(): invalid pointer Aborted

what should i do?

on VisionFive2

Steps to reproduce

make and run

Minimal reproduction project

any

akien-mga commented 1 year ago

How did you compile Godot exactly?

aaronfranke commented 1 year ago

Did you try running Godot headlessly? In Godot 3.x, this means the "server" platform.

The VisionFive 2 does not yet have the drivers to run full OpenGL or Vulkan apps, but a Hello World code snippet in GDScript works fine in my testing (I have a VisionFive 2).

bruvzg commented 1 year ago

VisionFive 2, like a most single board computers have mobile GPU and support only OpenGLES, Linux build of Godot uses desktop OpenGL. So it won't work with hardware acceleration, but if you have software MESA driver installed, you can run it.

Screenshot from 2023-08-17 14-44-04

With support for loading both GL and GLES is added in ANGLE PR, and EGL driver it should be possible to make it work with GLES hardware acceleration as well (if GL driver is good enough). VisionFive 2 Vulkan drivers are currently completely broken.

I have not tried 3.x but 4.x (with software GL) do work on the VisionFive 2, some tips for building:

Edit: Same flags work with 3.x as well.

DSOE1024 commented 1 year ago

How did you compile Godot exactly?

scons platform=x11 use_llvm=yes target=release_debug

DSOE1024 commented 1 year ago

VisionFive 2, like a most single board computers have mobile GPU and support only OpenGLES, Linux build of Godot uses desktop OpenGL. So it won't work with hardware acceleration, but if you have software MESA driver installed, you can run it.

Screenshot from 2023-08-17 14-44-04

With support for loading both GL and GLES is added in ANGLE PR, and EGL driver it should be possible to make it work with GLES hardware acceleration as well (if GL driver is good enough). VisionFive 2 Vulkan drivers are currently completely broken.

I have not tried 3.x but 4.x (with software GL) do work on the VisionFive 2, some tips for building:

  • Use clang (use_llvm=yes build flag), GCC have broken libatomic and will not work.
  • Some modules are not compatible and need to be disabled (module_theora_enabled=no module_denoise_enabled=no module_raycast_enabled=no module_xatlas_unwrap_enabled=no).

Edit: Same flags work with 3.x as well.

b3a345b70c56b3a5c19abc8f0c1c097

Thanks for the reply!

I tried compiling the 4.x version and I added flags, but I found that I still don't work properly as shown in the image I am using the latest official 202306 debian image, what I need to do

coderamen666 commented 1 year ago

Can you make a Linux desktop build of Godot that uses GLES instead of normal OpenGL?

akien-mga commented 1 year ago

It's not possible at the time being, at least not without modifying engine source code. But some work is being done in that direction (#72831) and it should be possible soon.

hexdump0815 commented 1 year ago

i have no idea about godot, but if you have gles and need opengl then gl4es should be given a try - also the developer usually is very responsive in case there are bugs etc. - https://github.com/ptitSeb/gl4es/issues/420

Calinou commented 1 year ago

i have no idea about godot, but if you have gles and need opengl then gl4es should be given a try - also the developer usually is very responsive in case there are bugs etc. - ptitSeb/gl4es#420

gl4es can only emulate OpenGL 1.x/2.x, which isn't sufficient for Godot 4.x. Godot 4.x requires OpenGL 3.3/OpenGL ES 3.0 support.

DSOE1024 commented 1 year ago

Can you make a Linux desktop build of Godot that uses GLES instead of normal OpenGL?

So far, I don't know of any way

DSOE1024 commented 1 year ago

i have no idea about godot, but if you have gles and need opengl then gl4es should be given a try - also the developer usually is very responsive in case there are bugs etc. - ptitSeb/gl4es#420

gl4es can only emulate OpenGL 1.x/2.x, which isn't sufficient for Godot 4.x. Godot 4.x requires OpenGL 3.3/OpenGL ES 3.0 support.

Can the editor run with OpenGL ES 3.0 and is there a way to modify it?

Calinou commented 1 year ago

Can the editor run with OpenGL ES 3.0 and is there a way to modify it?

As said above, whether OpenGL or OpenGL ES is used is defined at build-time, not at run-time. You need to recompile Godot with the #define GLES_OVER_GL removed, as it's enabled on desktop platforms.

Most desktop graphics drivers (AMD/Intel/NVIDIA) don't directly support OpenGL ES, so OpenGL must be used there instead.

sajattack commented 1 year ago

Can the editor run with OpenGL ES 3.0 and is there a way to modify it?

As said above, whether OpenGL or OpenGL ES is used is defined at build-time, not at run-time. You need to recompile Godot with the #define GLES_OVER_GL removed, as it's enabled on desktop platforms.

Most desktop graphics drivers (AMD/Intel/NVIDIA) don't directly support OpenGL ES, so OpenGL must be used there instead.

I'm a noob with scons. Will this work or would the define have to be removed directly?

scons platform=linuxbsd target=editor production=yes werror=no -Q GLES_OVER_GL=0 -j`nproc`
DSOE1024 commented 1 year ago

Please how can I modify the compilation parameters

akien-mga commented 1 year ago

This is not a supported use case, and just change that parameter won't be sufficient. Please have patience, this will be solved in time. For now, it's just not possible unless you're comfortable modifying engine code.

DSOE1024 commented 10 months ago

Hello, I tried compiling Godot 4.2.1, using the clang compiler, I used my RK3588S board (with Mali GPU) and successfully ran Godot smoothly with GLES, but I still can't work on VisionFive2

Compile commands: scons arch=rv64 platform=linuxbsd target=editor use_llvm=yes module_theora_enabled=no module_denoise_enabled=no module_raycast_enabled=no module_xatlas_unwrap_enabled=no

It can only be operated in headless mode

Due to this issue, I have added instructions for compiling some of the documentation https://github.com/godotengine/godot-docs/pull/8863