From 5398fb4289e28cf0a50eca4a8f98525bfd1f9c6a Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 25 Aug 2026 04:52:21 -0400 Subject: [PATCH] [Fix] (IntegrationTest): report the backend that actually comes up when MOBILEGL_BACKEND_TYPE is unset HeadlessGL reported the literal "" as the backend name when the variable was not set, while MG_ConfigLoader::InitBackendType defaults it to DirectGLES and brought DirectGLES up. Every ctest entry sets the variable through its ENVIRONMENT property, which is why nothing ever noticed - but run straight from an adb shell, where nothing sets it, the name matched neither backend and every case gated on DirectGLES skipped as though DirectGLES were not running. On an Adreno 830 that silently disabled the gl_ViewportIndex emulation control and the DirectGLES-only attachment scenarios. --- MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp b/MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp index 04de58bd..74dab901 100644 --- a/MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp +++ b/MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp @@ -552,7 +552,15 @@ namespace MGITest { // before the pre-flight forks - the child must measure the same platform // the parent will use. EnsureHeadlessPlatform(); - m_backendName = EnvOr("MOBILEGL_BACKEND_TYPE", ""); + // The backend that is actually about to come up, which is what every + // `BackendName() == "DirectGLES"` gate in the scenarios means by the question. + // MG_ConfigLoader::InitBackendType defaults an unset MOBILEGL_BACKEND_TYPE to + // DirectGLES, so the same default belongs here; this used to report the literal + // "" instead. Under ctest the variable is always set by the ENVIRONMENT + // property, which is why that never showed - but run straight from a device + // shell, where nothing sets it, DirectGLES came up and every case gated on the + // NAME DirectGLES skipped as though it had not. + m_backendName = EnvOr("MOBILEGL_BACKEND_TYPE", "DirectGLES"); m_usable = BringUp(); }