glx: Add and use DebugMessageF convenience macro
Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
This commit is contained in:
parent
1cb664c15c
commit
f3d14e7616
|
@ -206,8 +206,7 @@ driConfigEqual(const __DRIcoreExtension *core,
|
|||
if (config->visualRating == GLX_NONE) {
|
||||
static int warned;
|
||||
if (!warned) {
|
||||
glx_message(_LOADER_DEBUG,
|
||||
"Not downgrading visual rating\n");
|
||||
DebugMessageF("Not downgrading visual rating\n");
|
||||
warned = 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -220,8 +219,7 @@ driConfigEqual(const __DRIcoreExtension *core,
|
|||
if (!scalarEqual(config, attrib, value)) {
|
||||
static int warned;
|
||||
if (!warned) {
|
||||
glx_message(_LOADER_DEBUG,
|
||||
"Disabling server's aux buffer support\n");
|
||||
DebugMessageF("Disabling server's aux buffer support\n");
|
||||
warned = 1;
|
||||
}
|
||||
config->numAuxBuffers = 0;
|
||||
|
@ -232,8 +230,7 @@ driConfigEqual(const __DRIcoreExtension *core,
|
|||
if (!scalarEqual(config, attrib, value)) {
|
||||
static int warned;
|
||||
if (!warned) {
|
||||
glx_message(_LOADER_DEBUG,
|
||||
"Disabling server's tfp mipmap support\n");
|
||||
DebugMessageF("Disabling server's tfp mipmap support\n");
|
||||
warned = 1;
|
||||
}
|
||||
config->bindToMipmapTexture = 0;
|
||||
|
@ -244,8 +241,7 @@ driConfigEqual(const __DRIcoreExtension *core,
|
|||
if (!scalarEqual(config, attrib, value)) {
|
||||
static int warned;
|
||||
if (!warned) {
|
||||
glx_message(_LOADER_DEBUG,
|
||||
"Disabling server's sRGB support\n");
|
||||
DebugMessageF("Disabling server's sRGB support\n");
|
||||
warned = 1;
|
||||
}
|
||||
config->sRGBCapable = 0;
|
||||
|
|
|
@ -68,6 +68,7 @@ extern "C" {
|
|||
|
||||
extern void glx_message(int level, const char *f, ...) PRINTFLIKE(2, 3);
|
||||
|
||||
#define DebugMessageF(...) glx_message(_LOADER_DEBUG, __VA_ARGS__)
|
||||
#define InfoMessageF(...) glx_message(_LOADER_INFO, __VA_ARGS__)
|
||||
#define ErrorMessageF(...) glx_message(_LOADER_WARNING, __VA_ARGS__)
|
||||
#define CriticalErrorMessageF(...) glx_message(_LOADER_FATAL, __VA_ARGS__)
|
||||
|
|
Loading…
Reference in New Issue