Make WARN_ONCE messages more informative.
authorVladimir Dergachev <volodya@freedesktop.org>
Tue, 1 Feb 2005 15:51:54 +0000 (15:51 +0000)
committerVladimir Dergachev <volodya@freedesktop.org>
Tue, 1 Feb 2005 15:51:54 +0000 (15:51 +0000)
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_render.c

index 47b3c8374d91f3dd3ad64ca50f9b9a516821795a..0e0aa665a56ca210145bfeaaeb2f2d8a4ca316c9 100644 (file)
@@ -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;\
                } \
        }
index 436b80bc83584e9cc8afbb003a699d6a793d89be..75ef2bfacc10288cecdd3f1e4486d13b7cfc093e 100644 (file)
@@ -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;