summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-12-14 16:23:57 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-12-14 16:23:57 +0000
commit82ba9449e1c70b2943408d56528d525395b10331 (patch)
tree6f7f4d36afe1da83ddca8054ab9e82a4df908a05
parent2377ea9c66fece01689fd580059bd09bd4fac32c (diff)
print messages with new message() function
-rw-r--r--src/mesa/x86/common_x86.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 94a9c1caf1..22f462d448 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -37,6 +37,12 @@
int gl_x86_cpu_features = 0;
+static void message(const char *msg)
+{
+ if (getenv("MESA_DEBUG"))
+ fprintf(stderr, "%s\n", msg);
+}
+
void gl_init_all_x86_asm (void)
{
@@ -48,7 +54,7 @@ void gl_init_all_x86_asm (void)
gl_x86_cpu_features = 0;
if (gl_x86_cpu_features & GL_CPU_GenuineIntel) {
- fprintf (stderr, "GenuineIntel cpu detected.\n");
+ message("GenuineIntel cpu detected.");
}
if (gl_x86_cpu_features) {
@@ -59,7 +65,7 @@ void gl_init_all_x86_asm (void)
if (gl_x86_cpu_features & GL_CPU_MMX) {
char *s = getenv( "MESA_NO_MMX" );
if (s == NULL) {
- fprintf (stderr, "MMX cpu detected.\n");
+ message("MMX cpu detected.");
} else {
gl_x86_cpu_features &= (~GL_CPU_MMX);
}
@@ -71,7 +77,7 @@ void gl_init_all_x86_asm (void)
if (gl_x86_cpu_features & GL_CPU_3Dnow) {
char *s = getenv( "MESA_NO_3DNOW" );
if (s == NULL) {
- fprintf (stderr, "3Dnow cpu detected.\n");
+ message("3Dnow cpu detected.");
gl_init_3dnow_asm_transforms ();
} else {
gl_x86_cpu_features &= (~GL_CPU_3Dnow);