diff options
author | George Sapountzis <gsapountzis@gmail.com> | 2010-04-08 18:58:35 +0300 |
---|---|---|
committer | George Sapountzis <gsapountzis@gmail.com> | 2010-07-30 23:43:26 +0300 |
commit | 2e4ad14a525f4028f0e0a93de2f8db785df33fb7 (patch) | |
tree | 75ec9880ec32e0bd6f6eab7fb58dae312eba8f9a /src/gallium/state_trackers/dri/sw/drisw.c | |
parent | b3e3d0da586812c61f7bd3933a9a3c2511b8d55b (diff) |
st/dri: mv driDriverAPI to backends
Diffstat (limited to 'src/gallium/state_trackers/dri/sw/drisw.c')
-rw-r--r-- | src/gallium/state_trackers/dri/sw/drisw.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index 86297c3f80..9edade9dc9 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -44,7 +44,6 @@ #include "dri_context.h" #include "dri_drawable.h" #include "dri1_helper.h" -#include "drisw.h" DEBUG_GET_ONCE_BOOL_OPTION(swrast_no_present, "SWRAST_NO_PRESENT", FALSE); static boolean swrast_no_present = FALSE; @@ -133,7 +132,7 @@ drisw_copy_to_front(__DRIdrawable * dPriv, * Backend functions for st_framebuffer interface and swap_buffers. */ -void +static void drisw_swap_buffers(__DRIdrawable *dPriv) { struct dri_context *ctx = dri_get_current(dPriv->driScreenPriv); @@ -250,7 +249,7 @@ static struct drisw_loader_funcs drisw_lf = { .put_image = drisw_put_image }; -const __DRIconfig ** +static const __DRIconfig ** drisw_init_screen(__DRIscreen * sPriv) { const __DRIconfig **configs; @@ -286,6 +285,24 @@ fail: return NULL; } +/** + * DRI driver virtual function table. + * + * DRI versions differ in their implementation of init_screen and swap_buffers. + */ +const struct __DriverAPIRec driDriverAPI = { + .DestroyScreen = dri_destroy_screen, + .CreateContext = dri_create_context, + .DestroyContext = dri_destroy_context, + .CreateBuffer = dri_create_buffer, + .DestroyBuffer = dri_destroy_buffer, + .MakeCurrent = dri_make_current, + .UnbindContext = dri_unbind_context, + + .InitScreen = drisw_init_screen, + .SwapBuffers = drisw_swap_buffers, +}; + /* This is the table of extensions that the loader will dlsym() for. */ PUBLIC const __DRIextension *__driDriverExtensions[] = { &driCoreExtension.base, |