diff options
Diffstat (limited to 'xc/lib/GL/glx/glxclient.h')
-rw-r--r-- | xc/lib/GL/glx/glxclient.h | 111 |
1 files changed, 108 insertions, 3 deletions
diff --git a/xc/lib/GL/glx/glxclient.h b/xc/lib/GL/glx/glxclient.h index c3a339bd9..3e7aceb8f 100644 --- a/xc/lib/GL/glx/glxclient.h +++ b/xc/lib/GL/glx/glxclient.h @@ -115,6 +115,14 @@ struct __DRIdisplayRec { ** dereferenced in libGL. */ void *private; + + /* + ** Get the number of vertical refreshes since some point in time before + ** this function was first called (i.e., system start up). + ** + ** Added with internal API version "20030317". + */ + int (*getMSC)( void *priv, int64_t *msc ); }; /* @@ -132,7 +140,7 @@ struct __DRIscreenRec { ** context dependent methods. */ void *(*createContext)(Display *dpy, XVisualInfo *vis, void *sharedPrivate, - __DRIcontext *pctx); + __DRIcontext *pctx, __GLXFBConfig * fbconfig); /* ** Method to create the private DRI drawable data and initialize the @@ -159,6 +167,14 @@ struct __DRIscreenRec { ** dereferenced in libGL. */ void *private; + + /* + ** Get the number of vertical refreshes since some point in time before + ** this function was first called (i.e., system start up). + ** + ** Added with internal API version "20030317". + */ + int (*getMSC)( void *priv, int64_t *msc ); }; /* @@ -191,6 +207,14 @@ struct __DRIcontextRec { ** screen used to create this context. Never dereferenced in libGL. */ void *private; + + /* + ** Used by drivers that implement the GLX_SGI_swap_control or + ** GLX_MESA_swap_control extension. + ** + ** Added with internal API version "20030317". + */ + unsigned swap_interval; }; /* @@ -215,6 +239,61 @@ struct __DRIdrawableRec { ** screen used to create this drawable. Never dereferenced in libGL. */ void *private; + + /* + ** Get the number of completed swap buffers for this drawable. + ** + ** Added with internal API version "20030317". + */ + int (*getSBC)(Display *dpy, void *drawablePrivate, int64_t *sbc ); + + /* + ** Wait for the SBC to be greater than or equal target_sbc. + */ + int (*waitForSBC)( Display * dpy, void *drawablePriv, + int64_t target_sbc, + int64_t * msc, int64_t * sbc ); + + /* + ** Wait for the MSC to equal target_msc, or, if that has already passed, + ** the next time (MSC % divisor) is equal to remainder. If divisor is + ** zero, the function will return as soon as MSC is greater than or equal + ** to target_msc. + ** + ** Added with internal API version "20030317". + */ + int (*waitForMSC)( Display * dpy, void *drawablePriv, + int64_t target_msc, int64_t divisor, int64_t remainder, + int64_t * msc, int64_t * sbc ); + + /* + ** Like swapBuffers, but does NOT have an implicit glFlush. Once + ** rendering is complete, waits until MSC is equal to target_msc, or + ** if that has already passed, waits until (MSC % divisor) is equal + ** to remainder. If divisor is zero, the swap will happen as soon as + ** MSC is greater than or equal to target_msc. + ** + ** Added with internal API version "20030317". + */ + int64_t (*swapBuffersMSC)(Display *dpy, void *drawablePrivate, + int64_t target_msc, + int64_t divisor, int64_t remainder); + + /* + ** Enable or disable frame usage tracking. + ** + ** Added with internal API version "20030317". + */ + int (*frameTracking)(Display *dpy, void *drawablePrivate, Bool enable); + + /* + ** Retrieve frame usage information. + ** + ** Added with internal API version "20030317". + */ + int (*queryFrameTracking)(Display *dpy, void *drawablePrivate, + int64_t * sbc, int64_t * missedFrames, + float * lastMissedUsage, float * usage ); }; @@ -456,6 +535,11 @@ struct __GLXcontextRec { */ __DRIcontext driContext; #endif + + /* + ** Added with internal API version "20030317". + */ + GLXFBConfigID fbconfigID; }; #define __glXSetError(gc,code) \ @@ -498,8 +582,11 @@ extern void __glFreeAttributeState(__GLXcontext *); ** a pointer to the config data for that screen (if the screen supports GL). */ typedef struct __GLXscreenConfigsRec { - __GLXvisualConfig *configs; + __GLXFBConfig *configs; int numConfigs; + __GLXvisualConfig * old_configs; + int numOldConfigs; + const char *serverGLXexts; char *effectiveGLXexts; @@ -570,7 +657,8 @@ extern void __glXRegisterExtensions(void); /* Functions for extending the GLX API: */ extern void *__glXRegisterGLXFunction(const char *funcName, void *funcAddr); extern void __glXRegisterGLXExtensionString(const char *extName); - +typedef void * (* PFNGLXREGISTERGLXFUNCTIONPROC) ( const char * funcName, + void * funcAdd ); /************************************************************************/ @@ -678,10 +766,27 @@ extern void _XSend(Display*, const void*, long); #endif +extern void __glXInitializeVisualConfigFromTags( __GLXFBConfig *config, + int count, const INT32 *bp, Bool tagged_only, Bool two_part_tags ); + +extern char *__glXInternalQueryServerString( Display *dpy, int opcode, + int screen, int name ); + extern char *__glXstrdup(const char *str); + +extern const char __glXGLClientExtensions[]; +extern char *__glXCombineExtensionStrings( const char *cext_string, + const char *sext_string ); + +/* Determine the internal API version */ +typedef int (* PFNGLXGETINTERNALVERSIONPROC) ( void ); extern int __glXGetInternalVersion(void); extern Bool __glXWindowExists(Display *dpy, GLXDrawable draw); +/* Get the unadjusted system time */ +typedef int (* PFNGLXGETUSTPROC) ( int64_t * ust ); +extern int __glXGetUST( int64_t * ust ); + #endif /* !__GLX_client_h__ */ |