diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-06-05 10:28:13 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-06-05 14:37:03 +1000 |
commit | 80e9e1ee8172d1e5a81d702681897dddd9d815f1 (patch) | |
tree | 8104fc6523428a52598f026f566bab7e29939309 /src/gallium/winsys | |
parent | 1b207d9bb81ae3385e5658a81c71fbf2fe15c18f (diff) |
nouveau: move channel creation into pipe drivers
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/drm/nouveau/drm/Makefile | 3 | ||||
-rw-r--r-- | src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c | 11 | ||||
-rw-r--r-- | src/gallium/winsys/drm/nouveau/drm/nouveau_winsys.c | 20 |
3 files changed, 3 insertions, 31 deletions
diff --git a/src/gallium/winsys/drm/nouveau/drm/Makefile b/src/gallium/winsys/drm/nouveau/drm/Makefile index 2da78d8690..621ad2a807 100644 --- a/src/gallium/winsys/drm/nouveau/drm/Makefile +++ b/src/gallium/winsys/drm/nouveau/drm/Makefile @@ -4,8 +4,7 @@ include $(TOP)/configs/current LIBNAME = nouveaudrm C_SOURCES = nouveau_drm_api.c \ - nouveau_winsys_pipe.c \ - nouveau_winsys.c + nouveau_winsys_pipe.c LIBRARY_INCLUDES = $(shell pkg-config libdrm libdrm_nouveau --cflags-only-I) LIBRARY_DEFINES = $(shell pkg-config libdrm libdrm_nouveau --cflags-only-other) diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c index b355a1391d..22c53f6ea9 100644 --- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c +++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c @@ -70,10 +70,9 @@ nouveau_drm_create_screen(int fd, struct drm_create_screen_arg *arg) { struct dri1_create_screen_arg *dri1 = (void *)arg; struct pipe_winsys *ws; - struct nouveau_winsys *nvws; struct nouveau_device *dev = NULL; struct pipe_screen *(*init)(struct pipe_winsys *, - struct nouveau_winsys *); + struct nouveau_device *); int ret; ret = nouveau_device_open_existing(&dev, 0, fd, 0); @@ -114,13 +113,7 @@ nouveau_drm_create_screen(int fd, struct drm_create_screen_arg *arg) return NULL; } - nvws = nouveau_winsys_new(ws); - if (!nvws) { - ws->destroy(ws); - return NULL; - } - - nouveau_pipe_winsys(ws)->pscreen = init(ws, nvws); + nouveau_pipe_winsys(ws)->pscreen = init(ws, dev); if (!nouveau_pipe_winsys(ws)->pscreen) { ws->destroy(ws); return NULL; diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_winsys.c b/src/gallium/winsys/drm/nouveau/drm/nouveau_winsys.c deleted file mode 100644 index c03e6ddcae..0000000000 --- a/src/gallium/winsys/drm/nouveau/drm/nouveau_winsys.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "util/u_memory.h" - -#include "nouveau_winsys_pipe.h" - -struct nouveau_winsys * -nouveau_winsys_new(struct pipe_winsys *ws) -{ - struct nouveau_pipe_winsys *nvpws = nouveau_pipe_winsys(ws); - struct nouveau_winsys *nvws; - - nvws = CALLOC_STRUCT(nouveau_winsys); - if (!nvws) - return NULL; - - nvws->ws = ws; - nvws->channel = nvpws->channel; - - return nvws; -} - |