diff options
author | Chia-I Wu <[email protected]> | 2010-03-13 15:57:15 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-03-13 16:05:09 +0800 |
commit | 813c58d77e21cb59adb914b4b4ee26be758ff0ea (patch) | |
tree | 808891b5869505519b1f6a767d9896a5efd41be0 /src/gallium/state_trackers | |
parent | fecb97aab42e1a099f12cc7a47ed7219cd041809 (diff) |
st/glx: Make xmesa_create_st_api a callback of xm_driver.
Instead of guessing the API in st/glx, let the target decide how to
create st_api.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_api.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_public.h | 12 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_st.c | 11 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_st.h | 3 |
4 files changed, 9 insertions, 19 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 3ea4d77805f..82384a4d284 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -708,7 +708,7 @@ xmesa_init( Display *display ) if (firstTime) { pipe_mutex_init(_xmesa_lock); screen = driver.create_pipe_screen( display ); - stapi = xmesa_create_st_api(); + stapi = driver.create_st_api(); smapi = CALLOC_STRUCT(st_manager); if (smapi) smapi->screen = screen; diff --git a/src/gallium/state_trackers/glx/xlib/xm_public.h b/src/gallium/state_trackers/glx/xlib/xm_public.h index ac6a8ffb27a..950eb21521f 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_public.h +++ b/src/gallium/state_trackers/glx/xlib/xm_public.h @@ -26,19 +26,23 @@ * **************************************************************************/ -#ifndef XM_WINSYS_H -#define XM_WINSYS_H +#ifndef XM_PUBLIC_H +#define XM_PUBLIC_H -struct xm_driver; +#include <X11/Xlib.h> + +struct pipe_screen; +struct st_api; /* This is the driver interface required by the glx/xlib state tracker. */ struct xm_driver { struct pipe_screen *(*create_pipe_screen)( Display *display ); + struct st_api *(*create_st_api)( void ); }; extern void xmesa_set_driver( const struct xm_driver *driver ); -#endif +#endif /* XM_PUBLIC_H */ diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index d462776363c..abe3b5429bc 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -31,11 +31,6 @@ #include "xm_api.h" #include "xm_st.h" -/* support OpenGL by default */ -#ifndef XMESA_ST_MODULE -#define XMESA_ST_MODULE st_module_OpenGL -#endif - struct xmesa_st_framebuffer { struct pipe_screen *screen; XMesaBuffer buffer; @@ -267,9 +262,3 @@ xmesa_copy_st_framebuffer(struct st_framebuffer_iface *stfbi, { /* TODO */ } - -struct st_api * -xmesa_create_st_api(void) -{ - return XMESA_ST_MODULE.create_api(); -} diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.h b/src/gallium/state_trackers/glx/xlib/xm_st.h index 7ca7afe2531..b22a8373801 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.h +++ b/src/gallium/state_trackers/glx/xlib/xm_st.h @@ -33,9 +33,6 @@ #include "xm_api.h" -struct st_api * -xmesa_create_st_api(void); - struct st_framebuffer_iface * xmesa_create_st_framebuffer(struct pipe_screen *screen, XMesaBuffer b); |