diff options
author | Marek Olšák <[email protected]> | 2019-05-09 21:04:23 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-29 21:13:35 -0400 |
commit | b5697c311b6f29dee40b96c48bad3279e3667c1e (patch) | |
tree | d0708cd5249ec8d3535bda8134f91ea79af2ffde /src/mesa/vbo | |
parent | 0f1b68ebeeee196ced42d8ac66d231338b507bad (diff) |
Change a few frequented uses of DEBUG to !NDEBUG
debugoptimized builds don't define NDEBUG, but they also don't define
DEBUG. We want to enable cheap debug code for these builds.
I only chose those occurences that I care about.
Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo_exec.h | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h index 1170883f871..2624dcec0f2 100644 --- a/src/mesa/vbo/vbo_exec.h +++ b/src/mesa/vbo/vbo_exec.h @@ -111,7 +111,7 @@ struct vbo_exec_context /* Which flags to set in vbo_exec_begin_vertices() */ GLbitfield begin_vertices_flags; -#ifdef DEBUG +#ifndef NDEBUG GLint flush_call_depth; #endif }; diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 5b1549d96de..bcab3f05342 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -1251,7 +1251,7 @@ vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags) { struct vbo_exec_context *exec = &vbo_context(ctx)->exec; -#ifdef DEBUG +#ifndef NDEBUG /* debug check: make sure we don't get called recursively */ exec->flush_call_depth++; assert(exec->flush_call_depth == 1); @@ -1259,7 +1259,7 @@ vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags) if (_mesa_inside_begin_end(ctx)) { /* We've had glBegin but not glEnd! */ -#ifdef DEBUG +#ifndef NDEBUG exec->flush_call_depth--; assert(exec->flush_call_depth == 0); #endif @@ -1273,7 +1273,7 @@ vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags) */ ctx->Driver.NeedFlush &= ~(FLUSH_UPDATE_CURRENT | flags); -#ifdef DEBUG +#ifndef NDEBUG exec->flush_call_depth--; assert(exec->flush_call_depth == 0); #endif |