Patch for mesa with a set of updates for EXT_tfp. Includes necessary FBConfig support, adds attrib_list to BindTexImage and fixes CreateDrawable so that glXCreatePixmap works. Xgl and compiz requires this patch. Can I commit this to head? -David -------------- next part -------------- A non-text attachment was scrubbed... Name: mesa-tfp-update-1.patch Type: text/x-patch Size: 8154 bytes Desc: not available Url : http://lists.freedesktop.org/archives/compiz/attachments/20060409/1f3354e8/mesa-tfp-update-1.bin
Ian Romanick
2006-Apr-10 09:06 UTC
[compiz] Re: [Mesa3d-dev] EXT_texture_from_pixmap update
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David Reveman wrote:> Patch for mesa with a set of updates for EXT_tfp. Includes necessary > FBConfig support, adds attrib_list to BindTexImage and fixes > CreateDrawable so that glXCreatePixmap works. > > Xgl and compiz requires this patch. > > Can I commit this to head?Other than my one comment below, this looks good.> Index: include/GL/internal/glcore.h > ==================================================================> RCS file: /cvs/mesa/Mesa/include/GL/internal/glcore.h,v > retrieving revision 1.8 > diff -u -r1.8 glcore.h > --- include/GL/internal/glcore.h 6 Jun 2004 02:20:20 -0000 1.8 > +++ include/GL/internal/glcore.h 9 Apr 2006 10:46:54 -0000 > @@ -136,6 +136,13 @@ > /* OML_swap_method */ > GLint swapMethod; > > + /* EXT_texture_from_pixmap */ > + GLint bindToTextureRgb; > + GLint bindToTextureRgba; > + GLint bindToMipmapTexture; > + GLint bindToTextureTargets; > + GLint yInverted; > + > GLint screen; > } __GLcontextModes;Aieeee!!! Additions to __GLcontextModes *MUST* go at the end. Any driver compiled against an old version of the structure will get a nasty surprise if it tries to access the screen field. :) The DRI interface version (as returned by __glXGetInternalVersion in src/glx/x11/glxcmds.c) should NOT bumped. This all works because the driver allocates these structures by calling _gl_context_modes_create in libGL. If the driver wants a new version, it will specify a minimum_size that is larger than what libGL thinks sizeof(__GLcontextModes) is. If the driver wants an old version, libGL will give it a new version, with properly initialized fields, anyway. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFEOnkAX1gOwKyEAw8RAmd5AJsGuxO9AqOCVVeJO84zzG/xDUg81QCggfSV J17TQUILSvhA+3iydaZwUtQ=XiMG -----END PGP SIGNATURE-----
David Reveman wrote:> Patch for mesa with a set of updates for EXT_tfp. Includes necessary > FBConfig support, adds attrib_list to BindTexImage and fixes > CreateDrawable so that glXCreatePixmap works. > > Xgl and compiz requires this patch. > > Can I commit this to head?In general, it looks OK to me. The only question I have is about adding new fields to the __GLcontextModesRec structure. I'm not sure if that struct is part of the ABI between any DRI components. If so, adding new fields might break compatibility somewhere. Ian would probably know. -Brian