diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2010-06-06 11:56:23 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2010-06-06 13:02:56 +0100 |
commit | 6e3fc2de2a185775a721b3633f420aa3d2c9a949 (patch) | |
tree | f635420da130bdbce8a7064929ca4b23fcd4e554 /src/gallium/targets | |
parent | c7015877beedd9831402755dbc58afddcbbd5339 (diff) |
r300g: Move bootstrap code to targets
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/dri-radeong/target.c | 17 | ||||
-rw-r--r-- | src/gallium/targets/egl-radeon/target.c | 17 | ||||
-rw-r--r-- | src/gallium/targets/xorg-radeon/radeon_target.c | 17 |
3 files changed, 45 insertions, 6 deletions
diff --git a/src/gallium/targets/dri-radeong/target.c b/src/gallium/targets/dri-radeong/target.c index 06b64820cf..2c1beb633e 100644 --- a/src/gallium/targets/dri-radeong/target.c +++ b/src/gallium/targets/dri-radeong/target.c @@ -1,4 +1,17 @@ -#include "target-helpers/drm_api_compat.h" +#include "state_tracker/drm_driver.h" +#include "radeon/drm/radeon_drm_public.h" +#include "r300/r300_public.h" -DRM_API_COMPAT_STRUCT("radeon", "radeon") +static struct pipe_screen * +create_screen(int fd) +{ + struct r300_winsys_screen *sws; + sws = r300_drm_winsys_screen_create(fd); + if (!sws) + return NULL; + + return r300_screen_create(sws); +} + +DRM_DRIVER_DESCRIPTOR("radeon", "radeon", create_screen) diff --git a/src/gallium/targets/egl-radeon/target.c b/src/gallium/targets/egl-radeon/target.c index 03b982ae83..5117eb86f9 100644 --- a/src/gallium/targets/egl-radeon/target.c +++ b/src/gallium/targets/egl-radeon/target.c @@ -1,7 +1,20 @@ -#include "target-helpers/drm_api_compat.h" +#include "state_tracker/drm_driver.h" +#include "radeon/drm/radeon_drm_public.h" +#include "r300/r300_public.h" -DRM_API_COMPAT_STRUCT("radeon", "radeon") +static struct pipe_screen * +create_screen(int fd) +{ + struct r300_winsys_screen *sws; + sws = r300_drm_winsys_screen_create(fd); + if (!sws) + return NULL; + + return r300_screen_create(sws); +} + +DRM_DRIVER_DESCRIPTOR("radeon", "radeon", create_screen) /* A poor man's --whole-archive for EGL drivers */ void *_eglMain(void *); diff --git a/src/gallium/targets/xorg-radeon/radeon_target.c b/src/gallium/targets/xorg-radeon/radeon_target.c index 06b64820cf..2c1beb633e 100644 --- a/src/gallium/targets/xorg-radeon/radeon_target.c +++ b/src/gallium/targets/xorg-radeon/radeon_target.c @@ -1,4 +1,17 @@ -#include "target-helpers/drm_api_compat.h" +#include "state_tracker/drm_driver.h" +#include "radeon/drm/radeon_drm_public.h" +#include "r300/r300_public.h" -DRM_API_COMPAT_STRUCT("radeon", "radeon") +static struct pipe_screen * +create_screen(int fd) +{ + struct r300_winsys_screen *sws; + sws = r300_drm_winsys_screen_create(fd); + if (!sws) + return NULL; + + return r300_screen_create(sws); +} + +DRM_DRIVER_DESCRIPTOR("radeon", "radeon", create_screen) |