[Intel-gfx] [PATCH] glXReleaseTexImageEXT should release reference to storage for the pixmap
Shuang He
shuang.he at intel.com
Mon Jun 1 11:09:12 CEST 2009
Julien Cristau wrote:
> On Mon, Jun 1, 2009 at 11:22:19 +0800, Shuang He wrote:
>
>
>> According to GLX_EXT_texture_from_pixmap spec, "The storage for the GLX pixmap will be freed when it is not current to any client and all color buffers that are bound to a texture object have been released."
>> ---
>> include/GL/internal/dri_interface.h | 8 +++++
>> src/glx/x11/glxcmds.c | 18 ++++++++++-
>> src/mesa/drivers/dri/intel/intel_screen.c | 2 +
>> src/mesa/drivers/dri/intel/intel_tex.h | 7 ++++
>> src/mesa/drivers/dri/intel/intel_tex_image.c | 42 ++++++++++++++++++++++++++
>> 5 files changed, 76 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
>> index 910c916..e4cb308 100644
>> --- a/include/GL/internal/dri_interface.h
>> +++ b/include/GL/internal/dri_interface.h
>> @@ -245,6 +245,10 @@ struct __DRItexBufferExtensionRec {
>> void (*setTexBuffer)(__DRIcontext *pDRICtx,
>> GLint target,
>> __DRIdrawable *pDraw);
>> + void (*unsetTexBuffer)(__DRIcontext *pDRICtx,
>> + GLint target,
>> + __DRIdrawable *pDraw);
>> +
>>
>>
> Adding this in the middle of the struct looks like it breaks binary
> compat. I think what you want is to add one unsetTexBuffer hook at the
> end, and bump the interface version to 3, no?
>
Thanks Julien :-) . I'm updating the patch, will send out later again.
Thanks
--Shuang
>
>> /**
>> * Method to override base texture image with the contents of a
>> @@ -256,6 +260,10 @@ struct __DRItexBufferExtensionRec {
>> GLint target,
>> GLint format,
>> __DRIdrawable *pDraw);
>> + void (*unsetTexBuffer2)(__DRIcontext *pDRICtx,
>> + GLint target,
>> + __DRIdrawable *pDraw);
>> +
>> };
>>
>> /**
>>
>
> Cheers,
> Julien
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090601/8cfff27c/attachment.html>
More information about the Intel-gfx
mailing list