diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2010-05-21 20:25:54 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2010-05-21 21:25:07 +0100 |
commit | 5f66363f8ed26d6f3fc8fcccde804fe1fea1bbaa (patch) | |
tree | 916e3de9803377bd28ae6ac8bd4b51100ec4e656 /src | |
parent | 0853401805fc95c71e237fe9b04ff023cd268361 (diff) |
st_api: Add get param function to st_manager
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 13 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d_st.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_api.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_device.c | 7 |
5 files changed, 45 insertions, 1 deletions
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 21f2d639b1..1e343d0e36 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -106,6 +106,13 @@ enum st_context_resource_type { }; /** + * Value to st_manager->get_param function. + */ +enum st_manager_param { + ST_MANAGER_TEMP, +}; + +/** * The return type of st_api->get_proc_address. */ typedef void (*st_proc_t)(void); @@ -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); }; /** diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 81523b82ba..f5c936e182 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -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) diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c index 1df57d0777..2d459d5a6c 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c @@ -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;; diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index a6f808bc96..ae9faeb424 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -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); diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c index 61b207525c..a107c71bda 100644 --- a/src/gallium/state_trackers/wgl/stw_device.c +++ b/src/gallium/state_trackers/wgl/stw_device.c @@ -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 ); |