From 020c64b2cf2973b5cb41e233d2bfbd85f1b699f7 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Sat, 8 Mar 2008 21:57:29 -0500 Subject: Move DRI context functions into dri_glx.c. Also drop isDirect flag; if gc->driContext is non-NULL, it's direct. --- src/glx/x11/glxclient.h | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'src/glx/x11/glxclient.h') diff --git a/src/glx/x11/glxclient.h b/src/glx/x11/glxclient.h index d99918a185..259add7595 100644 --- a/src/glx/x11/glxclient.h +++ b/src/glx/x11/glxclient.h @@ -95,6 +95,7 @@ typedef struct _glapi_table __GLapi; typedef struct __GLXDRIdisplayRec __GLXDRIdisplay; typedef struct __GLXDRIscreenRec __GLXDRIscreen; typedef struct __GLXDRIdrawableRec __GLXDRIdrawable; +typedef struct __GLXDRIcontextRec __GLXDRIcontext; struct __GLXDRIdisplayRec { /** @@ -110,15 +111,26 @@ struct __GLXDRIscreenRec { void (*destroyScreen)(__GLXscreenConfigs *psc); - void (*createContext)(__GLXscreenConfigs *psc, - const __GLcontextModes *mode, - GLXContext gc, GLXContext shareList, int renderType); - + __GLXDRIcontext *(*createContext)(__GLXscreenConfigs *psc, + const __GLcontextModes *mode, + GLXContext gc, + GLXContext shareList, int renderType); + __GLXDRIdrawable *(*createDrawable)(__GLXscreenConfigs *psc, GLXDrawable drawable, GLXContext gc); }; +struct __GLXDRIcontextRec { + void (*destroyContext)(__GLXDRIcontext *context, __GLXscreenConfigs *psc, + Display *dpy); + Bool (*bindContext)(__GLXDRIcontext *context, + __GLXDRIdrawable *pdraw, + __GLXDRIdrawable *pread); + + void (*unbindContext)(__GLXDRIcontext *context); +}; + struct __GLXDRIdrawableRec { XID drawable; __GLXscreenConfigs *psc; @@ -295,11 +307,6 @@ struct __GLXcontextRec { */ GLenum error; - /** - * Whether this context does direct rendering. - */ - Bool isDirect; - /** * \c dpy of current display for this context. Will be \c NULL if not * current to any display, or if this is the "dummy context". @@ -349,15 +356,7 @@ struct __GLXcontextRec { const __GLcontextModes * mode; #ifdef GLX_DIRECT_RENDERING - /** - * Per context direct rendering interface functions and data. - */ - __DRIcontext driContext; - - /** - * XID for the server side drm_context_t - */ - XID hwContextID; + __GLXDRIcontext *driContext; #endif /** -- cgit v1.2.3