ptitSeb / gl4es

GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
http://ptitseb.github.io/gl4es/
MIT License
703 stars 159 forks source link

starfive visionfive2 support? #420

Open hexdump0815 opened 1 year ago

hexdump0815 commented 1 year ago

i just came across https://www.reddit.com/r/RISCV/comments/11u0a6y/using_box64_gl4es_i_launched_a_pc_game_on_my/ ... do you have written down the steps to make gl4es to work on the vf2 somewhere? i gave it a try a few weeks ago in LIBGL_FB=3 mode trying to get opengl working this way but failed (i think early on with dri auth errors or something similar) also i'm not 100% sure if my gpu setup is working properly. some notes about how you got it working (vf2 gpu side and gl4es side) would be very welcome.

a lot of thanks in advance and best wishes - hexdump

ptitSeb commented 1 year ago

I just built with default option, in ~/git/gl4es then used is simply with LD_LIBRARY_PATH=~/git/gl4es/lib:$LD_LIBRARY_PATH glxgears for example. No specific LIBGL_FB option needed.

hexdump0815 commented 1 year ago

@ptitSeb - thanks a lot for the quick response - will give it a try this way soon

ptitSeb commented 1 year ago

As a followup: https://www.reddit.com/r/RISCV/comments/11vtqkf/video_of_superhexagon_running_on_visonfive2_riscv/ here is gl4es in action on the Vision Five 2 :)

Also note that the SDL2 version built on the default Debian image is build only with GLES2 support, so if you need to use OpenGL, you need to build a custom SDL2 and not use the system one (still using LD_LIBRARY_PATH to override the libs).

hexdump0815 commented 1 year ago

