Ian Romanick wrote:
On Fri, Nov 15, 2002 at 12:02:28PM -0700, Brian Paul wrote:Ian Romanick wrote:I'm going to implement SGI_swap_control (which adds glXSwapIntervalSGI) first because implementing it in any of the drivers that supports the vblank syncing would be trivial. That way 99% of the work in not device dependent. :) In the R200 driver, the behavior of SGI_swap_control can be added by changing r200WaitForVBlank to do something like: if ( rmesa->swap_interval != 0 ) { vbl.type = DRM_VBLANK_ABSOLUTE; vbl.sequence = rmesa->vbl_seq + rmesa->swap_interval; } else if ( getenv("LIBGL_SYNC_REFRESH") ) { ... The only catch is that I can find NO documentation of the GLX protocol for it. Given that, I'm going to implement it for direct rendering contexts only. I believe that this could be done by either adding a new entry point to __DriverAPIRec or adding a swap_interval field to __DRIcontextPrivateRec and adding a DRIswapInterval function to dri_util.c. I would then fill-in glXSwapIntervalSGI in lib/GL/glx/glxcmds.c to look either like glXSwapBuffers or glXUseXFont (for their gc->isDirect cases, anyway).You have two choices: 1. A dynamically registered extension[snip]2. As a hard-coded extension[snip] Hmmm...would adding it as a hard-coded extension make life easier for IHVs that want to provide binary-only drivers but not necessarilly their own libGL.so? I'm thinking ATI and PowerVR...
I don't think it matters much either way.
What needs to be done in programs/Xserver/GL/glx/?Nothing for a client-side-only GLX extension.Okay. That's because that's the code that does the wire-protocol decoding and dispatch, right?
right.
Evidently, NVIDIA supports the extension for indirect rendering too.> How do I get theextension string exported? This also applies to the GLX_ARB_get_proc_address string. :)Add it to __glXGLXDefaultClientExtensions[] in glx/glxcmds.cIf I do that, in glxinfo it only shows up in the 'client glx extensions', which makes sense given the way I'm doing it. In the Nvidia driver, it shows up in both 'client glx extnesions' and 'GLX extensions'.
> From the perspective on an ISV, where SHOULD it appear?
[Note that GLX has 3 functions for querying extensions...]
From my understanding, it depends on the particular extension. If a GLX
extension really only is client-side-only, then it'll only appear in the
string returned by glXGetClientString(dpy, GLX_EXTENSIONS).
glXQueryServerString(dpy, scrn, GLX_EXTENSIONS) will return the names of
extensions that are implemented in the server. But you won't be able to
use them if the same extension isn't implemented on the client side by
libGL.
If a GLX extension is implemented by both client and server, then it should
appear in glXQueryExtensionsString(dpy, scrn) since it computes the inter-
section of the extension strings.
That said, I don't know why NVIDIA's driver returns GLX_ARB_get_proc_address
from glXQueryExtensionsString().
-Brian
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel