summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h15
-rw-r--r--src/gallium/drivers/nv30/nv30_context.c3
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.c4
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.h5
-rw-r--r--src/gallium/drivers/nv40/nv40_context.c3
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c4
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.h5
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c3
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c4
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.h5
-rw-r--r--src/gallium/winsys/dri/nouveau/nouveau_winsys.c8
11 files changed, 34 insertions, 25 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index 98d95e94a5..11ca7e80dd 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -50,21 +50,24 @@ struct nouveau_winsys {
};
extern struct pipe_screen *
-nv30_screen_create(struct pipe_winsys *ws, unsigned chipset);
+nv30_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
+ unsigned chipset);
extern struct pipe_context *
-nv30_create(struct pipe_screen *, struct nouveau_winsys *);
+nv30_create(struct pipe_screen *);
extern struct pipe_screen *
-nv40_screen_create(struct pipe_winsys *ws, unsigned chipset);
+nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
+ unsigned chipset);
extern struct pipe_context *
-nv40_create(struct pipe_screen *, struct nouveau_winsys *);
+nv40_create(struct pipe_screen *);
extern struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *ws, unsigned chipset);
+nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
+ unsigned chipset);
extern struct pipe_context *
-nv50_create(struct pipe_screen *, struct nouveau_winsys *);
+nv50_create(struct pipe_screen *);
#endif
diff --git a/src/gallium/drivers/nv30/nv30_context.c b/src/gallium/drivers/nv30/nv30_context.c
index b8452e23b1..522fb13226 100644
--- a/src/gallium/drivers/nv30/nv30_context.c
+++ b/src/gallium/drivers/nv30/nv30_context.c
@@ -265,9 +265,10 @@ nv30_init_hwctx(struct nv30_context *nv30, int rankine_class)
#define NV35TCL_CHIPSET_3X_MASK 0x000001e0
struct pipe_context *
-nv30_create(struct pipe_screen *screen, struct nouveau_winsys *nvws)
+nv30_create(struct pipe_screen *screen)
{
struct pipe_winsys *pipe_winsys = screen->winsys;
+ struct nouveau_winsys *nvws = nv30_screen(screen)->nvws;
unsigned chipset = nv30_screen(screen)->chipset;
struct nv30_context *nv30;
int rankine_class = 0, ret;
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 6d64025528..39f2ac1af5 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -125,7 +125,8 @@ nv30_screen_destroy(struct pipe_screen *screen)
}
struct pipe_screen *
-nv30_screen_create(struct pipe_winsys *winsys, unsigned chipset)
+nv30_screen_create(struct pipe_winsys *winsys, struct nouveau_winsys *nvws,
+ unsigned chipset)
{
struct nv30_screen *nv30screen = CALLOC_STRUCT(nv30_screen);
@@ -133,6 +134,7 @@ nv30_screen_create(struct pipe_winsys *winsys, unsigned chipset)
return NULL;
nv30screen->chipset = chipset;
+ nv30screen->nvws = nvws;
nv30screen->screen.winsys = winsys;
diff --git a/src/gallium/drivers/nv30/nv30_screen.h b/src/gallium/drivers/nv30/nv30_screen.h
index e55242fbf7..f878f81e11 100644
--- a/src/gallium/drivers/nv30/nv30_screen.h
+++ b/src/gallium/drivers/nv30/nv30_screen.h
@@ -5,6 +5,8 @@
struct nv30_screen {
struct pipe_screen screen;
+
+ struct nouveau_winsys *nvws;
unsigned chipset;
};
@@ -14,7 +16,4 @@ nv30_screen(struct pipe_screen *screen)
return (struct nv30_screen *)screen;
}
-extern struct pipe_screen *
-nv30_screen_create(struct pipe_winsys *winsys, unsigned chipset);
-
#endif
diff --git a/src/gallium/drivers/nv40/nv40_context.c b/src/gallium/drivers/nv40/nv40_context.c
index a7f64c6e9e..679c2ddc6b 100644
--- a/src/gallium/drivers/nv40/nv40_context.c
+++ b/src/gallium/drivers/nv40/nv40_context.c
@@ -196,11 +196,12 @@ nv40_destroy(struct pipe_context *pipe)
}
struct pipe_context *
-nv40_create(struct pipe_screen *pscreen, struct nouveau_winsys *nvws)
+nv40_create(struct pipe_screen *pscreen)
{
struct pipe_winsys *ws = pscreen->winsys;
struct nv40_context *nv40;
unsigned chipset = nv40_screen(pscreen)->chipset;
+ struct nouveau_winsys *nvws = nv40_screen(pscreen)->nvws;
nv40 = CALLOC(1, sizeof(struct nv40_context));
if (!nv40)
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index 1941598c64..66e84b6890 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -125,7 +125,8 @@ nv40_screen_destroy(struct pipe_screen *pscreen)
}
struct pipe_screen *
-nv40_screen_create(struct pipe_winsys *ws, unsigned chipset)
+nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
+ unsigned chipset)
{
struct nv40_screen *screen = CALLOC_STRUCT(nv40_screen);
@@ -133,6 +134,7 @@ nv40_screen_create(struct pipe_winsys *ws, unsigned chipset)
return NULL;
screen->chipset = chipset;
+ screen->nvws = nvws;
screen->pipe.winsys = ws;
screen->pipe.destroy = nv40_screen_destroy;
diff --git a/src/gallium/drivers/nv40/nv40_screen.h b/src/gallium/drivers/nv40/nv40_screen.h
index b30a6c5ad5..88b8fed26c 100644
--- a/src/gallium/drivers/nv40/nv40_screen.h
+++ b/src/gallium/drivers/nv40/nv40_screen.h
@@ -5,6 +5,8 @@
struct nv40_screen {
struct pipe_screen pipe;
+
+ struct nouveau_winsys *nvws;
unsigned chipset;
};
@@ -14,7 +16,4 @@ nv40_screen(struct pipe_screen *screen)
return (struct nv40_screen *)screen;
}
-extern struct pipe_screen *
-nv40_screen_create(struct pipe_winsys *winsys, unsigned chipset);
-
#endif
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 98022809a6..e5054e34f6 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -56,9 +56,10 @@ nv50_init_hwctx(struct nv50_context *nv50, int tesla_class)
#define GRCLASS5097_CHIPSETS 0x00000000
#define GRCLASS8297_CHIPSETS 0x00000010
struct pipe_context *
-nv50_create(struct pipe_screen *pscreen, struct nouveau_winsys *nvws)
+nv50_create(struct pipe_screen *pscreen)
{
struct pipe_winsys *pipe_winsys = pscreen->winsys;
+ struct nouveau_winsys *nvws = nv50_screen(pscreen)->nvws;
unsigned chipset = nv50_screen(pscreen)->chipset;
struct nv50_context *nv50;
int tesla_class, ret;
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 8bf82eb0bc..f091779e3b 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -90,7 +90,8 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
}
struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *ws, unsigned chipset)
+nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
+ unsigned chipset)
{
struct nv50_screen *screen = CALLOC_STRUCT(nv50_screen);
@@ -98,6 +99,7 @@ nv50_screen_create(struct pipe_winsys *ws, unsigned chipset)
return NULL;
screen->chipset = chipset;
+ screen->nvws = nvws;
screen->pipe.winsys = ws;
diff --git a/src/gallium/drivers/nv50/nv50_screen.h b/src/gallium/drivers/nv50/nv50_screen.h
index 45ebbb8051..d664816a03 100644
--- a/src/gallium/drivers/nv50/nv50_screen.h
+++ b/src/gallium/drivers/nv50/nv50_screen.h
@@ -5,6 +5,8 @@
struct nv50_screen {
struct pipe_screen pipe;
+
+ struct nouveau_winsys *nvws;
unsigned chipset;
};
@@ -14,7 +16,4 @@ nv50_screen(struct pipe_screen *screen)
return (struct nv50_screen *)screen;
}
-extern struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *winsys, unsigned chipset);
-
#endif
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_winsys.c b/src/gallium/winsys/dri/nouveau/nouveau_winsys.c
index 1d758e29e7..529f577181 100644
--- a/src/gallium/winsys/dri/nouveau/nouveau_winsys.c
+++ b/src/gallium/winsys/dri/nouveau/nouveau_winsys.c
@@ -73,9 +73,9 @@ nouveau_pipe_create(struct nouveau_context *nv)
{
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 nouveau_winsys *);
+ struct pipe_context *(*hw_create)(struct pipe_screen *);
struct pipe_winsys *ws;
struct pipe_screen *pscreen;
@@ -126,7 +126,7 @@ nouveau_pipe_create(struct nouveau_context *nv)
nvws->surface_fill = nouveau_pipe_surface_fill;
ws = nouveau_create_pipe_winsys(nv);
- pscreen = hws_create(ws, nv->chipset);
- return hw_create(pscreen, nvws);
+ pscreen = hws_create(ws, nvws, nv->chipset);
+ return hw_create(pscreen);
}