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 21e2165..c73a53d 100644 (file)
@@ -402,6 +402,11 @@ struct st_manager
 struct st_api
 {
    /**
+    * The name of the rendering API.  This is informative.
+    */
+   const char *name;
+
+   /**
     * The supported rendering API.
     */
    enum st_api_type api;
index e0a8715..0543fac 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 a25b847..a62783a 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 232deef..bb15ec0 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 183477a..35b59de 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 |