From dcbe215c015c8dc48440f578023c2b9d12b934e4 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Sun, 9 Mar 2008 21:28:04 -0400 Subject: DRI2: Make setTexBuffer take a __DRIdrawable instead of a BO handle. This fixes a problem where texturing from the same Pixmap more than once per batchbuffer would hang the DRI driver. We just use the region associated with the front left renderbuffer of the __DRIdrawable for texturing, which avoids creating different regions for the same BO. This change also make GLX_EXT_texture_from_pixmap work for direct rendering, since tracking the __DRIdrawable -> BO handle now uses the standard DRI2 event buffer. Of course, DRI2 direct rendering doesn't exist yet. Finally, this commit bumps the DRI interface version again, accounting for the change in the DRI_TEX_BUFFER extension and the change in commit 0bba0e5be7a4a7275dad1edc34bdcc134ea1f424 to pass in the event buffer head index on drawable creation. --- include/GL/internal/dri_interface.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 0cd9f944dd..fb68fd6ee7 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -216,16 +216,14 @@ struct __DRItexBufferExtensionRec { __DRIextension base; /** - * Method to override base texture image with a DRM memory manager - * buffer object. The depth passed in allows e.g. to ignore the - * alpha channel of texture images where the non-alpha components - * don't occupy a whole texel. + * Method to override base texture image with the contents of a + * __DRIdrawable. * * For GLX_EXT_texture_from_pixmap with AIGLX. */ void (*setTexBuffer)(__DRIcontext *pDRICtx, - GLint target, unsigned long handle, - GLint cpp, GLuint pitch, GLuint height); + GLint target, + __DRIdrawable *pDraw); }; @@ -243,7 +241,7 @@ struct __DRItexBufferExtensionRec { */ /*@{*/ -#define __DRI_INTERFACE_VERSION 20080226 +#define __DRI_INTERFACE_VERSION 20080310 typedef void *(CREATENEWSCREENFUNC)(int scr, __DRIscreen *psc, const __DRIversion * ddx_version, const __DRIversion * dri_version, -- cgit v1.2.3