[Libva] vaCreateSurfaceGLX on psb fails (due lack of GLX_EXT_texture_from_pixmap)

Gwenole Beauchesne gbeauchesne at splitted-desktop.com
Thu Feb 18 08:36:53 PST 2010


On Thu, 18 Feb 2010, Adam Strzelecki wrote:

>> IEGD had TFP for a long time since this is a Moblin requirement. However, what is missing is vaPutSurface() support to an X11 Pixmap. I have not tried yet, and I doubt it would work anyway, please try:
>> $ ./vaapi_h264 --getimage pixmap
>
> That one crashes my Xorg with:
> Warning: LookupDrawable()/SecurityLookupDrawable() are deprecated.  Please convert your driver/module to use dixLookupDrawable().
> Backtrace:
> 0: X(xf86SigHandler+0x7e) [0x80c91ce]
> 1: [0xb7f34400]
> 2: /usr/lib/xorg/modules/drivers//iegd_drv.so [0xb7912c31]

I confirm this also crashes on Ubuntu 9.04. I am surprised it works for 
you on Ubuntu 9.10 as this is not officially supported. Anyway, I will 
give it a try too when I get time.

>> It's much simpler to check that way. ;-) This is available in
>> <http://www.splitted-desktop.com/~gbeauchesne/hwdecode-demos/>
>
> I am aware of those, even got them compiled on my Atom box, but I couldn't find any documentation regarding params to those demos.

I added the documentation in src/common.c. ;-)

>> However, note that I removed that 'bind' API in my next libVA packages. 
>> TFP is suboptimal. It was discussed to let the driver expose the 
>> underlying Pixmap instead, but I don't think it's available yet. And, 
>> this is quite obsolete anyway. Proper implementation of 
>> vaCopySurfaceGLX() is simpler, IMHO.
>
> Yeah I agree, if you are going to remove 'binds' anyway I hope you 
> remote this intermediate "void *gl_texture" type made by 
> vaCreateSurfaceGLX which will be IMHO unnecessary anymore. I think in 
> va-glx.h there could be only one function left vaCopySurfaceGLX being:
>
> VAStatus vaCopySurfaceGLX(
>    VADisplay    dpy,
>    GLenum       target,
>    GLuint       texture,
>    VASurfaceID  surface,
>    unsigned int flags
> );
>
> would be perfect. And it should act as glTextImage2D feeding OpenGL texture with VASurfaceID data.

The problem is the driver may need some state attached to this texture for 
caching purposes. So, a VA/GLX surface is still needed.

> Finally I think all this VAImageID support in LIBVA is nice addition in 
> opposition to VA->OpenGL texture transfer support which is IMHO a MUST 
> here. And I believe it should be top priority for Intel to have it done 
> since Moblin relays on Clutter, and Clutter uses OpenGL for rendering,

The VA image interface is not really needed in practise.

I would prefer the following:
- VA subpictures in RGBA or BGRA format. IA44/IA88 are a plus
- VA/GLX support through TFP or direct transfer (specific hook)

Regards,
Gwenole.


More information about the Libva mailing list