1 #ifndef __NOUVEAU_SCREEN_H__
2 #define __NOUVEAU_SCREEN_H__
4 struct nouveau_screen
{
5 struct pipe_screen base
;
6 struct nouveau_device
*device
;
7 struct nouveau_channel
*channel
;
10 static inline struct nouveau_screen
*
11 nouveau_screen(struct pipe_screen
*pscreen
)
13 return (struct nouveau_screen
*)pscreen
;
16 static inline struct nouveau_bo
*
17 nouveau_bo(struct pipe_buffer
*pb
)
19 return pb
? *(struct nouveau_bo
**)(pb
+ 1) : NULL
;
22 int nouveau_screen_init(struct nouveau_screen
*, struct nouveau_device
*);
23 void nouveau_screen_fini(struct nouveau_screen
*);
25 struct nouveau_miptree
{
26 struct pipe_texture base
;
27 struct nouveau_bo
*bo
;
30 static inline struct nouveau_miptree
*
31 nouveau_miptree(struct pipe_texture
*pt
)
33 return (struct nouveau_miptree
*)pt
;