Mesa (master): mesa: minor state-update changes in histogram code

Brian Paul brianp at kemper.freedesktop.org
Wed Apr 22 22:44:12 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr 22 16:41:05 2009 -0600

mesa: minor state-update changes in histogram code

Call FLUSH_VERTICES() in _mesa_Histogram().
No need to signal _NEW_PIXEL in ResetHistogram(), ResetMinmax().

---

 src/mesa/main/histogram.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index 905c1ad..5fee4fd 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -975,6 +975,8 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
       }
    }
 
+   FLUSH_VERTICES(ctx, _NEW_PIXEL);
+
    /* reset histograms */
    for (i = 0; i < HISTOGRAM_TABLE_SIZE; i++) {
       ctx->Histogram.Count[i][0] = 0;
@@ -1002,8 +1004,6 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
       ctx->Histogram.AlphaSize     = 8 * sizeof(GLuint);
       ctx->Histogram.LuminanceSize = 8 * sizeof(GLuint);
    }
-
-   ctx->NewState |= _NEW_PIXEL;
 }
 
 
@@ -1058,8 +1058,6 @@ _mesa_ResetHistogram(GLenum target)
       ctx->Histogram.Count[i][2] = 0;
       ctx->Histogram.Count[i][3] = 0;
    }
-
-   ctx->NewState |= _NEW_PIXEL;
 }
 
 
@@ -1083,7 +1081,6 @@ _mesa_ResetMinmax(GLenum target)
    ctx->MinMax.Min[GCOMP] = 1000;    ctx->MinMax.Max[GCOMP] = -1000;
    ctx->MinMax.Min[BCOMP] = 1000;    ctx->MinMax.Max[BCOMP] = -1000;
    ctx->MinMax.Min[ACOMP] = 1000;    ctx->MinMax.Max[ACOMP] = -1000;
-   ctx->NewState |= _NEW_PIXEL;
 }
 
 




More information about the mesa-commit mailing list