1 #ifndef NOUVEAU_PIPE_WINSYS_H
2 #define NOUVEAU_PIPE_WINSYS_H
4 #include "pipe/internal/p_winsys_screen.h"
5 #include "pipe/p_context.h"
7 #include "nouveau/nouveau_winsys.h"
9 #include "nouveau_device.h"
11 struct nouveau_pipe_buffer
{
12 struct pipe_buffer base
;
13 struct nouveau_bo
*bo
;
16 static INLINE
struct nouveau_pipe_buffer
*
17 nouveau_pipe_buffer(struct pipe_buffer
*buf
)
19 return (struct nouveau_pipe_buffer
*)buf
;
22 struct nouveau_pipe_winsys
{
23 struct pipe_winsys base
;
25 struct pipe_screen
*pscreen
;
27 struct nouveau_channel
*channel
;
31 struct pipe_context
**pctx
;
34 static INLINE
struct nouveau_pipe_winsys
*
35 nouveau_pipe_winsys(struct pipe_winsys
*ws
)
37 return (struct nouveau_pipe_winsys
*)ws
;
40 static INLINE
struct nouveau_pipe_winsys
*
41 nouveau_screen(struct pipe_screen
*pscreen
)
43 return nouveau_pipe_winsys(pscreen
->winsys
);
47 nouveau_pipe_winsys_new(struct nouveau_device
*);
49 struct nouveau_winsys
*
50 nouveau_winsys_new(struct pipe_winsys
*ws
);