i just gave it a try again and i got a bit further ... i think that i have manually setup the gpu stuff properly on my own image (https://github.com/hexdump0815/imagebuilder/releases/tag/230321-02) as the included egl tests seem to work ... glxgears are working as well with gl4es but glmark2 crashes (debug trace below) but it works if i set LIBGL_FB=3 although very slow. do you have any idea what might be wrong? is glmark2 working for you with gl4es?

ps: maybe my setup is still not fully ok and the tests just run against get mesa sw renderer? pps: just found this: "failed to open starfive: /usr/lib/dri/starfive_dri.so: cannot open shared object file: No such file or directory" - so maybe something is maybe still wrong?

glmark2 debug trace with gl4es, but without LIBGL_FB=3:

$ gdb glmark2 
GNU gdb (Debian 13.1-2) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "riscv64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from glmark2...
(No debugging symbols found in glmark2)
(gdb) run
Starting program: /usr/bin/glmark2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/riscv64-linux-gnu/libthread_db.so.1".
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Mar 26 2023 18:25:10
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Using GLES 2.0 backend
LIBGL: Hardware Full NPOT detected and used
LIBGL: Extension GL_EXT_blend_minmax  detected and used
LIBGL: Extension GL_EXT_draw_buffers  detected and used
LIBGL: FBO are in core, and so used
LIBGL: PointSprite are in core, and so used
LIBGL: CubeMap are in core, and so used
LIBGL: BlendColor is in core, and so used
LIBGL: Blend Subtract is in core, and so used
LIBGL: Blend Function and Equation Separation is in core, and so used
LIBGL: Texture Mirrored Repeat is in core, and so used
LIBGL: Extension GL_OES_mapbuffer  detected
LIBGL: Extension GL_OES_element_index_uint  detected and used
LIBGL: Extension GL_OES_packed_depth_stencil  detected and used
LIBGL: Extension GL_OES_depth24  detected and used
LIBGL: Extension GL_OES_rgb8_rgba8  detected and used
LIBGL: Extension GL_EXT_multi_draw_arrays  detected
LIBGL: Extension GL_EXT_texture_format_BGRA8888  detected and used
LIBGL: Extension GL_OES_depth_texture  detected and used
LIBGL: Extension GL_OES_texture_stencil8  detected and used
LIBGL: Extension GL_EXT_texture_rg  detected and used
LIBGL: Extension GL_OES_texture_float  detected and used
LIBGL: Extension GL_OES_texture_half_float  detected and used
LIBGL: Extension GL_EXT_color_buffer_float  detected and used
LIBGL: Extension GL_EXT_color_buffer_half_float  detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Extension GL_EXT_frag_depth  detected and used
LIBGL: Max vertex attrib: 16
LIBGL: Extension GL_OES_standard_derivatives  detected and used
LIBGL: Extension GL_OES_get_program_binary  detected and used
LIBGL: Number of supported Program Binary Format: 0
LIBGL: Max texture size: 16384
LIBGL: Max Varying Vector: 32
LIBGL: Texture Units: 16/16 (hardware: 32), Max lights: 8, Max planes: 6
LIBGL: Extension GL_EXT_texture_filter_anisotropic  detected and used
LIBGL: Max Anisotropic filtering: 16
LIBGL: Max Color Attachments: 8 / Draw buffers: 8
LIBGL: Hardware vendor is Mesa/X.org
LIBGL: sRGB surface supported
LIBGL: EGLImage to Texture2D supported
LIBGL: EGLImage to RenderBuffer supported
LIBGL: Targeting OpenGL 2.1
LIBGL: Not trying to batch small subsequent glDrawXXXX
LIBGL: try to use VBO
LIBGL: Force texture for Attachment color0 on FBO
LIBGL: Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done
LIBGL: glX Will try to recycle EGL Surface
LIBGL: Current folder is:/home/myuser
LIBGL: Not using PSA (prgbin_n=0, notexarray=0)
glXQueryVersion(0x2aaaba36a0, 0x3fffffecc0, 0x3fffffecc4)
glXQueryExtensionString(0x2aaaba36a0, 0)
glXQueryExtensionString(0x2aaaba36a0, 0)
glXQueryVersion(0x2aaaba36a0, 0x3fffffeb60, 0x3fffffeb64)
glXChooseFBConfig(0x2aaaba36a0, 0, 0x2aaab6d010, 0x3fffffeba0)
FBConfig renderable=1
FBConfig drawableType=0x1
FBConfig visual type=32770
FBConfig doubleBufferMode=1
glXChooseFBConfig found 20 config
 config[0] = 0x2aaabcb5b8
 config[1] = 0x2aaabcbec8
 config[2] = 0x2aaabcb6a0
 config[3] = 0x2aaabcbfb0
 config[4] = 0x2aaabcb788
 config[5] = 0x2aaabcc098
 config[6] = 0x2aaabcb870
 config[7] = 0x2aaabcc180
 config[8] = 0x2aaabcb958
 config[9] = 0x2aaabcc268
 config[10] = 0x2aaabcb130
 config[11] = 0x2aaabcba40
 config[12] = 0x2aaabcb218
 config[13] = 0x2aaabcbb28
 config[14] = 0x2aaabcb300
 config[15] = 0x2aaabcbc10
 config[16] = 0x2aaabcb3e8
 config[17] = 0x2aaabcbcf8
 config[18] = 0x2aaabcb4d0
 config[19] = 0x2aaabcbde0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x8013, 0x3fffffeaf0) => 0xAABC0790
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x000C, 0x3fffffeb04) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb5b8, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x8013, 0x3fffffeaf0) => 0xAABBE590
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x000C, 0x3fffffeb04) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbec8, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x8013, 0x3fffffeaf0) => 0xAABC0870
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x000C, 0x3fffffeb04) => 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb6a0, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x8013, 0x3fffffeaf0) => 0xAABBE670
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x000C, 0x3fffffeb04) => 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbfb0, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x8013, 0x3fffffeaf0) => 0xAABC0950
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb788, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x8013, 0x3fffffeaf0) => 0xAABBE860
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc098, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x8013, 0x3fffffeaf0) => 0xAABC0A30
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x000D, 0x3fffffeb08) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb870, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x8013, 0x3fffffeaf0) => 0xAABBE940
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x000D, 0x3fffffeb08) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc180, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x8013, 0x3fffffeaf0) => 0xAABC0B10
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x000C, 0x3fffffeb04) => 0x0020
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb958, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x8013, 0x3fffffeaf0) => 0xAABBEA20
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x000B, 0x3fffffeb00) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x000C, 0x3fffffeb04) => 0x0020
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcc268, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x8013, 0x3fffffeaf0) => 0xAABBC5B0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x000C, 0x3fffffeb04) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb130, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x8013, 0x3fffffeaf0) => 0xAABC0BF0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x000C, 0x3fffffeb04) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcba40, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x8013, 0x3fffffeaf0) => 0xAABC1540
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x000C, 0x3fffffeb04) => 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb218, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x8013, 0x3fffffeaf0) => 0xAABBE210
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x000C, 0x3fffffeb04) => 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbb28, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x8013, 0x3fffffeaf0) => 0xAABC1620
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb300, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x8013, 0x3fffffeaf0) => 0xAABBE2F0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbc10, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x8013, 0x3fffffeaf0) => 0xAABC05D0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x000D, 0x3fffffeb08) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb3e8, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x8013, 0x3fffffeaf0) => 0xAABBE3D0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x000C, 0x3fffffeb04) => 0x0018
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x000D, 0x3fffffeb08) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbcf8, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x8013, 0x3fffffeaf0) => 0xAABC06B0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x000C, 0x3fffffeb04) => 0x0020
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x8013, 0x3fffffeaf0) => 0xAABBE4B0
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x0002, 0x3fffffeb0c) -> 0x0010
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x0008, 0x3fffffeaf4) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x0009, 0x3fffffeaf8) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x000A, 0x3fffffeafc) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x000B, 0x3fffffeb00) => 0x0008
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x000C, 0x3fffffeb04) => 0x0020
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x000D, 0x3fffffeb08) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcbde0, 0x186A1, 0x3fffffeb10) => 0x0000
glXGetFBConfigAttrib(0x2aaaba36a0, 0x2aaabcb4d0, 0x800B, 0x3fffffec54) => 0x0021
glXCreateNewContext(0x2aaaba36a0, 0x2aaabcb4d0, 32788, (nil), 1), drawableType=0x07
glXCreateContextAttribsARB(0x2aaaba36a0, 0x2aaabcb4d0, (nil), 1, (nil)) config is RGBA:8888, depth=32, stencil=0, multisample=0/0 doublebuff=1, drawable=7
 => return 0x2aaabc6160 (eglContext=0x2aab27cab0, context->shared=(nil))
