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...

> > 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?

>  > How do I get the
> > extension string exported?  This also applies to the
> > GLX_ARB_get_proc_address string. :)
> 
> Add it to __glXGLXDefaultClientExtensions[] in glx/glxcmds.c

If 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?

-- 
Smile!  http://antwrp.gsfc.nasa.gov/apod/ap990315.html


-------------------------------------------------------
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

Reply via email to