aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /mesalib/src/mesa/main/dlist.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'mesalib/src/mesa/main/dlist.c')
-rw-r--r--mesalib/src/mesa/main/dlist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c
index 420ddcc0c..f113573d8 100644
--- a/mesalib/src/mesa/main/dlist.c
+++ b/mesalib/src/mesa/main/dlist.c
@@ -5767,10 +5767,16 @@ save_Begin(GLenum mode)
Node *n;
GLboolean error = GL_FALSE;
- if (!_mesa_valid_prim_mode(ctx, mode)) {
- _mesa_compile_error(ctx, GL_INVALID_ENUM, "glBegin(mode)");
+ if (mode > GL_POLYGON) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBegin(mode=%x)", mode);
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