From 7a9a8bbabd27b8475b541cbdb2b43f75e23dbf4c Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Mon, 19 Sep 2011 15:03:03 +0800 Subject: [PATCH] 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 Signed-off-by: Brian Paul --- src/mesa/main/pixel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index 775746270d1..c87f5e0e9f7 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; -- 2.30.2