st_api: Add get param function to st_manager
authorJakob Bornecrantz <jakob@vmware.com>
Fri, 21 May 2010 19:25:54 +0000 (20:25 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Fri, 21 May 2010 20:25:07 +0000 (21:25 +0100)
src/gallium/include/state_tracker/st_api.h
src/gallium/state_trackers/dri/common/dri_screen.c
src/gallium/state_trackers/egl/common/egl_g3d_st.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/wgl/stw_device.c

index 21f2d639b1424d71ffa9f6c2f029ef3d9b401b6a..1e343d0e364a400aa78777c1ea515de1fbc9a7f2 100644 (file)
@@ -105,6 +105,13 @@ enum st_context_resource_type {
    ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE
 };
 
+/**
+ * Value to st_manager->get_param function.
+ */
+enum st_manager_param {
+   ST_MANAGER_TEMP,
+};
+
 /**
  * The return type of st_api->get_proc_address.
  */
@@ -319,6 +326,12 @@ struct st_manager
     */
    boolean (*get_egl_image)(struct st_manager *smapi,
                             struct st_egl_image *stimg);
+
+   /**
+    * Query an manager param.
+    */
+   int (*get_param)(struct st_manager *smapi,
+                    enum st_manager_param param);
 };
 
 /**
index 81523b82ba9efcab74dd13a6f9dc1d6e8d7f9efd..f5c936e18239dae5f4a047abbebbe2d09145959f 100644 (file)
@@ -337,6 +337,13 @@ dri_get_egl_image(struct st_manager *smapi,
    return TRUE;
 }
 
+static int
+dri_get_param(struct st_manager *smapi,
+              enum st_manager_param param)
+{
+   return 0;
+}
+
 static void
 dri_destroy_option_cache(struct dri_screen * screen)
 {
@@ -391,6 +398,7 @@ dri_init_screen_helper(struct dri_screen *screen,
    }
 
    screen->base.get_egl_image = dri_get_egl_image;
+   screen->base.get_param = dri_get_param;
    screen->st_api = st_gl_api_create();
 
    if (!screen->st_api)
index 1df57d0777490ccc63cd5cf659e44e23f18e9a11..2d459d5a6c9b7e99d06fea97f37f4e179e6c9cff 100644 (file)
@@ -235,6 +235,13 @@ egl_g3d_st_manager_get_egl_image(struct st_manager *smapi,
    return TRUE;
 }
 
+static int
+egl_g3d_st_manager_get_param(struct st_manager *smapi,
+                             enum st_manager_param param)
+{
+   return 0;
+}
+
 struct st_manager *
 egl_g3d_create_st_manager(_EGLDisplay *dpy)
 {
@@ -247,6 +254,7 @@ egl_g3d_create_st_manager(_EGLDisplay *dpy)
 
       gsmapi->base.screen = gdpy->native->screen;
       gsmapi->base.get_egl_image = egl_g3d_st_manager_get_egl_image;
+      gsmapi->base.get_param = egl_g3d_st_manager_get_param;
    }
 
    return &gsmapi->base;;
index a6f808bc9641c4661ba7e29b5c32db7e1453757a..ae9faeb424eb42e6d23f0437d64d8d101a4b46d1 100644 (file)
@@ -87,6 +87,12 @@ void xmesa_set_driver( const struct xm_driver *templ )
 static struct xmesa_display Displays[MAX_DISPLAYS];
 static int NumDisplays = 0;
 
+static int
+xmesa_get_param(struct st_manager *smapi,
+                enum st_manager_param *param)
+{
+   return 0;
+}
 
 static XMesaDisplay
 xmesa_init_display( Display *display )
@@ -116,8 +122,10 @@ xmesa_init_display( Display *display )
       xmdpy->display = display;
       xmdpy->screen = driver.create_pipe_screen(display);
       xmdpy->smapi = CALLOC_STRUCT(st_manager);
-      if (xmdpy->smapi)
+      if (xmdpy->smapi) {
          xmdpy->smapi->screen = xmdpy->screen;
+         xmdpy->smapi->get_param = xmesa_get_param;
+      }
 
       if (xmdpy->screen && xmdpy->smapi) {
          pipe_mutex_init(xmdpy->mutex);
index 61b207525cada81f5d468792daa12a777b16de89..a107c71bdab0c2be1646502bbe6c480e845f8385 100644 (file)
@@ -48,6 +48,12 @@ extern _glthread_Mutex OneTimeLock;
 
 struct stw_device *stw_dev = NULL;
 
+static int
+stw_get_param(struct st_manager *smapi,
+              enum st_manager_param param)
+{
+   return 0;
+}
 
 boolean
 stw_init(const struct stw_winsys *stw_winsys)
@@ -87,6 +93,7 @@ stw_init(const struct stw_winsys *stw_winsys)
       stw_winsys->get_adapter_luid(screen, &stw_dev->AdapterLuid);
 
    stw_dev->smapi->screen = screen;
+   stw_dev->smapi->get_param = stw_get_param;
    stw_dev->screen = screen;
 
    pipe_mutex_init( stw_dev->ctx_mutex );