diff options
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/i965/drm/i965_drm_public.h | 9 | ||||
-rw-r--r-- | src/gallium/winsys/i965/drm/i965_drm_winsys.c | 36 | ||||
-rw-r--r-- | src/gallium/winsys/i965/drm/i965_drm_winsys.h | 2 |
3 files changed, 13 insertions, 34 deletions
diff --git a/src/gallium/winsys/i965/drm/i965_drm_public.h b/src/gallium/winsys/i965/drm/i965_drm_public.h new file mode 100644 index 00000000000..2913b079747 --- /dev/null +++ b/src/gallium/winsys/i965/drm/i965_drm_public.h @@ -0,0 +1,9 @@ + +#ifndef I965_DRM_PUBLIC_H +#define I965_DRM_PUBLIC_H + +struct brw_winsys_screen; + +struct brw_winsys_screen * i965_drm_winsys_screen_create(int drmFD); + +#endif diff --git a/src/gallium/winsys/i965/drm/i965_drm_winsys.c b/src/gallium/winsys/i965/drm/i965_drm_winsys.c index 124dc26606b..dfb36604395 100644 --- a/src/gallium/winsys/i965/drm/i965_drm_winsys.c +++ b/src/gallium/winsys/i965/drm/i965_drm_winsys.c @@ -3,15 +3,9 @@ #include "state_tracker/drm_api.h" #include "i965_drm_winsys.h" +#include "i965_drm_public.h" #include "util/u_memory.h" -#include "i965/brw_context.h" /* XXX: shouldn't be doing this */ -#include "i965/brw_screen.h" /* XXX: shouldn't be doing this */ - -#include "trace/tr_drm.h" - -#include "../../sw/drm/sw_drm_api.h" - /* * Helper functions */ @@ -52,8 +46,8 @@ i965_libdrm_winsys_destroy(struct brw_winsys_screen *iws) FREE(idws); } -static struct pipe_screen * -i965_libdrm_create_screen(struct drm_api *api, int drmFD) +struct brw_winsys_screen * +i965_drm_winsys_screen_create(int drmFD) { struct i965_libdrm_winsys *idws; @@ -76,27 +70,5 @@ i965_libdrm_create_screen(struct drm_api *api, int drmFD) idws->send_cmd = !debug_get_bool_option("BRW_NO_HW", FALSE); - return brw_create_screen(&idws->base); -} - -struct drm_api i965_libdrm_api = -{ - .name = "i965", - .driver_name = "i915", - .create_screen = i965_libdrm_create_screen, - .destroy = NULL, -}; - -struct drm_api * -drm_api_create() -{ - struct drm_api *api = NULL; - - if (api == NULL && debug_get_bool_option("BRW_SOFTPIPE", FALSE)) - api = sw_drm_api_create(&i965_libdrm_api); - - if (api == NULL) - api = &i965_libdrm_api; - - return trace_drm_create(api); + return &idws->base; } diff --git a/src/gallium/winsys/i965/drm/i965_drm_winsys.h b/src/gallium/winsys/i965/drm/i965_drm_winsys.h index 3856e1c87f0..82dbe61cc51 100644 --- a/src/gallium/winsys/i965/drm/i965_drm_winsys.h +++ b/src/gallium/winsys/i965/drm/i965_drm_winsys.h @@ -30,8 +30,6 @@ i965_libdrm_winsys(struct brw_winsys_screen *iws) return (struct i965_libdrm_winsys *)iws; } -struct i965_libdrm_winsys *i965_libdrm_winsys_create(int fd, unsigned pci_id); - void i965_libdrm_winsys_init_buffer_functions(struct i965_libdrm_winsys *idws); |