glXGetCurrentContext()
glXQueryExtensionString(0x2aaaba36a0, 0)
glXMakeCurrent(0x2aaaba36a0, 0x3600002, 0x2aaabc6160), isPBuffer(drawable)=0, context->drawable=(nil), context->eglSurface=(nil)((nil)), context->doublebuff=1, glxContext=(nil)
LIBGL: eglMakeCurrent(0x2aab279fe0, 0x2aaad7f5e0, 0x2aaad7f5e0, 0x2aab27cab0)
LIBGL: EGLSurface for drawable 0x3600002 Added
 => True (glstate=0x2aaad80470)
glXSwapInterval(0)
LIBGL: Warning, Swap Interval 0 is out of possible values 1, 1
glXQueryDrawable(0x2aaaba36a0, 0x3600002(0), GLX_SWAP_INTERVAL_EXT, 0x3fffffecf4 = 1)
glXSwapInterval(0)
LIBGL: Warning, Swap Interval 0 is out of possible values 1, 1

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000002aaaacae94 in ?? ()
#2  0x0000002aaaac921e in ?? ()
#3  0x0000002aaaac973a in ?? ()
#4  0x0000002aaaac5c58 in main ()
(gdb)
ptitSeb commented 1 year ago

I don't understand. I have a Vision Five 2, and gles4 is working fine on the default debian image. Not parameter tinkering needed. I use LD_LIBRARY_PATH=~/git/gl4es/lib:$LD_LIBRARY_PATH glxgears and it just works.

hexdump0815 commented 1 year ago

it looks the problem is in the pvr gpu setup in my own image - will have to recheck that ... i guess as soon as i have sorted that out it should work if it works for you on the starfive image

hexdump0815 commented 1 year ago

i just confirmed that it is working fine on the original starfive debian image, so it is really a problem of my setup - sorry for the confusion

hexdump0815 commented 1 year ago

just as a little update: i have it somehow working now on my debian image using the starfive pvr, mesa and xorg binaries ... i was struggling quite a bit why glxgears were working, but glmark2 always failed on my image with "Failed to find suitable GLX FB config" but it worked on the starfive image ... after a lot of debugging i realized that the reson are the different glmark2 versions: 2021.12 in the starfive image and 2023.01 in my debian sid image were the problem - it looks like the newer glmark2 has problems with getting the best fb config ... the 2023.01 version actually works if i explicitely provide the visual config on the cmdline via: "glmark2 --visual-config buf=16:r=8:g=8:b=8:a=8:depth=24:stencil=8" ... glmark2-es2 has the same problem, so i think it is not related to gl4es, which is working quite well so far ...