Mesa (master): st/glx: Replace MESA_VERSION_STRING by xmesa_get_name.

Chia-I Wu olv at kemper.freedesktop.org
Thu Nov 18 03:57:31 UTC 2010


Module: Mesa
Branch: master
Commit: 997a2547d10890dbc00f2c48191cde58a2ee37c8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=997a2547d10890dbc00f2c48191cde58a2ee37c8

Author: Chia-I Wu <olv at lunarg.com>
Date:   Wed Nov 17 23:43:01 2010 +0800

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(-)

diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index dcd50e1..205a7e3 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 8332633..7c47a25 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -828,6 +828,16 @@ void XMesaDestroyVisual( XMesaVisual v )
 
 
 /**
+ * Return the informative name.
+ */
+const char *
+xmesa_get_name(void)
+{
+   return stapi->name;
+}
+
+
+/**
  * Do per-display initializations.
  */
 void
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.h b/src/gallium/state_trackers/glx/xlib/xm_api.h
index b8ac979..4ea42dc 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);
 




More information about the mesa-commit mailing list