From a1f16b59b3ce7e1498e08d57947bbc9cf78624ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 19 Dec 2020 01:48:40 -0500 Subject: [PATCH] mesa: flush glBegin/End before changing GL_DEPTH_STENCIL_TEXTURE_MODE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 23e81b93bbe3 "mesa: Add core API support for GL_ARB_stencil_texturing (from 4.3)." Reviewed-by: Zoltán Böszörményi Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/texparam.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index a05615e2386..dffc509bece 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -506,6 +506,8 @@ set_tex_parameteri(struct gl_context *ctx, if (texObj->StencilSampling == stencil) return GL_FALSE; + /* This should not be restored by glPopAttrib. */ + FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT); texObj->StencilSampling = stencil; return GL_TRUE; }