diff options
author | Jakob Bornecrantz <[email protected]> | 2010-06-01 04:38:24 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-06-06 13:02:49 +0100 |
commit | c7015877beedd9831402755dbc58afddcbbd5339 (patch) | |
tree | 14c52040d9d43c652f17ce5c2cec6419011c0cf9 /src/gallium/targets | |
parent | 9ff10b67bc1d69bef96cb24627481ab939ec1aa6 (diff) |
i915g: Move bootstrap code to targets
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/dri-i915/target.c | 17 | ||||
-rw-r--r-- | src/gallium/targets/egl-i915/target.c | 17 | ||||
-rw-r--r-- | src/gallium/targets/xorg-i915/intel_target.c | 17 |
3 files changed, 45 insertions, 6 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) diff --git a/src/gallium/targets/egl-i915/target.c b/src/gallium/targets/egl-i915/target.c index fd68c4bd454..28877166434 100644 --- a/src/gallium/targets/egl-i915/target.c +++ b/src/gallium/targets/egl-i915/target.c @@ -1,7 +1,20 @@ -#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) /* A poor man's --whole-archive for EGL drivers */ void *_eglMain(void *); diff --git a/src/gallium/targets/xorg-i915/intel_target.c b/src/gallium/targets/xorg-i915/intel_target.c index 4eff93c0740..a79238f3a0f 100644 --- a/src/gallium/targets/xorg-i915/intel_target.c +++ b/src/gallium/targets/xorg-i915/intel_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("modesetting", "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) |