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

GOA_CLONE definitions, EGL wrapper fixes, GLX Stubs and Iconoclasts hacks #362

Merged
merged 9 commits into from
Nov 8, 2021

Conversation

JohnnyonFlame
Copy link
Contributor

@JohnnyonFlame JohnnyonFlame commented Nov 8, 2021

This PR contains a set of changes developed to bring GL4ES for GO Advance clones, such as:

  • Fixed EGL wrappers bit rot. (Fixes SDL2.0 titles using EGL-based backend with GL4ES, see remarks).
  • Added GLX stubs. (Fixes Shovel Knight GLEW assertion failures.)
  • Added shader hack to remove newline escapes, fixes shader compilation failures on mali blobs. (Fixes crashes on Iconoclasts)
  • Added Iconoclasts specific hacks for GOA_CLONE target (see remarks).

Remarks:

  • For SDL2.0 applications in EGL-based backends such as KMSDRM, in order for GL4ES functionality to work seamlessly, you will might want to expose a couple video driver env vars from libraries built from this repository. This ensures SDL2.0 will go through GL4ES instead of the actual system's driver, fixing issues with missing extensions that should've been provided by GL4ES (such as in Chowdren titles like Iconoclasts or Freedom Planet).
export SDL_VIDEO_GL_DRIVER=/path/to/libGL.so.1
export SDL_VIDEO_EGL_DRIVER=/path/to/libEGL.so.1 
  • For Iconoclasts on the GOA_CLONE target platforms, use export LIBGL_SKIPTEXCOPIES=1 and maybe export LIBGL_FB_TEX_SCALE=0.5 on 480p GO Advance clones. Despite improved performance, further hacks are needed to stop the game from falling back into a broken frame limiting scheme that tanks performance, these fixes can be found in this repository under the Iconoclasts target.

Sets compilation definitions for GO Advance clones, such as the RG351p/v, Gameforce Chi, RGB10 and other such devices.
Can be enabled with GLX_STUBS, Works around Shovel Knight assert failures during startup.
The envvar LIBGL_FB_TEX_SCALE controls the scale of the framebuffer textures.
The envvar LIBGL_SKIPTEXCOPIES controls whether or not to skip texture copies are skipped.
@ptitSeb ptitSeb merged commit 4f2151a into ptitSeb:master Nov 8, 2021
@JohnnyonFlame
Copy link
Contributor Author

Added the patches to the main comment for PR documentation sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants