summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri_screen.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsapountzis@gmail.com>2010-03-25 17:01:53 +0200
committerGeorge Sapountzis <gsapountzis@gmail.com>2010-03-25 17:01:53 +0200
commit5b75e12f9165c890fd14b22983d6289be8f20abc (patch)
treeb0e4eb57f76b15c8e4702ce44d1932ffb1ef38c2 /src/gallium/state_trackers/dri/dri_screen.c
parent1bed0eb98e00ed9ea7431f19ab3bed8860864264 (diff)
downloadexternal_mesa3d-5b75e12f9165c890fd14b22983d6289be8f20abc.zip
external_mesa3d-5b75e12f9165c890fd14b22983d6289be8f20abc.tar.gz
external_mesa3d-5b75e12f9165c890fd14b22983d6289be8f20abc.tar.bz2
st/dri: add drisw
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_screen.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 1d808f0..ae31164 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -30,7 +30,9 @@
*/
#include "utils.h"
+#ifndef __NOT_HAVE_DRM_H
#include "vblank.h"
+#endif
#include "xmlpool.h"
#include "dri_screen.h"
@@ -40,6 +42,7 @@
#include "dri1_helper.h"
#include "dri1.h"
#include "dri2.h"
+#include "drisw.h"
#include "util/u_inlines.h"
#include "pipe/p_screen.h"
@@ -262,6 +265,8 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
/* let the state tracker allocate the accum buffer */
}
+#ifndef __NOT_HAVE_DRM_H
+
/**
* Get information about previous buffer swaps.
*/
@@ -274,6 +279,8 @@ dri_get_swap_info(__DRIdrawable * dPriv, __DRIswapInfo * sInfo)
return 0;
}
+#endif
+
static void
dri_destroy_option_cache(struct dri_screen * screen)
{
@@ -308,6 +315,8 @@ dri_destroy_screen(__DRIscreen * sPriv)
sPriv->extensions = NULL;
}
+#ifndef __NOT_HAVE_DRM_H
+
const struct __DriverAPIRec driDriverAPI = {
.DestroyScreen = dri_destroy_screen,
.CreateContext = dri_create_context,
@@ -334,4 +343,28 @@ PUBLIC const __DRIextension *__driDriverExtensions[] = {
NULL
};
+#else
+
+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,
+ &driSWRastExtension.base,
+ NULL
+};
+
+#endif
+
/* vim: set sw=3 ts=8 sts=3 expandtab: */