From 5dd4030e761d1c880e0860ba0d5173e8272da8d0 Mon Sep 17 00:00:00 2001 From: Vladimir Dergachev Date: Tue, 1 Feb 2005 15:51:54 +0000 Subject: Make WARN_ONCE messages more informative. --- src/mesa/drivers/dri/r300/r300_context.h | 3 ++- src/mesa/drivers/dri/r300/r300_render.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/r300') diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 47b3c8374d9..0e0aa665a56 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -59,7 +59,8 @@ typedef struct r300_context *r300ContextPtr; #define WARN_ONCE(a) { \ static int warn=1; \ if(warn){ \ - fprintf(stderr, "***WARN_ONCE*** " a); \ + fprintf(stderr, "%s:%s line %d ***WARN_ONCE*** " a, \ + __FILE__, __FUNCTION__, __LINE__); \ warn=0;\ } \ } diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index 436b80bc835..75ef2bfacc1 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -143,7 +143,7 @@ static int r300_get_primitive_type(r300ContextPtr rmesa, if(start+min_vertices>end){ static int warn_once=1; if(warn_once){ - fprintf(stderr, "%s:%s Not enough vertices to draw primitive %02x - help me !\n", + fprintf(stderr, "%s:%s ***WARN_ONCE*** Not enough vertices to draw primitive %02x - help me !\n", __FILE__, __FUNCTION__, prim & PRIM_MODE_MASK); warn_once=0; -- cgit v1.2.3