diff options
author | Jakob Bornecrantz <[email protected]> | 2010-06-18 19:07:26 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-06-23 03:43:48 +0200 |
commit | 41e0f6bc2f943a05766872d419e4398ddd37b42a (patch) | |
tree | f8c6cfeb5761803a9e83305dafb480aebb087508 /src/gallium/targets/dri-i965/target.c | |
parent | 0106be903a08635fa752c65a94e7e244db3d1aff (diff) |
i965g: Move bootstrap code to targets
Diffstat (limited to 'src/gallium/targets/dri-i965/target.c')
-rw-r--r-- | src/gallium/targets/dri-i965/target.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/gallium/targets/dri-i965/target.c b/src/gallium/targets/dri-i965/target.c index 9fe2227edd7..36424c60a11 100644 --- a/src/gallium/targets/dri-i965/target.c +++ b/src/gallium/targets/dri-i965/target.c @@ -1,4 +1,27 @@ -#include "target-helpers/drm_api_compat.h" +#include "target-helpers/inline_wrapper_sw_helper.h" +#include "state_tracker/drm_driver.h" +#include "i965/drm/i965_drm_public.h" +#include "i965/brw_public.h" -DRM_API_COMPAT_STRUCT("i965", "i915") +static struct pipe_screen * +create_screen(int fd) +{ + struct brw_winsys_screen *bws; + struct pipe_screen *screen; + + bws = i965_drm_winsys_screen_create(fd); + if (!bws) + return NULL; + + screen = brw_screen_create(bws); + if (!screen) + return NULL; + + if (debug_get_bool_option("BRW_SOFTPIPE", FALSE)) + screen = sw_screen_wrap(screen); + + return screen; +} + +DRM_DRIVER_DESCRIPTOR("i915", "i965", create_screen) |