From b5e9339c6620a805f0d6e64d147a18005f35aed2 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 12 Aug 2026 01:21:47 -0400 Subject: [PATCH] [Fix] (MG_Util): the unsupported-buffer-textures log tells a too-old driver apart from one whose entry point failed to resolve --- .../MG_Util/BackendLoaders/OpenGL/Loader.cpp | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/MobileGL/MG_Util/BackendLoaders/OpenGL/Loader.cpp b/MobileGL/MG_Util/BackendLoaders/OpenGL/Loader.cpp index 5bca6847..d724eafe 100644 --- a/MobileGL/MG_Util/BackendLoaders/OpenGL/Loader.cpp +++ b/MobileGL/MG_Util/BackendLoaders/OpenGL/Loader.cpp @@ -1176,12 +1176,20 @@ namespace MobileGL::MG_Util::BackendLoader { // program build, and as its own driver POST row - because GL offers no way to say // "buffer textures exist but cannot work". if (caps.TextureBufferSupport == Tier::None) { - MGLOG_I(" Buffer textures: UNSUPPORTED (ES %d.%d core needs 3.2, and neither " - "GL_EXT_texture_buffer nor GL_OES_texture_buffer is present). Any shader " - "sampling a samplerBuffer will fail to compile, and MobileGL keeps " - "advertising GL_MAX_TEXTURE_BUFFER_SIZE = %d because a GL 4.x context may " - "not report 0.", - caps.GLESVersion.Major, caps.GLESVersion.Minor, maxTextureBufferSize); + // Two ways to land here, and they are worth telling apart: the ordinary one (too + // old, no extension) and the pathological one (the driver says it has them but + // no entry point resolved), which is a driver or loader fault, not a missing + // feature. + const Bool claimsSupport = esAtLeast32 || hasExtTextureBuffer || hasOesTextureBuffer; + MGLOG_I(" Buffer textures: UNSUPPORTED (%s). Any shader sampling a " + "samplerBuffer will fail to compile, and MobileGL keeps advertising " + "GL_MAX_TEXTURE_BUFFER_SIZE = %d because a GL 4.x context may not report 0.", + claimsSupport + ? "this driver advertises buffer textures but no glTexBuffer entry " + "point resolved, so none of them can be called" + : "ES core needs 3.2, and neither GL_EXT_texture_buffer nor " + "GL_OES_texture_buffer is present", + maxTextureBufferSize); } } if (caps.SupportsTextureFilterAnisotropy) {