dri/common: mv __driUtilMessage to utils.c
allows to link with xmlconfig without dri_util, and has nothing drm-specific.
This commit is contained in:
@@ -47,28 +47,6 @@ const __DRIextension driReadDrawableExtension = {
|
|||||||
__DRI_READ_DRAWABLE, __DRI_READ_DRAWABLE_VERSION
|
__DRI_READ_DRAWABLE, __DRI_READ_DRAWABLE_VERSION
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GLint
|
GLint
|
||||||
driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 )
|
driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 )
|
||||||
{
|
{
|
||||||
|
@@ -551,10 +551,6 @@ struct __DRIscreenRec {
|
|||||||
drmLock *lock;
|
drmLock *lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void
|
|
||||||
__driUtilMessage(const char *f, ...);
|
|
||||||
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
__driUtilUpdateDrawableInfo(__DRIdrawable *pdp);
|
__driUtilUpdateDrawableInfo(__DRIdrawable *pdp);
|
||||||
|
|
||||||
|
@@ -37,6 +37,29 @@
|
|||||||
#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 )
|
||||||
@@ -230,9 +253,6 @@ void driInitSingleExtension( GLcontext * ctx,
|
|||||||
/**
|
/**
|
||||||
* Utility function used by drivers to test the verions of other components.
|
* Utility function used by drivers to test the verions of other components.
|
||||||
*
|
*
|
||||||
* If one of the version requirements is not met, a message is logged using
|
|
||||||
* \c __driUtilMessage.
|
|
||||||
*
|
|
||||||
* \param driver_name Name of the driver. Used in error messages.
|
* \param driver_name Name of the driver. Used in error messages.
|
||||||
* \param driActual Actual DRI version supplied __driCreateNewScreen.
|
* \param driActual Actual DRI version supplied __driCreateNewScreen.
|
||||||
* \param driExpected Minimum DRI version required by the driver.
|
* \param driExpected Minimum DRI version required by the driver.
|
||||||
@@ -244,7 +264,7 @@ void driInitSingleExtension( GLcontext * ctx,
|
|||||||
* \returns \c GL_TRUE if all version requirements are met. Otherwise,
|
* \returns \c GL_TRUE if all version requirements are met. Otherwise,
|
||||||
* \c GL_FALSE is returned.
|
* \c GL_FALSE is returned.
|
||||||
*
|
*
|
||||||
* \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage
|
* \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2
|
||||||
*
|
*
|
||||||
* \todo
|
* \todo
|
||||||
* Now that the old \c driCheckDriDdxDrmVersions function is gone, this
|
* Now that the old \c driCheckDriDdxDrmVersions function is gone, this
|
||||||
|
@@ -69,6 +69,9 @@ struct __DRIutilversionRec2 {
|
|||||||
int patch; /**< Patch-level. */
|
int patch; /**< Patch-level. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 );
|
||||||
|
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "main/imports.h"
|
#include "main/imports.h"
|
||||||
#include "dri_util.h"
|
#include "utils.h"
|
||||||
#include "xmlconfig.h"
|
#include "xmlconfig.h"
|
||||||
|
|
||||||
#undef GET_PROGRAM_NAME
|
#undef GET_PROGRAM_NAME
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "main/glheader.h"
|
#include "main/glheader.h"
|
||||||
#include "main/context.h"
|
#include "main/context.h"
|
||||||
|
#include "main/extensions.h"
|
||||||
#include "main/simple_list.h"
|
#include "main/simple_list.h"
|
||||||
#include "main/imports.h"
|
#include "main/imports.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user