Skip to content

gl2: disable tex-storage path on Android Adreno 8xx/X1#18758

Merged
LibretroAdmin merged 1 commit intolibretro:masterfrom
aurokin:fix/android-adreno8xx-gl2-texstorage-guard
Feb 23, 2026
Merged

gl2: disable tex-storage path on Android Adreno 8xx/X1#18758
LibretroAdmin merged 1 commit intolibretro:masterfrom
aurokin:fix/android-adreno8xx-gl2-texstorage-guard

Conversation

@aurokin
Copy link
Contributor

@aurokin aurokin commented Feb 22, 2026

Title

Android GL2: disable glTexStorage path on Qualcomm Adreno 8xx/X1 to avoid black-screen regressions

Summary

This patch adds a targeted Android GLES quirk in gfx/drivers/gl2.c to disable the glTexStorage texture allocation path on Qualcomm Adreno 8xx/X1 devices.

On affected Snapdragon Elite-class devices, GL HW-rendered content can run audio with no video (black screen). Falling back to the existing glTexImage2D path resolves rendering.

Problem

On Android devices using newer Qualcomm Adreno 8xx/X1 drivers, GLideN64 (and other GL HW contexts) can produce black screen while content/audio continues.

Observed behavior in failing runs includes:

  • E libEGL: called unimplemented OpenGL ES API

Failing log evidence (stock RetroArch + stock core):

02-22 11:38:44.570 16020 16042 I RetroArch: [ENV] Libretro path: "/data/user/0/com.retroarch.aarch64/cores/".
02-22 11:38:44.610 16020 16042 I AdrenoGLES-0: Driver Version                   : 0800.58
02-22 11:38:44.622 16020 16042 E libEGL  : called unimplemented OpenGL ES API
Using old --libretro behavior. Setting libretro_directory to "/data/user/0/com.retroarch.aarch64/cores/" instead.
[Android] EGL: GLES version = 2.
[EGL] EGL version: 1.5.
[GL] Vendor: Qualcomm, Renderer: Adreno (TM) 830.
[GL] Version: OpenGL ES 3.2 [email protected] (GIT@a9ee82cd83, If0819e6d27, 1759945866) (Date:10/08/25).

Change

  • Added gl2_tex_storage_allowed() in gfx/drivers/gl2.c
  • In Android GLES builds, detect Qualcomm Adreno renderer strings.
  • If renderer is Adreno model >= 800 or contains X1, disable glTexStorage use.
  • gl2_load_texture_image() now gates tex-storage path through this check.

No behavior changes for non-Android builds or non-affected GPUs.

Why RetroArch-side (not core-side)

mupen64plus-libretro-nx requests a HW GL context through libretro, but frontend texture allocation behavior in GL2 is owned by RetroArch.

Core-only experiments were run and did not resolve black screen on stock RetroArch.

Validation

Device-tested on Android arm64 with com.retroarch.aarch64:

  • Stock RA + stock core: black screen
  • Stock RA + core-only experimental patches: black screen
  • Patched RA + stock core: renders correctly

Latest retest (2026-02-22) with this cleaned patch also passed (non-black screenshot metrics captured).

Patched run evidence (patched RetroArch + stock core):

02-22 11:22:52.010 11408 11444 I RetroArch: [ENV] Libretro path: "/data/user/0/com.retroarch.aarch64/cores/mupen_test_ra_patchopt.so".
02-22 11:22:52.292 11408 11444 I AdrenoGLES-0: Driver Version                   : 0800.58
No `called unimplemented OpenGL ES API` entry observed in patched run log.

Related issues

User Comment

I ran into this issue on my Odin 3 trying to use GLideN64 to play Paper Mario for N64. Seems like it could be an issue effecting more than just GLideN64 on snapdragon elite devices. After the patch its working on my device, I was even able to load high res textures via .htc files from the paper mario 4k texture pack. I hope this helps and no worries if this isn't mergeable its out of my area of expertise, I've hosted temporary artifacts for other users to try for now. I used codex-5.3-xhigh to generate this code.

@Zayr64
Copy link

Zayr64 commented Feb 22, 2026

Can confirm this works on Samsung Galaxy s25+.

I imagined it wouldn't work because of Samsung drivers, but long and behold, its working perfectly fine.

Thank you so much, for the time being, i will be using this fork, just need to try Retroachievements.

@LibretroAdmin LibretroAdmin merged commit afc7518 into libretro:master Feb 23, 2026
35 checks passed
ak5k pushed a commit to ak5k/RetroArch that referenced this pull request Feb 24, 2026
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.

3 participants