From 997a2547d10890dbc00f2c48191cde58a2ee37c8 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 17 Nov 2010 23:43:01 +0800 Subject: st/glx: Replace MESA_VERSION_STRING by xmesa_get_name. xmesa_get_name returns the name of the st_api, which is the same as MESA_VERSION_STRING. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 7 ++----- src/gallium/state_trackers/glx/xlib/xm_api.c | 10 ++++++++++ src/gallium/state_trackers/glx/xlib/xm_api.h | 5 ++++- 3 files changed, 16 insertions(+), 6 deletions(-) (limited to 'src/gallium/state_trackers/glx/xlib') diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index dcd50e19d73..205a7e3c19a 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -46,9 +46,6 @@ #define SERVER_MAJOR_VERSION 1 #define SERVER_MINOR_VERSION 4 -/* This is appended onto the glXGetClient/ServerString version strings. */ -#define MESA_GLX_VERSION "Mesa " MESA_VERSION_STRING - /* Who implemented this GLX? */ #define VENDOR "Brian Paul" @@ -1672,7 +1669,7 @@ glXQueryServerString( Display *dpy, int screen, int name ) { static char version[1000]; sprintf(version, "%d.%d %s", - SERVER_MAJOR_VERSION, SERVER_MINOR_VERSION, MESA_GLX_VERSION); + SERVER_MAJOR_VERSION, SERVER_MINOR_VERSION, xmesa_get_name()); (void) dpy; (void) screen; @@ -1697,7 +1694,7 @@ glXGetClientString( Display *dpy, int name ) { static char version[1000]; sprintf(version, "%d.%d %s", CLIENT_MAJOR_VERSION, - CLIENT_MINOR_VERSION, MESA_GLX_VERSION); + CLIENT_MINOR_VERSION, xmesa_get_name()); (void) dpy; diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 8332633f01b..7c47a25ceba 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -827,6 +827,16 @@ void XMesaDestroyVisual( XMesaVisual v ) } +/** + * Return the informative name. + */ +const char * +xmesa_get_name(void) +{ + return stapi->name; +} + + /** * Do per-display initializations. */ diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.h b/src/gallium/state_trackers/glx/xlib/xm_api.h index b8ac979edc1..4ea42dc3755 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.h +++ b/src/gallium/state_trackers/glx/xlib/xm_api.h @@ -57,7 +57,7 @@ and create a window, you must do the following to use the X/Mesa interface: #define XMESA_H -#include "main/core.h" /* for GLvisual and MESA_VERSION_STRING */ +#include "main/core.h" /* for gl_config */ #include "state_tracker/st_api.h" #include "os/os_thread.h" @@ -351,6 +351,9 @@ struct xmesa_buffer { +extern const char * +xmesa_get_name(void); + extern void xmesa_init(Display *dpy); -- cgit v1.2.3