diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-03-02 14:56:42 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-03-02 15:02:25 +1100 |
commit | b560ed2444383b9634786fe742b8cb6f5cdfc781 (patch) | |
tree | ecaec1297027c749bc212870ffca9b6525063e52 /src/gallium/winsys/dri/nouveau/nouveau_winsys.c | |
parent | 0a12e4587ccf2c4fa71e93bb00b4582deb99a82c (diff) |
nouveau: enable multi-context/single-channel support for nv40
Diffstat (limited to 'src/gallium/winsys/dri/nouveau/nouveau_winsys.c')
-rw-r--r-- | src/gallium/winsys/dri/nouveau/nouveau_winsys.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_winsys.c b/src/gallium/winsys/dri/nouveau/nouveau_winsys.c index 50d7549b1b..87619bdcfb 100644 --- a/src/gallium/winsys/dri/nouveau/nouveau_winsys.c +++ b/src/gallium/winsys/dri/nouveau/nouveau_winsys.c @@ -70,11 +70,12 @@ nouveau_pipe_emit_reloc(struct nouveau_channel *chan, void *ptr, struct pipe_context * nouveau_pipe_create(struct nouveau_context *nv) { + struct nouveau_channel_context *nvc = nv->nvc; struct nouveau_winsys *nvws = CALLOC_STRUCT(nouveau_winsys); struct pipe_screen *(*hws_create)(struct pipe_winsys *, struct nouveau_winsys *, unsigned chipset); - struct pipe_context *(*hw_create)(struct pipe_screen *); + struct pipe_context *(*hw_create)(struct pipe_screen *, unsigned); struct pipe_winsys *ws; struct pipe_screen *pscreen; @@ -125,7 +126,10 @@ nouveau_pipe_create(struct nouveau_context *nv) nvws->surface_fill = nouveau_pipe_surface_fill; ws = nouveau_create_pipe_winsys(nv); - pscreen = hws_create(ws, nvws, nv->chipset); - return hw_create(pscreen); + + if (!nvc->pscreen) + nvc->pscreen = hws_create(ws, nvws, nv->chipset); + nvc->pctx[nv->pctx_id] = hw_create(nvc->pscreen, nv->pctx_id); + return nvc->pctx[nv->pctx_id]; } |