diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-02-29 15:03:57 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-02-29 15:03:57 +1100 |
commit | 84cc07dc89c0ebce4ad55b4b3684d4420a202683 (patch) | |
tree | ccd90a732c6aec28efa406c315afb9b0841d0bca /src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c | |
parent | 8c77e6f674206ef34ab15026b08e495209dcd4ea (diff) |
nouveau: implement pipe_screen
Untested on NV3x/NV5x. Quite possibly broken.
Diffstat (limited to 'src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c')
-rw-r--r-- | src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c b/src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c index 0e1b4273d1..704f6c7750 100644 --- a/src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c +++ b/src/gallium/winsys/dri/nouveau/nouveau_winsys_softpipe.c @@ -61,23 +61,25 @@ nouveau_is_format_supported(struct softpipe_winsys *sws, uint format) return FALSE; } - - struct pipe_context * nouveau_create_softpipe(struct nouveau_context *nv) { - struct nouveau_softpipe_winsys *nvsws; - - nvsws = CALLOC_STRUCT(nouveau_softpipe_winsys); - - /* Fill in this struct with callbacks that softpipe will need to - * communicate with the window system, buffer manager, etc. - */ - nvsws->sws.is_format_supported = nouveau_is_format_supported; - nvsws->nv = nv; + struct nouveau_softpipe_winsys *nvsws; + struct pipe_screen *pscreen; + struct pipe_winsys *ws; + + ws = nouveau_create_pipe_winsys(nv); + if (!ws) + return NULL; + pscreen = softpipe_create_screen(ws); + + nvsws = CALLOC_STRUCT(nouveau_softpipe_winsys); + if (!nvsws) + return NULL; + + nvsws->sws.is_format_supported = nouveau_is_format_supported; + nvsws->nv = nv; - /* Create the softpipe context: - */ - return softpipe_create(nouveau_create_pipe_winsys(nv), &nvsws->sws); + return softpipe_create(pscreen, ws, &nvsws->sws); } |