summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/dri/sw
diff options
context:
space:
mode:
authorJakob Bornecrantz <wallbraker@gmail.com>2010-04-14 21:28:12 +0100
committerJakob Bornecrantz <wallbraker@gmail.com>2010-04-16 10:17:31 +0100
commit39c81dada01585a6030f03d215842a1a2ae87d86 (patch)
tree8fce5b6861f86b0844c1d384ace7c7748ba447c1 /src/gallium/state_trackers/dri/sw
parent6c954dd12871aae2c34854498eaf696b67e3680b (diff)
st/dri: Refactor init code a bit
Reviewed-by: George Sapountzis <gsapountzis@gmail.com>
Diffstat (limited to 'src/gallium/state_trackers/dri/sw')
-rw-r--r--src/gallium/state_trackers/dri/sw/drisw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 9106f0d5eb..7f7d737f55 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -261,13 +261,14 @@ drisw_init_screen(__DRIscreen * sPriv)
{
const __DRIconfig **configs;
struct dri_screen *screen;
+ struct pipe_screen *pscreen;
struct drisw_create_screen_arg arg;
screen = CALLOC_STRUCT(dri_screen);
if (!screen)
return NULL;
- screen->api = drm_api_create();
+ screen->api = NULL; /* not needed */
screen->sPriv = sPriv;
screen->fd = -1;
@@ -277,7 +278,10 @@ drisw_init_screen(__DRIscreen * sPriv)
arg.base.mode = DRM_CREATE_DRISW;
arg.lf = &drisw_lf;
- configs = dri_init_screen_helper(screen, &arg.base, 32);
+ pscreen = screen->api->create_screen(screen->api, screen->fd, &arg.base);
+ /* dri_init_screen_helper checks pscreen for us */
+
+ configs = dri_init_screen_helper(screen, pscreen, 32);
if (!configs)
goto fail;