Merge master and fix conflicts
[mesa.git] / src / gallium / winsys / drm / nouveau / drm / nouveau_drm_api.h
1 #ifndef __NOUVEAU_DRM_API_H__
2 #define __NOUVEAU_DRM_API_H__
3
4 #include "state_tracker/drm_api.h"
5 #include "state_tracker/dri1_api.h"
6
7 #include "pipe/internal/p_winsys_screen.h"
8
9 #include "nouveau_dri.h"
10
11 struct nouveau_winsys {
12 struct pipe_winsys base;
13
14 struct pipe_screen *pscreen;
15
16 unsigned nr_pctx;
17 struct pipe_context **pctx;
18
19 struct pipe_surface *front;
20 };
21
22 static INLINE struct nouveau_winsys *
23 nouveau_winsys(struct pipe_winsys *ws)
24 {
25 return (struct nouveau_winsys *)ws;
26 }
27
28 static INLINE struct nouveau_winsys *
29 nouveau_winsys_screen(struct pipe_screen *pscreen)
30 {
31 return nouveau_winsys(pscreen->winsys);
32 }
33
34 #endif