aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/debug.c')
-rw-r--r--mesalib/src/mesa/main/debug.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c
index 089ce8987..b50d79e0c 100644
--- a/mesalib/src/mesa/main/debug.c
+++ b/mesalib/src/mesa/main/debug.c
@@ -23,6 +23,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdio.h>
#include "mtypes.h"
#include "attrib.h"
#include "colormac.h"
@@ -58,8 +59,8 @@ tex_target_name(GLenum tgt)
{ GL_TEXTURE_EXTERNAL_OES, "GL_TEXTURE_EXTERNAL_OES" }
};
GLuint i;
- STATIC_ASSERT(Elements(tex_targets) == NUM_TEXTURE_TARGETS);
- for (i = 0; i < Elements(tex_targets); i++) {
+ STATIC_ASSERT(ARRAY_SIZE(tex_targets) == NUM_TEXTURE_TARGETS);
+ for (i = 0; i < ARRAY_SIZE(tex_targets); i++) {
if (tex_targets[i].target == tgt)
return tex_targets[i].name;
}
@@ -117,11 +118,6 @@ void _mesa_print_info( struct gl_context *ctx )
*/
_mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", ctx->Extensions.String);
-#if defined(THREADS)
- _mesa_debug(NULL, "Mesa thread-safe: YES\n");
-#else
- _mesa_debug(NULL, "Mesa thread-safe: NO\n");
-#endif
#if defined(USE_X86_ASM)
_mesa_debug(NULL, "Mesa x86-optimized: YES\n");
#else
@@ -168,7 +164,7 @@ set_verbose_flags(const char *str)
return;
MESA_VERBOSE = 0x0;
- for (i = 0; i < Elements(opts); i++) {
+ for (i = 0; i < ARRAY_SIZE(opts); i++) {
if (strstr(str, opts[i].name) || strcmp(str, "all") == 0)
MESA_VERBOSE |= opts[i].flag;
}
@@ -201,7 +197,7 @@ set_debug_flags(const char *str)
return;
MESA_DEBUG_FLAGS = 0x0;
- for (i = 0; i < Elements(opts); i++) {
+ for (i = 0; i < ARRAY_SIZE(opts); i++) {
if (strstr(str, opts[i].name))
MESA_DEBUG_FLAGS |= opts[i].flag;
}