summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/dri-i915/target.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-06-01 04:38:24 +0100
committerJakob Bornecrantz <[email protected]>2010-06-06 13:02:49 +0100
commitc7015877beedd9831402755dbc58afddcbbd5339 (patch)
tree14c52040d9d43c652f17ce5c2cec6419011c0cf9 /src/gallium/targets/dri-i915/target.c
parent9ff10b67bc1d69bef96cb24627481ab939ec1aa6 (diff)
i915g: Move bootstrap code to targets
Diffstat (limited to 'src/gallium/targets/dri-i915/target.c')
-rw-r--r--src/gallium/targets/dri-i915/target.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/targets/dri-i915/target.c b/src/gallium/targets/dri-i915/target.c
index 8fd73088933..a79238f3a0f 100644
--- a/src/gallium/targets/dri-i915/target.c
+++ b/src/gallium/targets/dri-i915/target.c
@@ -1,4 +1,17 @@
-#include "target-helpers/drm_api_compat.h"
+#include "state_tracker/drm_driver.h"
+#include "i915/drm/i915_drm_public.h"
+#include "i915/i915_public.h"
-DRM_API_COMPAT_STRUCT("i915", "i915")
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct i915_winsys *iws;
+ iws = i915_drm_winsys_create(fd);
+ if (!iws)
+ return NULL;
+
+ return i915_screen_create(iws);
+}
+
+DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen)