};
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
#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;
}
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);
return NULL;
nv30screen->chipset = chipset;
+ nv30screen->nvws = nvws;
nv30screen->screen.winsys = winsys;
struct nv30_screen {
struct pipe_screen screen;
+
+ struct nouveau_winsys *nvws;
unsigned chipset;
};
return (struct nv30_screen *)screen;
}
-extern struct pipe_screen *
-nv30_screen_create(struct pipe_winsys *winsys, unsigned chipset);
-
#endif
}
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)
}
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);
return NULL;
screen->chipset = chipset;
+ screen->nvws = nvws;
screen->pipe.winsys = ws;
screen->pipe.destroy = nv40_screen_destroy;
struct nv40_screen {
struct pipe_screen pipe;
+
+ struct nouveau_winsys *nvws;
unsigned chipset;
};
return (struct nv40_screen *)screen;
}
-extern struct pipe_screen *
-nv40_screen_create(struct pipe_winsys *winsys, unsigned chipset);
-
#endif
#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;
}
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);
return NULL;
screen->chipset = chipset;
+ screen->nvws = nvws;
screen->pipe.winsys = ws;
struct nv50_screen {
struct pipe_screen pipe;
+
+ struct nouveau_winsys *nvws;
unsigned chipset;
};
return (struct nv50_screen *)screen;
}
-extern struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *winsys, unsigned chipset);
-
#endif
{
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;
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);
}