From d4dfb56423d64c2a9e03c8f853d80f050b1ddda4 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 3 Jun 2025 22:08:01 +0800 Subject: [PATCH] [Fix] (glsl_for_es.cpp): inject textureQueryLod emulation only when GL_EXT_texture_query_lod is not available --- src/main/cpp/gl/glsl/glsl_for_es.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/cpp/gl/glsl/glsl_for_es.cpp b/src/main/cpp/gl/glsl/glsl_for_es.cpp index 5f7bf8d..5846e99 100644 --- a/src/main/cpp/gl/glsl/glsl_for_es.cpp +++ b/src/main/cpp/gl/glsl/glsl_for_es.cpp @@ -562,9 +562,11 @@ std::string preprocess_glsl(const std::string& glsl) { // GI_TemporalFilter injection inject_temporal_filter(ret); - + // textureQueryLod injection - inject_textureQueryLod(ret); + if (!g_gles_caps.GL_EXT_texture_query_lod) { + inject_textureQueryLod(ret); + } // MobileGlues macros injection inject_mg_macro_definition(ret);