summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/dri/drm/dri2.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsapountzis@gmail.com>2010-04-08 18:58:35 +0300
committerGeorge Sapountzis <gsapountzis@gmail.com>2010-07-30 23:43:26 +0300
commit2e4ad14a525f4028f0e0a93de2f8db785df33fb7 (patch)
tree75ec9880ec32e0bd6f6eab7fb58dae312eba8f9a /src/gallium/state_trackers/dri/drm/dri2.c
parentb3e3d0da586812c61f7bd3933a9a3c2511b8d55b (diff)
st/dri: mv driDriverAPI to backends
Diffstat (limited to 'src/gallium/state_trackers/dri/drm/dri2.c')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 5c6573fa69..9965d706c8 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -38,9 +38,6 @@
#include "dri_screen.h"
#include "dri_context.h"
#include "dri_drawable.h"
-#include "dri2.h"
-
-#include "GL/internal/dri_interface.h"
/**
* DRI2 flush extension.
@@ -497,7 +494,7 @@ static const __DRIextension *dri_screen_extensions[] = {
*
* Returns the __GLcontextModes supported by this driver.
*/
-const __DRIconfig **
+static const __DRIconfig **
dri2_init_screen(__DRIscreen * sPriv)
{
const __DRIconfig **configs;
@@ -534,6 +531,30 @@ 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,
+
+ .GetSwapInfo = NULL,
+ .GetDrawableMSC = NULL,
+ .WaitForMSC = NULL,
+ .InitScreen2 = dri2_init_screen,
+
+ .InitScreen = NULL,
+ .SwapBuffers = NULL,
+ .CopySubBuffer = NULL,
+};
+
/* This is the table of extensions that the loader will dlsym() for. */
PUBLIC const __DRIextension *__driDriverExtensions[] = {
&driCoreExtension.base,