X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fglxclient.h;h=aaca989f1e32d39767dd21c8057c3efb662a3e71;hb=4839d1aed167d904ebd5827d7c01d87ad5b0fca1;hp=13cd939cd2a7301a4b402ebe38bd5a3f9b4f0ac8;hpb=588042a8ec4ea91a952c07a0768516fd590758f4;p=mesa.git diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index 13cd939cd2a..aaca989f1e3 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -47,14 +47,13 @@ #include #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include "GL/glxproto.h" -#include "glapi/glapitable.h" #include "glxconfig.h" #include "glxhash.h" -#if defined( PTHREADS ) +#if defined( HAVE_PTHREAD ) # include #endif @@ -114,9 +113,9 @@ struct __GLXDRIscreenRec { struct glx_config *config); int64_t (*swapBuffers)(__GLXDRIdrawable *pdraw, int64_t target_msc, - int64_t divisor, int64_t remainder); + int64_t divisor, int64_t remainder, Bool flush); void (*copySubBuffer)(__GLXDRIdrawable *pdraw, - int x, int y, int width, int height); + int x, int y, int width, int height, Bool flush); int (*getDrawableMSC)(struct glx_screen *psc, __GLXDRIdrawable *pdraw, int64_t *ust, int64_t *msc, int64_t *sbc); int (*waitForMSC)(__GLXDRIdrawable *pdraw, int64_t target_msc, @@ -126,6 +125,7 @@ struct __GLXDRIscreenRec { int64_t *msc, int64_t *sbc); int (*setSwapInterval)(__GLXDRIdrawable *pdraw, int interval); int (*getSwapInterval)(__GLXDRIdrawable *pdraw); + int (*getBufferAge)(__GLXDRIdrawable *pdraw); }; struct __GLXDRIdrawableRec @@ -151,6 +151,7 @@ extern __GLXDRIdisplay *dri2CreateDisplay(Display * dpy); extern void dri2InvalidateBuffers(Display *dpy, XID drawable); extern unsigned dri2GetSwapEventType(Display *dpy, XID drawable); +extern __GLXDRIdisplay *dri3_create_display(Display * dpy); /* ** Functions to obtain driver configuration information from a direct @@ -215,7 +216,7 @@ struct glx_context_vtable { void (*destroy)(struct glx_context *ctx); int (*bind)(struct glx_context *context, struct glx_context *old, GLXDrawable draw, GLXDrawable read); - void (*unbind)(struct glx_context *context, struct glx_context *new); + void (*unbind)(struct glx_context *context, struct glx_context *new_ctx); void (*wait_gl)(struct glx_context *ctx); void (*wait_x)(struct glx_context *ctx); void (*use_x_font)(struct glx_context *ctx, @@ -475,7 +476,12 @@ struct glx_screen_vtable { unsigned num_attrib, const uint32_t *attribs, unsigned *error); - + int (*query_renderer_integer)(struct glx_screen *psc, + int attribute, + unsigned int *value); + int (*query_renderer_string)(struct glx_screen *psc, + int attribute, + const char **value); }; struct glx_screen @@ -583,6 +589,7 @@ struct glx_display __GLXDRIdisplay *driswDisplay; __GLXDRIdisplay *driDisplay; __GLXDRIdisplay *dri2Display; + __GLXDRIdisplay *dri3Display; #endif }; @@ -624,7 +631,7 @@ extern void __glXPreferEGL(int state); extern int __glXDebug; /* This is per-thread storage in an MT environment */ -#if defined( PTHREADS ) +#if defined( HAVE_PTHREAD ) extern void __glXSetCurrentContext(struct glx_context * c); @@ -647,7 +654,7 @@ extern struct glx_context *__glXcurrentContext; #define __glXGetCurrentContext() __glXcurrentContext #define __glXSetCurrentContext(gc) __glXcurrentContext = gc -#endif /* defined( PTHREADS ) */ +#endif /* defined( HAVE_PTHREAD ) */ extern void __glXSetCurrentContextNull(void); @@ -656,7 +663,7 @@ extern void __glXSetCurrentContextNull(void); ** Global lock for all threads in this address space using the GLX ** extension */ -#if defined( PTHREADS ) +#if defined( HAVE_PTHREAD ) extern pthread_mutex_t __glXmutex; #define __glXLock() pthread_mutex_lock(&__glXmutex) #define __glXUnlock() pthread_mutex_unlock(&__glXmutex) @@ -760,9 +767,6 @@ extern char *__glXQueryServerString(Display * dpy, int opcode, extern char *__glXGetString(Display * dpy, int opcode, CARD32 screen, CARD32 name); -extern char *__glXstrdup(const char *str); - - extern const char __glXGLClientVersion[]; extern const char __glXGLClientExtensions[]; @@ -775,7 +779,7 @@ extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable, #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) extern GLboolean -__glxGetMscRate(__GLXDRIdrawable *glxDraw, +__glxGetMscRate(struct glx_screen *psc, int32_t * numerator, int32_t * denominator); /* So that dri2.c:DRI2WireToEvent() can access @@ -804,6 +808,9 @@ extern int applegl_create_display(struct glx_display *display); #endif +extern Bool validate_renderType_against_config(const struct glx_config *config, + int renderType); + extern struct glx_drawable *GetGLXDrawable(Display *dpy, GLXDrawable drawable); extern int InitGLXDrawable(Display *dpy, struct glx_drawable *glxDraw, @@ -818,5 +825,12 @@ extern struct glx_context * indirect_create_context(struct glx_screen *psc, struct glx_config *mode, struct glx_context *shareList, int renderType); +extern struct glx_context * +indirect_create_context_attribs(struct glx_screen *base, + struct glx_config *config_base, + struct glx_context *shareList, + unsigned num_attribs, + const uint32_t *attribs, + unsigned *error); #endif /* !__GLX_client_h__ */