summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-04-28 13:43:39 +0800
committerEric Anholt <eric@anholt.net>2013-12-18 11:23:51 -0800
commit0d846d95699fadcddcc77b8d6e432e969467dab2 (patch)
treef87c3593a8b24711f6a50bd49897d1aa0fc842fc
parent503f8ec1a670e73f41314a5e94cdde8782d7cbab (diff)
Added --enable-debug configuration option.
For release version, we disable asserts. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--glamor/glamor_egl.c3
-rw-r--r--glamor/glamor_priv.h4
-rw-r--r--glamor/glamor_render.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 081b363ab..c2627b9ce 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -287,7 +287,8 @@ glamor_egl_create_textured_pixmap(PixmapPtr pixmap, int handle, int stride)
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Couldn't flink pixmap handle\n");
glamor_set_pixmap_type(pixmap, GLAMOR_DRM_ONLY);
- exit(1);
+ assert(0);
+ return FALSE;
}
} else
name = handle;
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 2aa03d005..91473c32d 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -32,7 +32,9 @@
#endif
#include <xorg-server.h>
-
+#ifndef DEBUG
+#define NDEBUG
+#endif
#include "glamor.h"
#define GL_GLEXT_PROTOTYPES
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index de01aab33..3f3a3bc18 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -427,7 +427,7 @@ glamor_init_composite_shaders(ScreenPtr screen)
}
if (eb == NULL)
- FatalError("fatal error, fail to get eb.\n");
+ FatalError("fatal error, fail to get element buffer. GL context may be not created correctly.\n");
glamor_init_eb(eb, GLAMOR_COMPOSITE_VBO_VERT_CNT);
if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {