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

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

Open
DSOE1024 opened this issue Aug 16, 2023 · 16 comments
Open

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

DSOE1024 opened this issue Aug 16, 2023 · 16 comments

Comments

@DSOE1024
Copy link

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
Copy link
Member

How did you compile Godot exactly?

@aaronfranke
Copy link
Member

aaronfranke commented Aug 16, 2023

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
Copy link
Member

bruvzg commented Aug 17, 2023

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.

@DSOE1024
Copy link
Author

How did you compile Godot exactly?

scons platform=x11 use_llvm=yes target=release_debug

@DSOE1024
Copy link
Author

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

@DSOE1024 DSOE1024 changed the title Could not Start On RISC-V 64 Does not run on the RISC-V64, VisionFive2 SBC, Aug 22, 2023
@coderamen666
Copy link

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

@akien-mga
Copy link
Member

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
Copy link

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

@Calinou
Copy link
Member

Calinou commented Sep 13, 2023

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
Copy link
Author

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
Copy link
Author

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
Copy link
Member

Calinou commented Sep 14, 2023

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
Copy link

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
Copy link
Author

Please how can I modify the compilation parameters

@akien-mga
Copy link
Member

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
Copy link
Author

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
godotengine/godot-docs#8863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Up for grabs
Development

No branches or pull requests

8 participants