From bbd557fc53669132fb1f93f7bb28b2939fa70f51 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 24 May 2004 20:48:27 +0000 Subject: Clean up some warnings by making sis_fatal_error a macro, and let it take an argument of a message to print. Make some assert(0)s use sis_fatal_error. --- src/mesa/drivers/dri/sis/sis_tex.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/mesa/drivers/dri/sis/sis_tex.c') diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c index e100e8e6a6..5fa8256f1b 100644 --- a/src/mesa/drivers/dri/sis/sis_tex.c +++ b/src/mesa/drivers/dri/sis/sis_tex.c @@ -85,7 +85,7 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level, t->hwformat = TEXEL_ARGB_0888_32; break; default: - assert(0); + sis_fatal_error("Bad texture format.\n"); } } assert(t->format == image->Format); @@ -96,10 +96,8 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level, addr = sisAllocFB( smesa, size, &t->image[level].handle ); if (addr == NULL) { addr = sisAllocAGP( smesa, size, &t->image[level].handle ); - if (addr == NULL) { - fprintf (stderr, "SIS driver : out of video/agp memory\n"); - sis_fatal_error(); - } + if (addr == NULL) + sis_fatal_error("Failure to allocate texture memory.\n"); t->image[level].memType = AGP_TYPE; } else -- cgit v1.2.3