nouveau: fix warning
[mesa.git] / src / gallium / winsys / drm / nouveau / dri / nouveau_context_dri.h
1 #ifndef __NOUVEAU_CONTEXT_DRI_H__
2 #define __NOUVEAU_CONTEXT_DRI_H__
3
4 #include <dri_util.h>
5 #include <xmlconfig.h>
6 #include <nouveau/nouveau_winsys.h>
7 #include "../common/nouveau_context.h"
8 #include "../common/nouveau_drmif.h"
9 #include "../common/nouveau_dma.h"
10
11 struct nouveau_framebuffer {
12 struct st_framebuffer *stfb;
13 };
14
15 struct nouveau_context_dri {
16 struct nouveau_context base;
17 struct st_context *st;
18
19 /* DRI stuff */
20 __DRIscreenPrivate *dri_screen;
21 __DRIdrawablePrivate *dri_drawable;
22 unsigned int last_stamp;
23 driOptionCache dri_option_cache;
24 drm_context_t drm_context;
25 drmLock drm_lock;
26 };
27
28 extern GLboolean nouveau_context_create(const __GLcontextModes *,
29 __DRIcontextPrivate *, void *);
30 extern void nouveau_context_destroy(__DRIcontextPrivate *);
31 extern GLboolean nouveau_context_bind(__DRIcontextPrivate *,
32 __DRIdrawablePrivate *draw,
33 __DRIdrawablePrivate *read);
34 extern GLboolean nouveau_context_unbind(__DRIcontextPrivate *);
35
36 #ifdef DEBUG
37 extern int __nouveau_debug;
38
39 #define DEBUG_BO (1 << 0)
40
41 #define DBG(flag, ...) do { \
42 if (__nouveau_debug & (DEBUG_##flag)) \
43 NOUVEAU_ERR(__VA_ARGS__); \
44 } while(0)
45 #else
46 #define DBG(flag, ...)
47 #endif
48
49 #endif