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>
This commit is contained in:
Timothy Arceri 2025-05-22 23:52:01 +10:00 committed by Marge Bot
parent 38f8e82dd2
commit 27945bbd8a

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 {