1115c3130cb2c4126e22515119eaf78ec90ded51
[profile/ivi/mesa.git] / src / gallium / winsys / g3dvl / nouveau / nouveau_context_vl.h
1 #ifndef __NOUVEAU_CONTEXT_VL_H__
2 #define __NOUVEAU_CONTEXT_VL_H__
3
4 #include <driclient.h>
5 #include <nouveau/nouveau_winsys.h>
6 #include <common/nouveau_context.h>
7
8 /*#include "xmlconfig.h"*/
9
10 struct nouveau_context_vl {
11         struct nouveau_context          base;
12         struct nouveau_screen_vl        *nv_screen;
13         dri_context_t                   *dri_context;
14         dri_drawable_t                  *dri_drawable;
15         unsigned int                    last_stamp;
16         /*driOptionCache                dri_option_cache;*/
17         drm_context_t                   drm_context;
18         drmLock                         drm_lock;
19 };
20
21 extern int nouveau_context_create(dri_context_t *);
22 extern void nouveau_context_destroy(dri_context_t *);
23 extern int nouveau_context_bind(struct nouveau_context_vl *, dri_drawable_t *);
24 extern int nouveau_context_unbind(struct nouveau_context_vl *);
25
26 #ifdef DEBUG
27 extern int __nouveau_debug;
28
29 #define DEBUG_BO (1 << 0)
30
31 #define DBG(flag, ...) do {                   \
32         if (__nouveau_debug & (DEBUG_##flag)) \
33                 NOUVEAU_ERR(__VA_ARGS__);     \
34 } while(0)
35 #else
36 #define DBG(flag, ...)
37 #endif
38
39 #endif