Mesa (7.11): mesa: fix error handling for glPixelZoom

Ian Romanick idr at kemper.freedesktop.org
Mon Oct 24 22:54:48 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 8fb8b8528de66e547833d0f357cc6d1e0912e1bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8fb8b8528de66e547833d0f357cc6d1e0912e1bc

Author: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Date:   Mon Sep 19 15:03:03 2011 +0800

mesa: fix error handling for glPixelZoom

According the man page, GL_INVALID_OPERATION should generated if
glPixelZoom is executed between the execution of glBegin and the
corresponding execution of glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Signed-off-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit 7a9a8bbabd27b8475b541cbdb2b43f75e23dbf4c)

---

 src/mesa/main/pixel.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 7757462..c87f5e0 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -52,6 +52,8 @@ _mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor )
 {
    GET_CURRENT_CONTEXT(ctx);
 
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
    if (ctx->Pixel.ZoomX == xfactor &&
        ctx->Pixel.ZoomY == yfactor)
       return;




More information about the mesa-commit mailing list