mesa: extend linear_as_nearest work around

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35107>
(cherry picked from commit 27945bbd8a)
This commit is contained in:
Timothy Arceri 2025-05-22 23:52:01 +10:00 committed by Eric Engestrom
parent b00d4807ac
commit 1b7e6d305b
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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 {