summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-06-06 11:13:49 +0100
committerJakob Bornecrantz <[email protected]>2010-06-06 13:02:43 +0100
commit9ff10b67bc1d69bef96cb24627481ab939ec1aa6 (patch)
treedc11a17b4bf573a9d392991a48fd9b76077bd3b7 /src/gallium/targets
parent16fa300d55f789cfd71b1d61e3ff74d2eafd12ab (diff)
svga: Move bootstrap code to targets
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/dri-vmwgfx/target.c17
-rw-r--r--src/gallium/targets/egl-vmwgfx/target.c18
-rw-r--r--src/gallium/targets/xorg-vmwgfx/vmw_target.c17
3 files changed, 46 insertions, 6 deletions
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c
index 3d1990fc1b8..5f69653582d 100644
--- a/src/gallium/targets/dri-vmwgfx/target.c
+++ b/src/gallium/targets/dri-vmwgfx/target.c
@@ -1,4 +1,17 @@
-#include "target-helpers/drm_api_compat.h"
+#include "state_tracker/drm_driver.h"
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
-DRM_API_COMPAT_STRUCT("vmwgfx", "vmwgfx")
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct svga_winsys_screen *sws;
+ sws = svga_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ return svga_screen_create(sws);
+}
+
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)
diff --git a/src/gallium/targets/egl-vmwgfx/target.c b/src/gallium/targets/egl-vmwgfx/target.c
index 39a829a2305..7dd0bb0dc2c 100644
--- a/src/gallium/targets/egl-vmwgfx/target.c
+++ b/src/gallium/targets/egl-vmwgfx/target.c
@@ -1,6 +1,20 @@
-#include "target-helpers/drm_api_compat.h"
-DRM_API_COMPAT_STRUCT("vmwgfx", "vmwgfx")
+#include "state_tracker/drm_driver.h"
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
+
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct svga_winsys_screen *sws;
+ sws = svga_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ return svga_screen_create(sws);
+}
+
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)
/* A poor man's --whole-archive for EGL drivers */
void *_eglMain(void *);
diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_target.c b/src/gallium/targets/xorg-vmwgfx/vmw_target.c
index 3d1990fc1b8..5f69653582d 100644
--- a/src/gallium/targets/xorg-vmwgfx/vmw_target.c
+++ b/src/gallium/targets/xorg-vmwgfx/vmw_target.c
@@ -1,4 +1,17 @@
-#include "target-helpers/drm_api_compat.h"
+#include "state_tracker/drm_driver.h"
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
-DRM_API_COMPAT_STRUCT("vmwgfx", "vmwgfx")
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct svga_winsys_screen *sws;
+ sws = svga_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ return svga_screen_create(sws);
+}
+
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)