Summary: | libglx / libGLcore should use a dispatch table | ||
---|---|---|---|
Product: | DRI | Reporter: | Ian Romanick <idr> |
Component: | General | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | high | ||
Version: | XOrg git | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 2994 | ||
Attachments: |
Description
Ian Romanick
2005-04-12 09:16:17 UTC
Created attachment 2408 [details] [review] Server-side Mesa patch Changes to Mesa required for all future server-side patches. Adds a new script to src/mesa/glapi (glX_proto_recv.py) that is used to generate the server-side code that processes GLX protocol and dispatches the function calls. The server-side code is generated by setting XORG_BASE in src/mesa/glapi/Makefile and invoking the Makefile with 'make server'. Created attachment 2409 [details] [review] Allows X.org to use Mesa CVS After setting MesaSrcDir and DRMSrcDir in config/cf/host.def to point at Mesa CVS and DRM CVS, this patch allows the X.org build to work. This patch is also required for all the future patches. Created attachment 2410 [details] [review] Make server-size GLX use autogenerated "size" code. Apply this patch after the other 2. This makes the server-side GLX code use the "size" functions generated by the glX_proto_size.py script. Created attachment 2411 [details] [review] Make server-size GLX use autogenerated dispatch code. This is the last of the patches (for now). This one does two things. First, it makes the server-side code use the GLX protocol handling functions generated by glX_proto_recv.py. Second, it eliminiates the need for the static GL dispatch functions in libGLcore by using the dispatch pointer directly. Applying all 4 of the current patches to Mesa CVS and Xorg CVS should resolve this issue. Before this code can find its way into CVS, there are a couple issues that still need to be resolved. 1. Byte-swapping code. The old SGI code used some really slow (as admitted by comments in the code) routines for doing byte-swapping. The new autogenerated code uses Linux-specific routines from byteswap.h. This ensures that optimial, in many cases a single instruction, routines are used for byte-swapping. However, this is not portable. An abstraction layer and OS-specific glue is needed here. 2. Symbol visibility. After having used the autogenerated HIDDEN stuff for a couple months now, I can honestly say that I don't like it. Something better needs to be done for HIDDEN, INTERNAL, PURE, FASTCALL, and other future annotations. The best answer might be to just put all of that in glxserver.h, glcore.h, dri_interface.h, or some similar, global include file. 3. Darwin hacks. Since the static dispatch functions are no longer used and the driver (libGLcore) can setup the dispatch table however it sees fit, all of the #ifdef stuff to work around missing functions in older versions of OS X should be removed. Also, I didn't realize that the last two patches were so huge (140KiB and 460KiB). If I had realized that, I would have compressed them before uploading. Sorry. Created attachment 2416 [details] [review] Make server-side GLX use autogenerated dispatch code, version 02 Very small update to attachment #2411 [details] [review]. No functional changes, but this does remove a large number of compiler warnings caused by a couple missing prototypes and missing includes. Comment on attachment 2409 [details] [review] Allows X.org to use Mesa CVS The version of Mesa CVS supported by this patch has sense been merged into X.org CVS. Comment on attachment 2408 [details] [review] Server-side Mesa patch The version of Mesa CVS supported by this patch has sense been merged into X.org CVS. Created attachment 3543 [details] [review] Make server-size GLX use autogenerated "size" code, version 02 This updates the previous server-side generated "size" code patch for current Xorg CVS. In addition, this patch eliminates the /requirement/ for byteswap.h and bswap_*. That header file only exists on Linux. As such, it is only used on Linux. Non-Linux systems fallback to the crufty macros in X11/misc.h. To apply this patch, cd to xc, and do 'patch -p1 -E < Xorg-new-size-02.patch'. Created attachment 3544 [details] [review] Make server-side GLX use autogenerated dispatch code, version 03 This updates the previous server-side generated dispatch code patch for current Xorg CVS. This patch still needs some cleaning to remove the dependency on Linux's byteswap.h. To apply this patch, cd to xc, and do 'patch -p1 -E < Xorg-dispatch-03.patch'. This patch assumes that Xorg-new-size-02.patch has already been applied! To use this patch, you MUST build against the Mesa 6.4 tree. There are a couple changes (relative to the version of Mesa in xc/extras/Mesa) in that tree that are required by this patch. Without those changes, the build will fail. Created attachment 4330 [details] [review] New size and dispatch patch for modular build. This patch unifies the old "size" and "dispath" patches. In addition to the changes in this patch, the entire xorg/GL/mesa/glapi directory will go away. This is in HEAD now, closing bug. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.