1 #ifndef __NOUVEAU_CONTEXT_DRI_H__
2 #define __NOUVEAU_CONTEXT_DRI_H__
6 #include <nouveau/nouveau_winsys.h>
7 #include "../common/nouveau_context.h"
9 struct nouveau_framebuffer
{
10 struct st_framebuffer
*stfb
;
13 struct nouveau_context_dri
{
14 struct nouveau_context base
;
15 struct st_context
*st
;
18 __DRIscreenPrivate
*dri_screen
;
19 __DRIdrawablePrivate
*dri_drawable
;
20 unsigned int last_stamp
;
21 driOptionCache dri_option_cache
;
22 drm_context_t drm_context
;
26 extern GLboolean
nouveau_context_create(const __GLcontextModes
*,
27 __DRIcontextPrivate
*, void *);
28 extern void nouveau_context_destroy(__DRIcontextPrivate
*);
29 extern GLboolean
nouveau_context_bind(__DRIcontextPrivate
*,
30 __DRIdrawablePrivate
*draw
,
31 __DRIdrawablePrivate
*read
);
32 extern GLboolean
nouveau_context_unbind(__DRIcontextPrivate
*);
35 extern int __nouveau_debug
;
37 #define DEBUG_BO (1 << 0)
39 #define DBG(flag, ...) do { \
40 if (__nouveau_debug & (DEBUG_##flag)) \
41 NOUVEAU_ERR(__VA_ARGS__); \
44 #define DBG(flag, ...)