mesa: flush glBegin/End before changing GL_DEPTH_STENCIL_TEXTURE_MODE

Fixes: 23e81b93bb "mesa: Add core API support for GL_ARB_stencil_texturing (from 4.3)."

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
This commit is contained in:
Marek Olšák 2020-12-19 01:48:40 -05:00
parent 35be83846e
commit a1f16b59b3

View file

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