diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2010-06-24 02:10:18 +0200 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2010-06-24 02:15:50 +0200 |
commit | 92fde20de33d9ffb4ddce9b03eebbfbffe9d93bc (patch) | |
tree | dc5f7a068049a2c81e28a227734e15e3f25eacaa /src/gallium/winsys | |
parent | cf91accc93b9f172b2f7c970f39e69b268a5bb26 (diff) |
r600g: Move bootstrap code to target
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_drm.c | 34 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_drm_public.h | 9 |
2 files changed, 14 insertions, 29 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c index b772ff0dd9..469f1446d0 100644 --- a/src/gallium/winsys/r600/drm/r600_drm.c +++ b/src/gallium/winsys/r600/drm/r600_drm.c @@ -26,21 +26,18 @@ * Joakim Sindholt <opensource@zhasha.com> */ #include <sys/ioctl.h> -#include "trace/tr_drm.h" #include "util/u_inlines.h" #include "util/u_debug.h" -#include "state_tracker/drm_api.h" #include "radeon_priv.h" #include "r600_screen.h" #include "r600_texture.h" +#include "r600_public.h" +#include "r600_drm_public.h" +#include "state_tracker/drm_driver.h" -static struct pipe_screen *r600_drm_create_screen(struct drm_api* api, int drmfd) +struct radeon *r600_drm_winsys_create(int drmfd) { - struct radeon *rw = radeon_new(drmfd, 0); - - if (rw == NULL) - return NULL; - return radeon_create_screen(rw); + return radeon_new(drmfd, 0); } boolean r600_buffer_get_handle(struct radeon *rw, @@ -63,24 +60,3 @@ boolean r600_buffer_get_handle(struct radeon *rw, whandle->handle = rbuffer->flink; return TRUE; } - -static void r600_drm_api_destroy(struct drm_api *api) -{ - return; -} - -struct drm_api drm_api_hooks = { - .name = "r600", - .driver_name = "r600", - .create_screen = r600_drm_create_screen, - .destroy = r600_drm_api_destroy, -}; - -struct drm_api* drm_api_create() -{ -#ifdef DEBUG - return trace_drm_create(&drm_api_hooks); -#else - return &drm_api_hooks; -#endif -} diff --git a/src/gallium/winsys/r600/drm/r600_drm_public.h b/src/gallium/winsys/r600/drm/r600_drm_public.h new file mode 100644 index 0000000000..84f2dce437 --- /dev/null +++ b/src/gallium/winsys/r600/drm/r600_drm_public.h @@ -0,0 +1,9 @@ + +#ifndef R600_DRM_PUBLIC_H +#define R600_DRM_PUBLIC_H + +struct radeon; + +struct radeon *r600_drm_winsys_create(int drmFD); + +#endif |