# Status of SDL2 on Allwinner H3 (Mali400 GPU)

**URL:** <https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679>\
**Category:** SDL Development\
**Created:** [July 8, 2018, 3:26am UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679 "2018-07-08T03:26:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Anthony](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/stephen_anthony/32/2866_2.png) [@Stephen\_Anthony](https://discourse.libsdl.org/u/Stephen_Anthony)\
**Post date:** [July 8, 2018, 3:26am UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/1 "2018-07-08T03:26:19Z")

</div>

I’m wondering on the status of SDL2 in framebuffer mode on this hardware. Specifically, I’m looking at accelerated framebuffer support; I don’t need (or want in this case) X11 support. It is for an OrangePi-like system where my code is SDL2-based (Stella, Atari 2600 emulator), but the current builds only support kernel 3.x, SDL1 and a much older version of the software.

I’d like to get the userland working with whatever is needed for up-to-date SDL2 support (I guess a new kernel, updated drivers, etc). Can anyone point me in the right direction??

---

<div class="post-metadata">

**Author:** ![EternalLands](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/e9c0ed/32.png) [@EternalLands](https://discourse.libsdl.org/u/EternalLands)\
**Post date:** [July 8, 2018, 4:50am UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/2 "2018-07-08T04:50:38Z")

</div>

SDL2 doesn’t offer framebuffer support anymore. It does it by putting your ‘framebbuffer’ in a texture and drawing the texture on screen. So if you don’t have proper 3d support on that device, it will probably be pretty slow.

---

<div class="post-metadata">

**Author:** ![Stephen\_Anthony](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/stephen_anthony/32/2866_2.png) [@Stephen\_Anthony](https://discourse.libsdl.org/u/Stephen_Anthony)\
**Post date:** [July 8, 2018, 1:58pm UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/3 "2018-07-08T13:58:58Z")

</div>

OK, so the question changes to, what is the current support in SDL2 for 3d-accelerated Mali400 hardware?

---

<div class="post-metadata">

**Author:** ![EternalLands](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/e9c0ed/32.png) [@EternalLands](https://discourse.libsdl.org/u/EternalLands)\
**Post date:** [July 8, 2018, 2:07pm UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/4 "2018-07-08T14:07:57Z")

</div>

If there is OpenGL ES hardware support, I guess it should work under X11. For raspberry pi it works outside X11 but not sure if it’s ported for other similar platforms.

---

<div class="post-metadata">

**Author:** ![Stephen\_Anthony](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/stephen_anthony/32/2866_2.png) [@Stephen\_Anthony](https://discourse.libsdl.org/u/Stephen_Anthony)\
**Post date:** [July 8, 2018, 2:29pm UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/5 "2018-07-08T14:29:11Z")

</div>

Thanks for the info. Can anyone specifically familiar with the RPi situation say if Mali400 hardware supports 3D acceleration/OpenGL ES outside X11 for platforms other than the Pi?

---

<div class="post-metadata">

**Author:** ![EternalLands](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/e9c0ed/32.png) [@EternalLands](https://discourse.libsdl.org/u/EternalLands)\
**Post date:** [July 8, 2018, 2:33pm UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/6 "2018-07-08T14:33:05Z")

</div>

The Pi doesn’t use a Mali GPU though.

Take a look at this: [https://github.com/Aloshi/EmulationStation/issues/199](https://github.com/Aloshi/EmulationStation/issues/199)

---

<div class="post-metadata">

**Author:** ![q3dev](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/q/9e8a1a/32.png) [@q3dev](https://discourse.libsdl.org/u/q3dev)\
**Post date:** [July 10, 2018, 7:31pm UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/7 "2018-07-10T19:31:03Z")

</div>

Have a look at this project:

[https://github.com/mihailescu2m/libsdl2-2.0.2-dfsg1](https://github.com/mihailescu2m/libsdl2-2.0.2-dfsg1)

You can create a patch from the repository above to update a current version of SDL2 to support the Mali, something similar to this:

[https://github.com/RetroPie/SDL-mirror/commit/ab0cc17ccadb24f2a20deab249c82bcee6f33e69](https://github.com/RetroPie/SDL-mirror/commit/ab0cc17ccadb24f2a20deab249c82bcee6f33e69)

It should run outside of x11. A user of my game project got things working on a Mali450 with the repository mentioned above.

[https://github.com/cdev-tux/q3lite/issues/6](https://github.com/cdev-tux/q3lite/issues/6)

Hope that helps you.

---

<div class="post-metadata">

**Author:** ![Stephen\_Anthony](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/stephen_anthony/32/2866_2.png) [@Stephen\_Anthony](https://discourse.libsdl.org/u/Stephen_Anthony)\
**Post date:** [July 10, 2018, 7:57pm UTC](https://discourse.libsdl.org/t/status-of-sdl2-on-allwinner-h3-mali400-gpu/24679/8 "2018-07-10T19:57:45Z")

</div>

Thanks for the info and links. I forgot to respond to the previous poster that the link he provided actually pointed me to the SDL fork that you mention. And now that I see it’s working on a semi-intensive game, I’m much more confident I can get it to work for my simple application.

Thanks to both of you 🙂
