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

Author: Eric Anholt <[email protected]>
Date:   Wed Jan 16 10:40:06 2013 -0800

mesa: Fix regression in dlist save primitive tracking.

My change 7ca4f07b5b77ccac0a9b60dc5ac9082906b5947e caused errors to not
be thrown when they should, because the new if statement for ExecuteFlag
made the CurrentSavePrimitive not get set.  And on further review, we
shouldn't be validating our primitive in GL_COMPILE mode, since the
command shouldn't be executed yet.

Partially fixes piglit gl-1.0-beginend-coverage.

Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>

---

 src/mesa/main/dlist.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 6b99f35..f8014a4 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -5648,16 +5648,9 @@ save_Begin(GLenum mode)
    Node *n;
    GLboolean error = GL_FALSE;
 
-   if (mode > GL_POLYGON) {
-      _mesa_error(ctx, GL_INVALID_ENUM, "glBegin(mode=%x)", mode);
+   if (ctx->ExecuteFlag && !_mesa_valid_prim_mode(ctx, mode, "glBegin")) {
       error = GL_TRUE;
    }
-   if (ctx->ExecuteFlag) {
-      if (!_mesa_valid_prim_mode(ctx, mode, "glBegin")) {
-        error = GL_TRUE;
-      }
-   }
-
    else if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN) {
       /* Typically the first begin.  This may raise an error on
        * playback, depending on whether CallList is issued from inside

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to