From 1b7e6d305b3ffe85b1c5752a8c7652bc62652dea 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: (cherry picked from commit 27945bbd8a22643b0e5ef955dd96bce864f8da31) --- .pick_status.json | 2 +- src/mesa/main/texobj.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4b960b76cc7..cdff81b2ec9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1684,7 +1684,7 @@ "description": "mesa: extend linear_as_nearest work around", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null 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 {