From 27945bbd8a22643b0e5ef955dd96bce864f8da31 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 22 May 2025 23:52:01 +1000 Subject: [PATCH] mesa: extend linear_as_nearest work around MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Here we allow packed stencils to skip the completeness check also. Will be used in the following patch for a bug in the game Foundation. Cc: mesa-stable Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/texobj.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index 6b813a07c99..754fdd3b33e 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -152,7 +152,8 @@ _mesa_is_texture_complete(const struct gl_texture_object *texObj, * but some applications (eg: Grid Autosport) uses the default * filtering values. */ - if (texObj->_IsIntegerFormat && + if ((texObj->_IsIntegerFormat || + (texObj->StencilSampling && img->_BaseFormat == GL_DEPTH_STENCIL)) && linear_as_nearest_for_int_tex) { /* Skip return */ } else {