X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fglxclient.h;h=f8ae450f09c95979e906f19fe718016022c0f59b;hb=244dc0521439379a0a44f81ba432aa04ca6c1a91;hp=2b6966f2e0850ef5284c413a248415ecfadc535d;hpb=b97e41c7b18c363a303693fb841fe606b1106fe6;p=mesa.git diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index 2b6966f2e08..f8ae450f09c 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -138,6 +138,7 @@ struct __GLXDRIdrawableRec GLenum textureTarget; GLenum textureFormat; /* EXT_texture_from_pixmap support */ unsigned long eventMask; + int refcount; }; /* @@ -214,7 +215,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, @@ -223,12 +224,9 @@ struct glx_context_vtable { GLXDrawable drawable, int buffer, const int *attrib_list); void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer); - + void * (*get_proc_address)(const char *symbol); }; -extern void -glx_send_destroy_context(Display *dpy, XID xid); - /** * GLX state that needs to be kept on the client. One of these records * exist for each context that has been made current by this client. @@ -309,14 +307,6 @@ struct glx_context GLuint *selectBuf; /*@} */ - /** - * This is \c GL_TRUE if the pixel unpack modes are such that an image - * can be unpacked from the clients memory by just copying. It may - * still be true that the server will have to do some work. This - * just promises that a straight copy will fetch the correct bytes. - */ - GLboolean fastImageUnpack; - /** * Fill newImage with the unpacked form of \c oldImage getting it * ready for transport to the server. @@ -341,6 +331,10 @@ struct glx_context */ Bool isDirect; +#if defined(GLX_DIRECT_RENDERING) && defined(GLX_USE_APPLEGL) + void *driContext; +#endif + /** * \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". @@ -474,6 +468,14 @@ struct glx_screen_vtable { struct glx_config *config, struct glx_context *shareList, int renderType); + + struct glx_context *(*create_context_attribs)(struct glx_screen *psc, + struct glx_config *config, + struct glx_context *shareList, + unsigned num_attrib, + const uint32_t *attribs, + unsigned *error); + }; struct glx_screen @@ -570,6 +572,8 @@ struct glx_display */ struct glx_screen **screens; + __glxHashTable *glXDrawHash; + #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) __glxHashTable *drawHash; @@ -582,6 +586,14 @@ struct glx_display #endif }; +struct glx_drawable { + XID xDrawable; + XID drawable; + + uint32_t lastEventSbc; + int64_t eventSbcWrap; +}; + extern int glx_screen_init(struct glx_screen *psc, int screen, struct glx_display * priv); @@ -722,6 +734,9 @@ extern void __glXFreeVertexArrayState(struct glx_context *); */ extern void __glXClientInfo(Display * dpy, int opcode); +_X_HIDDEN void +__glX_send_client_info(struct glx_display *glx_dpy); + /************************************************************************/ /* @@ -772,9 +787,29 @@ GarbageCollectDRIDrawables(struct glx_screen *psc); extern __GLXDRIdrawable * GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable); +#endif + +extern struct glx_screen *GetGLXScreenConfigs(Display * dpy, int scrn); +#ifdef GLX_USE_APPLEGL +extern struct glx_screen * +applegl_create_screen(int screen, struct glx_display * priv); + +extern struct glx_context * +applegl_create_context(struct glx_screen *psc, + struct glx_config *mode, + struct glx_context *shareList, int renderType); + +extern int +applegl_create_display(struct glx_display *display); #endif + +extern struct glx_drawable *GetGLXDrawable(Display *dpy, GLXDrawable drawable); +extern int InitGLXDrawable(Display *dpy, struct glx_drawable *glxDraw, + XID xDrawable, GLXDrawable drawable); +extern void DestroyGLXDrawable(Display *dpy, GLXDrawable drawable); + extern struct glx_context dummyContext; extern struct glx_screen *