Mesa (master): mesa: reset primitive restart state in glClientAttribDefaultEXT

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 27 12:11:58 UTC 2020


Module: Mesa
Branch: master
Commit: 00b57915414da01868ff40ecacfe61db9af0d9c5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=00b57915414da01868ff40ecacfe61db9af0d9c5

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Mar 21 20:01:37 2020 -0400

mesa: reset primitive restart state in glClientAttribDefaultEXT

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

---

 src/mesa/main/attrib.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index b7e06ca21da..e3df99b0396 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1926,6 +1926,15 @@ _mesa_ClientAttribDefaultEXT( GLbitfield mask )
       }
 
       _mesa_ClientActiveTexture(GL_TEXTURE0);
+
+      _mesa_PrimitiveRestartIndex_no_error(0);
+      if (ctx->Version >= 31)
+         _mesa_Disable(GL_PRIMITIVE_RESTART);
+      else if (_mesa_has_NV_primitive_restart(ctx))
+         _mesa_DisableClientState(GL_PRIMITIVE_RESTART_NV);
+
+      if (_mesa_has_ARB_ES3_compatibility(ctx))
+         _mesa_Disable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
    }
 }
 



More information about the mesa-commit mailing list