mesa: fix error handling for glPixelZoom
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 19 Sep 2011 07:03:03 +0000 (15:03 +0800)
committerBrian Paul <brianp@vmware.com>
Mon, 19 Sep 2011 14:11:52 +0000 (08:11 -0600)
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@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/main/pixel.c

index 775746270d147ba024f6404020b0728c2a219797..c87f5e0e9f76d9beee4bd44e2290d827f7cc270d 100644 (file)
@@ -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;