Auto takes the RADV pair on a Samsung Xclipse, with the system route as its fallback

A tester's Galaxy S24 FE (Xclipse 940) boots to Steam with the RADV-Xclipse pair, where the
system-driver route fails at Steam's OpenGL (glamor and GLX cannot load a driver). Auto now
downloads and selects RADV on an Xclipse like the Mali pairs, and falls back to the system route
only when RADV is not published. #570's reset of both drivers at each start no longer undoes an
open driver pair. PowerVR (vulkan.powervr.so) keeps the system driver as before.
This commit is contained in:
The412Banner committed 2026-10-12 20:08:55 -04:00
1 parent 6cfec416e2
commit 39631f30c8
4 files changed
+23 -5

No files matched your search

@@ -157,7 +157,7 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
fun ensureAuto(force: Boolean) {
mode = SessionPrefs.gpuDriverMode(activity)
if (mode != SessionPrefs.GPU_DRIVERS_AUTO || pairBusy != null || releaseChecking) return
if (gpu.family == GpuInfo.Family.POWERVR) {
if (gpu.family == GpuInfo.Family.POWERVR && !SystemVulkanDriver.isXclipse()) {
// Auto owns both choices. Manual imports remain available when Manual is selected.
SessionPrefs.ensurePowerVrAutoDrivers(activity)
autoStatus = activity.getString(R.string.drivers_powervr_builtin)
@@ -211,6 +211,12 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
when {
row?.active == true -> autoStatus = problem?.let { activity.getString(R.string.drivers_up_to_date_check_failed, it) }
?: activity.getString(R.string.upd_current_status)
gpu.family == GpuInfo.Family.POWERVR && (pair == null || !pair.complete) -> {
// RADV is not published right now: the Xclipse falls back to the system route.
SessionPrefs.ensurePowerVrAutoDrivers(activity)
autoStatus = activity.getString(R.string.drivers_powervr_builtin)
refreshDrivers()
}
gpu.family.mali && (pair == null || !pair.complete) -> {
// No open driver for this Mali published yet: draw through the bridge.
useMaliBridge()
@@ -139,9 +139,11 @@ object DriverPairs {
* the 710/720/722, and upstream Banners-Turnip for the rest. Null when nothing fits (not Adreno).
*/
fun recommendedKey(gpu: GpuInfo, pairs: List<DriverPair>, sdk: Int = android.os.Build.VERSION.SDK_INT): String? = when (gpu.family) {
// PowerVR and Xclipse keep the system driver (RADV stays a manual choice); a Mali no open
// build covers draws through the Vulkan bridge instead (DriverMenus.ensureAuto).
Family.NOT_ADRENO, Family.POWERVR, Family.MALI_OTHER -> null
// Xclipse takes the RADV pair (testers: it boots to Steam where the system route's GL fails),
// with the system route as its fallback; PowerVR keeps the system driver. A Mali no open
// build covers draws through the Vulkan bridge (DriverMenus.ensureAuto).
Family.POWERVR -> NAD_RADV_XCLIPSE.takeIf { gpu.name.contains("Xclipse", ignoreCase = true) }
Family.NOT_ADRENO, Family.MALI_OTHER -> null
Family.MALI_JM, Family.MALI_G610_G710, Family.MALI_G615, Family.MALI_G720, Family.MALI_LATEST -> maliKey(gpu, pairs, sdk)
Family.A8XX -> if (gpu.model == 840) newestDdTurnip(pairs) ?: WN_BALANCED else WN_BALANCED
Family.A7XX_LOW -> BANNER_710
@@ -220,7 +220,11 @@ object SessionPrefs {
/** Also called by direct session launches, which may never open the driver settings. */
@JvmStatic
fun ensurePowerVrAutoDrivers(context: Context) = ensurePowerVrAutoDrivers(context, SystemVulkanDriver.isPowerVr())
fun ensurePowerVrAutoDrivers(context: Context) {
// An open driver pair Auto chose for this GPU (RADV on an Xclipse) is not undone here.
if (com.droiddeck.launcher.core.DeviceSupport.openDriverActive(context)) return
ensurePowerVrAutoDrivers(context, SystemVulkanDriver.isPowerVr())
}
internal fun ensurePowerVrAutoDrivers(context: Context, powerVr: Boolean) {
if (!powerVr || gpuDriverMode(context) != GPU_DRIVERS_AUTO) return
@@ -229,4 +229,10 @@ class DriverPairsTest {
assertEquals(Family.MALI_LATEST, GpuInfo.familyOf(false, 0, mali = "Mali-G925 (by chip mt6991)"))
assertTrue(GpuInfo.maliKbaseCovered("Mali-G720 (by chip mt6989)"))
}
@Test
fun autoTakesRadvOnAnXclipseAndLeavesPowerVrOnTheSystemDriver() {
assertEquals(DriverPairs.NAD_RADV_XCLIPSE, DriverPairs.recommendedKey(GpuInfo("Samsung Xclipse 940", 0, Family.POWERVR, "", false), emptyList()))
assertNull(DriverPairs.recommendedKey(GpuInfo("PowerVR", 0, Family.POWERVR, "", false), emptyList()))
}
}