diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-01-11 16:19:21 +0000 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-01-11 16:19:21 +0000 |
commit | e37a3aed95ea91a7ddbabc4bed1fac7c451fe695 (patch) | |
tree | 9efa59fb8015a58146d7a50a3b6039e5fbe3a60d /src/gallium/winsys/drm/nouveau/dri/nouveau_context_dri.h | |
parent | 61e843ff4bf9b9e8c4a7a8a485cee852a4f1dd86 (diff) | |
parent | 83a525af95bbb8012b9d7ee6b766621d6bb2d701 (diff) |
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
Diffstat (limited to 'src/gallium/winsys/drm/nouveau/dri/nouveau_context_dri.h')
-rw-r--r-- | src/gallium/winsys/drm/nouveau/dri/nouveau_context_dri.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/nouveau/dri/nouveau_context_dri.h b/src/gallium/winsys/drm/nouveau/dri/nouveau_context_dri.h new file mode 100644 index 0000000000..8257790d47 --- /dev/null +++ b/src/gallium/winsys/drm/nouveau/dri/nouveau_context_dri.h @@ -0,0 +1,49 @@ +#ifndef __NOUVEAU_CONTEXT_DRI_H__ +#define __NOUVEAU_CONTEXT_DRI_H__ + +#include <dri_util.h> +#include <xmlconfig.h> +#include <nouveau/nouveau_winsys.h> +#include "../common/nouveau_context.h" +#include "../common/nouveau_drmif.h" +#include "../common/nouveau_dma.h" + +struct nouveau_framebuffer { + struct st_framebuffer *stfb; +}; + +struct nouveau_context_dri { + struct nouveau_context base; + struct st_context *st; + + /* DRI stuff */ + __DRIscreenPrivate *dri_screen; + __DRIdrawablePrivate *dri_drawable; + unsigned int last_stamp; + driOptionCache dri_option_cache; + drm_context_t drm_context; + drmLock drm_lock; +}; + +extern GLboolean nouveau_context_create(const __GLcontextModes *, + __DRIcontextPrivate *, void *); +extern void nouveau_context_destroy(__DRIcontextPrivate *); +extern GLboolean nouveau_context_bind(__DRIcontextPrivate *, + __DRIdrawablePrivate *draw, + __DRIdrawablePrivate *read); +extern GLboolean nouveau_context_unbind(__DRIcontextPrivate *); + +#ifdef DEBUG +extern int __nouveau_debug; + +#define DEBUG_BO (1 << 0) + +#define DBG(flag, ...) do { \ + if (__nouveau_debug & (DEBUG_##flag)) \ + NOUVEAU_ERR(__VA_ARGS__); \ +} while(0) +#else +#define DBG(flag, ...) +#endif + +#endif |