gl4es icon indicating copy to clipboard operation
gl4es copied to clipboard

Support for ARM Cortex-A53 CPU + PowerVR GE8300 GPU?

Open Ultrahead opened this issue 1 month ago • 7 comments

I have been compiling the source code with custom builds like ...:

cmake .. -DNOX11=ON -DGLX_STUBS=OFF -DGBM=OFF -DNOEGL=ON -DDEFAULT_ES=0

this ...

cmake .. -DNOX11=ON -DGLX_STUBS=OFF -DGBM=OFF -DNOEGL=OFF -DDEFAULT_ES=0

or this ...

cmake .. -DNOX11=ON -DGLX_STUBS=OFF -DGBM=OFF -DNOEGL=OFF -DDEFAULT_ES=0 -DEGL_WRAPPER=ON

... but it fails to work on a system with ARM Cortex-A53 CPU cores and a PowerVR GE8300 GPU. With different logs and errors depending on the build combination used. The target platform does not come with either X Windows or Wayland (and cannot be installed either).

So I was wondering whether the current version of gl4es does support such architectures. Thanks

Ultrahead avatar Oct 30 '25 19:10 Ultrahead

Cortex A53 is supported, no issue. The PowerVR GE8300 GPU, probably, as long as it support GLES2

But no X11 and no Wayland? That means you need to provide all the "EGL" part, which is quite complicated. What system is that and how GLES context can be provided?

ptitSeb avatar Oct 30 '25 20:10 ptitSeb

It's a Trimui Smart Pro. Yes, it supports upto GLES3.1.

There was an issue with RetroArch when attempting to use EGL lower than 1.5 for some Linux devices. Saving distances, maybe it could shed a light ... or not.

But no X11 and no Wayland?

And no package managers, either.

Ultrahead avatar Oct 30 '25 22:10 Ultrahead

how GLES context can be provided?

Through a custom version of SDL2, tailored for the GPU (actually it reuses code for MALI, that works).

EDIT: I'm trying to run an OpenTK project on said retro console targeting ES11 (fixed-pipeline functions) ...

using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.ES11;
using System;

namespace TestGLES11
{
    internal class Program
    {
        public static void Main()
        {
            using (var game = new GLES11Example())
            {
                game.Run();
            }
        }
    }

    public class GLES11Example : GameWindow
    {
        static readonly GraphicsMode CompatibleMode = new GraphicsMode(
                    new ColorFormat(32),
                    24,
                    0,
                    0,
                    ColorFormat.Empty,
                    1,
                    false
                    );

        public GLES11Example() : base
            (
                1280, 720,
                CompatibleMode,
                "TestGLES11",
                GameWindowFlags.Fullscreen,
                DisplayDevice.Default,
                major: 3, minor: 0,
                GraphicsContextFlags.Default
            )
        {
            Title = "OpenTK OpenGL ES 1.1 Example";
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            GL.ClearColor(0.2f, 0.3f, 0.3f, 1.0f);

            GL.EnableClientState(All.VertexArray);
            GL.EnableClientState(All.ColorArray);
        }

        protected override void OnRenderFrame(FrameEventArgs args)
        {
            base.OnRenderFrame(args);

            GL.Clear(ClearBufferMask.ColorBufferBit);

            GL.MatrixMode(All.Projection);
            GL.LoadIdentity();
            GL.Ortho(-1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f);

            GL.MatrixMode(All.Modelview);
            GL.LoadIdentity();

            float[] vertices = {
            0.0f,  0.5f, 0.0f,
            -0.5f, -0.5f, 0.0f,
            0.5f, -0.5f, 0.0f
        };

            float[] colors = {
            1.0f, 0.0f, 0.0f, 1.0f,
            0.0f, 1.0f, 0.0f, 1.0f,
            0.0f, 0.0f, 1.0f, 1.0f
        };

            GL.VertexPointer(3, All.Float, 0, vertices);
            GL.ColorPointer(4, All.Float, 0, colors);

            GL.DrawArrays(All.Triangles, 0, 3);

            SwapBuffers();
        }

        protected override void OnUnload(EventArgs e)
        {
            base.OnUnload(e);

            GL.DisableClientState(All.VertexArray);
            GL.DisableClientState(All.ColorArray);
        }
    }
}

Ultrahead avatar Oct 30 '25 22:10 Ultrahead

Any idea @ptitSeb ?

Ultrahead avatar Oct 31 '25 12:10 Ultrahead

Sorry to summon you like this @nevrdid but since you worked on some modifications related to EGL to make PPSSPP work for Crossmix, maybe can help here to solve this

Ultrahead avatar Oct 31 '25 22:10 Ultrahead

Sorry I'm not into that codebase but what about setting LIBGL_GLES env var and maybe not set NOEGL with LIBGL_EGL env var?? The changed I did for PPSSPP was just to use imgtec egl wrapper but using directly the libEGL should work too afair. Also, I'm not that acknowledged with gles context ^^' I recently given up building duckstation with gl renderer as i didn't success to get surface created after glad initialized.

Nevrdid avatar Nov 01 '25 19:11 Nevrdid

I have tried many combinations, and none of them worked. The goal is to make the test work and if I succeed, then there could be great chances for CSpect emulator to work on the TSP.

If you are interested, I could share what I'm using so you can take a look and test yourselve, @Nevrdid

Ultrahead avatar Nov 01 '25 21:11 Ultrahead