gallium: Add st_api::name.
authorChia-I Wu <olv@lunarg.com>
Wed, 17 Nov 2010 15:56:42 +0000 (23:56 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 18 Nov 2010 03:56:00 +0000 (11:56 +0800)
It is the name of the rendering API.  This field is informative.

src/gallium/include/state_tracker/st_api.h
src/gallium/state_trackers/vega/Makefile
src/gallium/state_trackers/vega/SConscript
src/gallium/state_trackers/vega/vg_manager.c
src/mesa/state_tracker/st_manager.c

index 21e2165ed9e3bfe75299e670f4a2492f4f44bf49..c73a53db330ed92186674fdbc7c6550c5c5e265e 100644 (file)
@@ -401,6 +401,11 @@ struct st_manager
  */
 struct st_api
 {
+   /**
+    * The name of the rendering API.  This is informative.
+    */
+   const char *name;
+
    /**
     * The supported rendering API.
     */
index e0a87151c43f9776d6d259e162daca144120044f..0543fac09469a9f64cee27fdc72eaacf8fd29616 100644 (file)
@@ -9,6 +9,9 @@ LIBRARY_INCLUDES = \
        -I$(TOP)/include \
        -I$(TOP)/src/mapi
 
+LIBRARY_DEFINES = \
+       -DVEGA_VERSION_STRING=\"$(MESA_VERSION)\"
+
 C_SOURCES = \
            api.c           \
            api_context.c   \
index a25b8474e4da1a4cdd6a138edbac25d9af596b6b..a62783ab18e53152539019e5dd893bcc0f704803 100644 (file)
@@ -8,6 +8,9 @@ env = env.Clone()
 env.Append(CPPPATH = [
     '#/src/mapi',
 ])
+env.Append(CPPDEFINES = [
+    'VEGA_VERSION_STRING=',
+])
 
 vega_sources = [
     'api.c',
index 232deefa166472d1dab244c2e362d41ca5f0bfd4..bb15ec024f2e495de77636f14e3e064d105e36ba 100644 (file)
@@ -535,6 +535,7 @@ vg_api_destroy(struct st_api *stapi)
 }
 
 static const struct st_api vg_api = {
+   "Vega " VEGA_VERSION_STRING,
    ST_API_OPENVG,
    ST_PROFILE_DEFAULT_MASK,
    vg_api_destroy,
index 183477a3f31f42d81460be4817b66ca7a43401ba..35b59de5a06ab0b92d8c33ce8b902fd783a2aad3 100644 (file)
@@ -865,6 +865,7 @@ st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *
 }
 
 static const struct st_api st_gl_api = {
+   "Mesa " MESA_VERSION_STRING,
    ST_API_OPENGL,
 #if FEATURE_GL
    ST_PROFILE_DEFAULT_MASK |