dri: move __driUtilMessage to xmlconfig.c
__driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now
This commit is contained in:
@@ -37,29 +37,6 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Print message to \c stderr if the \c LIBGL_DEBUG environment variable
|
|
||||||
* is set.
|
|
||||||
*
|
|
||||||
* Is called from the drivers.
|
|
||||||
*
|
|
||||||
* \param f \c printf like format string.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
__driUtilMessage(const char *f, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
if (getenv("LIBGL_DEBUG")) {
|
|
||||||
fprintf(stderr, "libGL: ");
|
|
||||||
va_start(args, f);
|
|
||||||
vfprintf(stderr, f, args);
|
|
||||||
va_end(args);
|
|
||||||
fprintf(stderr, "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
driParseDebugString( const char * debug,
|
driParseDebugString( const char * debug,
|
||||||
const struct dri_debug_control * control )
|
const struct dri_debug_control * control )
|
||||||
|
@@ -32,16 +32,11 @@
|
|||||||
#include <GL/internal/dri_interface.h>
|
#include <GL/internal/dri_interface.h>
|
||||||
#include "main/context.h"
|
#include "main/context.h"
|
||||||
|
|
||||||
typedef struct __DRIutilversionRec2 __DRIutilversion2;
|
|
||||||
|
|
||||||
struct dri_debug_control {
|
struct dri_debug_control {
|
||||||
const char * string;
|
const char * string;
|
||||||
unsigned flag;
|
unsigned flag;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void
|
|
||||||
__driUtilMessage(const char *f, ...);
|
|
||||||
|
|
||||||
extern unsigned driParseDebugString( const char * debug,
|
extern unsigned driParseDebugString( const char * debug,
|
||||||
const struct dri_debug_control * control );
|
const struct dri_debug_control * control );
|
||||||
|
|
||||||
|
@@ -420,6 +420,28 @@ static GLboolean checkValue (const driOptionValue *v, const driOptionInfo *info)
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print message to \c stderr if the \c LIBGL_DEBUG environment variable
|
||||||
|
* is set.
|
||||||
|
*
|
||||||
|
* Is called from the drivers.
|
||||||
|
*
|
||||||
|
* \param f \c printf like format string.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
__driUtilMessage(const char *f, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (getenv("LIBGL_DEBUG")) {
|
||||||
|
fprintf(stderr, "libGL: ");
|
||||||
|
va_start(args, f);
|
||||||
|
vfprintf(stderr, f, args);
|
||||||
|
va_end(args);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** \brief Output a warning message. */
|
/** \brief Output a warning message. */
|
||||||
#define XML_WARNING1(msg) do {\
|
#define XML_WARNING1(msg) do {\
|
||||||
__driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \
|
__driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \
|
||||||
|
@@ -1060,8 +1060,7 @@ radeonCreateScreen2(__DRIscreen *sPriv)
|
|||||||
/* Allocate the private area */
|
/* Allocate the private area */
|
||||||
screen = (radeonScreenPtr) CALLOC( sizeof(*screen) );
|
screen = (radeonScreenPtr) CALLOC( sizeof(*screen) );
|
||||||
if ( !screen ) {
|
if ( !screen ) {
|
||||||
__driUtilMessage("%s: Could not allocate memory for screen structure",
|
fprintf(stderr, "%s: Could not allocate memory for screen structure", __FUNCTION__);
|
||||||
__FUNCTION__);
|
|
||||||
fprintf(stderr, "leaving here\n");
|
fprintf(stderr, "leaving here\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user