1 #ifndef __NOUVEAU_CONTEXT_DRI_H__
2 #define __NOUVEAU_CONTEXT_DRI_H__
7 #include "nouveau/nouveau_winsys.h"
9 #define NOUVEAU_ERR(fmt, args...) debug_printf("%s: "fmt, __func__, ##args)
11 struct nouveau_framebuffer
{
12 struct st_framebuffer
*stfb
;
15 struct nouveau_context
{
16 struct st_context
*st
;
19 __DRIscreenPrivate
*dri_screen
;
20 __DRIdrawablePrivate
*dri_drawable
;
21 unsigned int last_stamp
;
22 driOptionCache dri_option_cache
;
23 drm_context_t drm_context
;
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
*);
36 extern void nouveau_contended_lock(struct nouveau_context
*nv
);
37 extern void LOCK_HARDWARE(struct nouveau_context
*nv
);
38 extern void UNLOCK_HARDWARE(struct nouveau_context
*nv
);
41 extern int __nouveau_debug
;
43 #define DEBUG_BO (1 << 0)
45 #define DBG(flag, ...) do { \
46 if (__nouveau_debug & (DEBUG_##flag)) \
47 NOUVEAU_ERR(__VA_ARGS__); \
50 #define DBG(flag, ...)